@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.
|
boolean |
exists(java.lang.String roleName)
Checks if role with given name exists
|
default java.util.List<java.lang.String> |
list()
Lists the names of all available roles in the security system.
|
java.util.List<java.lang.String> |
list(java.lang.String rolePattern,
com.xebialabs.deployit.engine.api.dto.Paging paging,
com.xebialabs.deployit.engine.api.dto.Ordering order)
Lists the names of all available roles in the security system.
|
java.util.List<Role> |
list(java.lang.String id,
java.lang.String rolePattern,
com.xebialabs.deployit.engine.api.dto.Paging paging,
com.xebialabs.deployit.engine.api.dto.Ordering order)
List the roles for given configuration item ID
|
default java.util.List<java.lang.String> |
listMyRoles()
Lists the roles of the currently logged in user.
|
java.util.List<java.lang.String> |
listMyRoles(java.lang.String rolePattern,
com.xebialabs.deployit.engine.api.dto.Paging paging,
com.xebialabs.deployit.engine.api.dto.Ordering order)
Lists the roles of the currently logged in user.
|
default java.util.List<java.lang.String> |
listRoles(java.lang.String username)
Lists the roles of a user.
|
java.util.List<java.lang.String> |
listRoles(java.lang.String username,
java.lang.String rolePattern,
com.xebialabs.deployit.engine.api.dto.Paging paging,
com.xebialabs.deployit.engine.api.dto.Ordering order)
Lists the roles of a user.
|
default java.util.List<RolePrincipals> |
readRolePrincipals()
Lists all role principals available in the security system.
|
java.util.List<RolePrincipals> |
readRolePrincipals(java.lang.String rolePattern,
com.xebialabs.deployit.engine.api.dto.Paging paging,
com.xebialabs.deployit.engine.api.dto.Ordering order)
Lists paged role principals available in the security system for given role name pattern
|
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.
|
void |
updatePrincipals(RolePrincipals rolePrincipals)
Update principals for existing role
|
void |
updatePrincipals(java.lang.String name,
java.util.List<java.lang.String> principals)
Assigns a role to a user or group.
|
@GET
@Path(value="exists/{name}")
boolean exists(@PathParam(value="name")
java.lang.String roleName)
roleName - checked role name@GET
@Path(value="v2/{id:.+}")
java.util.List<Role> list(@PathParam(value="id")
java.lang.String id,
@QueryParam(value="rolePattern")
java.lang.String rolePattern,
@BeanParam
com.xebialabs.deployit.engine.api.dto.Paging paging,
@QueryParam(value="order")
com.xebialabs.deployit.engine.api.dto.Ordering order)
id - configuration item IDrolePattern - the role name pattern used for searchpaging - search pagingorder - search order@GET
@Path(value="v2")
java.util.List<java.lang.String> list(@QueryParam(value="rolePattern")
java.lang.String rolePattern,
@BeanParam
com.xebialabs.deployit.engine.api.dto.Paging paging,
@QueryParam(value="order")
com.xebialabs.deployit.engine.api.dto.Ordering order)
@GET default java.util.List<java.lang.String> list()
@GET
@Path(value="v2/roles")
java.util.List<java.lang.String> listMyRoles(@QueryParam(value="rolePattern")
java.lang.String rolePattern,
@BeanParam
com.xebialabs.deployit.engine.api.dto.Paging paging,
@QueryParam(value="order")
com.xebialabs.deployit.engine.api.dto.Ordering order)
@GET @Path(value="roles") default java.util.List<java.lang.String> listMyRoles()
@GET
@Path(value="v2/roles/{username}")
java.util.List<java.lang.String> listRoles(@PathParam(value="username")
java.lang.String username,
@QueryParam(value="rolePattern")
java.lang.String rolePattern,
@BeanParam
com.xebialabs.deployit.engine.api.dto.Paging paging,
@QueryParam(value="order")
com.xebialabs.deployit.engine.api.dto.Ordering order)
username - the username of the principal@GET
@Path(value="roles/{username}")
default 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.@POST @Path(value="principals") void updatePrincipals(RolePrincipals rolePrincipals)
rolePrincipals - rolePrincipals.role for which the rolePrincipals.principals is applied to@POST
@Path(value="{role}/principals")
void updatePrincipals(@PathParam(value="role")
java.lang.String name,
java.util.List<java.lang.String> principals)
name - the name of the role to assignprincipals - the user or group to assign the role to.@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.@GET @Path(value="v2/principals") java.util.List<RolePrincipals> readRolePrincipals(@QueryParam(value="rolePattern") java.lang.String rolePattern, @BeanParam com.xebialabs.deployit.engine.api.dto.Paging paging, @QueryParam(value="order") com.xebialabs.deployit.engine.api.dto.Ordering order)
rolePattern - the role name pattern used for searchpaging - search pagingorder - search order@GET @Path(value="principals") default java.util.List<RolePrincipals> readRolePrincipals()