@Path(value="/security/role")
@Consumes(value={"application/xml","application/json"})
@Produces(value={"application/xml","application/json"})
public interface RoleService
| Modifier and Type | Method and Description | 
|---|---|
void | 
assign(java.lang.String name,
      java.lang.String principal)
Assigns a role to a user or group. 
 | 
void | 
create(java.lang.String name)
Creates a new role. 
 | 
void | 
delete(java.lang.String name)
Removes a role from the XL Deploy security system. 
 | 
java.util.List<java.lang.String> | 
list()
Lists the names of all available roles in the security system. 
 | 
java.util.List<java.lang.String> | 
listMyRoles()
Lists the roles of the currently logged in user. 
 | 
java.util.List<java.lang.String> | 
listRoles(java.lang.String username)
Lists the roles of a user. 
 | 
void | 
rename(java.lang.String name,
      java.lang.String newName)
Renames a role. 
 | 
void | 
unassign(java.lang.String name,
        java.lang.String principal)
Removes a role from a user or group. 
 | 
@GET java.util.List<java.lang.String> list()
@GET @Path(value="roles") java.util.List<java.lang.String> listMyRoles()
@GET
@Path(value="roles/{username}")
java.util.List<java.lang.String> listRoles(@PathParam(value="username")
                                                  java.lang.String username)
username - the username of the principal@PUT
@Path(value="{role}")
void create(@PathParam(value="role")
                   java.lang.String name)
name - the name of the new role.@PUT
@Path(value="{role}/{principal}")
void assign(@PathParam(value="role")
                   java.lang.String name,
                   @PathParam(value="principal")
                   java.lang.String principal)
name - the name of the role to assignprincipal - the user or group to assign the role to.@DELETE
@Path(value="{role}/{principal}")
void unassign(@PathParam(value="role")
                        java.lang.String name,
                        @PathParam(value="principal")
                        java.lang.String principal)
name - the name of the role to removeprincipal - the user or group to remove the role from.@POST
@Path(value="{role}")
void rename(@PathParam(value="role")
                    java.lang.String name,
                    java.lang.String newName)
name - the current namenewName - the new name@DELETE
@Path(value="{role}")
void delete(@PathParam(value="role")
                      java.lang.String name)
name - the name of the role to delete.