Class RoleResource
java.lang.Object
org.openmetadata.service.resources.EntityResource<Role,RoleRepository>
org.openmetadata.service.resources.teams.RoleResource
@Path("/v1/roles")
@Produces("application/json")
@Consumes("application/json")
public class RoleResource
extends EntityResource<Role,RoleRepository>
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.openmetadata.service.resources.EntityResource
allowedFields, authorizer, entityClass, entityType, fieldsToViewOperations, repository, VIEW_ALL_OPERATIONS, VIEW_BASIC_OPERATIONS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
create
(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.SecurityContext securityContext, @Valid CreateRole createRole) javax.ws.rs.core.Response
createOrUpdateRole
(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.SecurityContext securityContext, @Valid CreateRole createRole) javax.ws.rs.core.Response
delete
(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.SecurityContext securityContext, boolean hardDelete, String name) javax.ws.rs.core.Response
delete
(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.SecurityContext securityContext, boolean hardDelete, UUID id) @Valid Role
get
(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.SecurityContext securityContext, UUID id, String fieldsParam, Include include) @Valid Role
getByName
(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.SecurityContext securityContext, String name, String fieldsParam, Include include) protected List<MetadataOperation>
static EntityReference
getVersion
(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.SecurityContext securityContext, UUID id, String version) void
Method used for initializing a resource, such as creating default policies, roles, etc.@Valid ResultList<Role>
list
(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.SecurityContext securityContext, boolean defaultParam, String fieldsParam, @javax.validation.constraints.Min(0L),@javax.validation.constraints.Max(1000000L) int limitParam, String before, String after, Include include) listVersions
(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.SecurityContext securityContext, UUID id) javax.ws.rs.core.Response
patch
(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.SecurityContext securityContext, UUID id, javax.json.JsonPatch patch) javax.ws.rs.core.Response
restoreRole
(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.SecurityContext securityContext, @Valid RestoreEntity restore) Methods inherited from class org.openmetadata.service.resources.EntityResource
addHref, addViewOperation, create, createOrUpdate, delete, deleteByName, exportCsvInternal, getByNameInternal, getByNameInternal, getEntityReference, getEntityReferences, getFields, getInternal, getInternal, getResourceContext, getResourceContextById, getResourceContextByName, getVersionInternal, getVersionInternal, importCsvInternal, listInternal, listInternal, listVersionsInternal, listVersionsInternal, patchInternal, restoreEntity, upgrade
-
Field Details
-
COLLECTION_PATH
- See Also:
-
FIELDS
- See Also:
-
-
Constructor Details
-
RoleResource
-
-
Method Details
-
addHref
- Overrides:
addHref
in classEntityResource<Role,
RoleRepository>
-
getEntitySpecificOperations
- Overrides:
getEntitySpecificOperations
in classEntityResource<Role,
RoleRepository>
-
initialize
Description copied from class:EntityResource
Method used for initializing a resource, such as creating default policies, roles, etc.- Overrides:
initialize
in classEntityResource<Role,
RoleRepository> - Throws:
IOException
-
list
@GET @Valid public @Valid ResultList<Role> list(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.SecurityContext securityContext, @QueryParam("default") boolean defaultParam, @QueryParam("fields") String fieldsParam, @DefaultValue("10") @Min(0L) @Max(1000000L) @QueryParam("limit") @javax.validation.constraints.Min(0L),@javax.validation.constraints.Max(1000000L) int limitParam, @QueryParam("before") String before, @QueryParam("after") String after, @QueryParam("include") @DefaultValue("non-deleted") Include include) -
listVersions
@GET @Path("/{id}/versions") public EntityHistory listVersions(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.SecurityContext securityContext, @PathParam("id") UUID id) -
get
-
getByName
@GET @Valid @Path("/name/{name}") public @Valid Role getByName(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.SecurityContext securityContext, @PathParam("name") String name, @QueryParam("fields") String fieldsParam, @QueryParam("include") @DefaultValue("non-deleted") Include include) -
getVersion
-
create
@POST public javax.ws.rs.core.Response create(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.SecurityContext securityContext, @Valid @Valid CreateRole createRole) -
createOrUpdateRole
@PUT public javax.ws.rs.core.Response createOrUpdateRole(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.SecurityContext securityContext, @Valid @Valid CreateRole createRole) -
patch
@Path("/{id}") @Consumes("application/json-patch+json") public javax.ws.rs.core.Response patch(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.SecurityContext securityContext, @PathParam("id") UUID id, javax.json.JsonPatch patch) -
delete
@DELETE @Path("/{id}") public javax.ws.rs.core.Response delete(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.SecurityContext securityContext, @QueryParam("hardDelete") @DefaultValue("false") boolean hardDelete, @PathParam("id") UUID id) -
delete
@DELETE @Path("/name/{name}") public javax.ws.rs.core.Response delete(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.SecurityContext securityContext, @QueryParam("hardDelete") @DefaultValue("false") boolean hardDelete, @PathParam("name") String name) -
restoreRole
@PUT @Path("/restore") public javax.ws.rs.core.Response restoreRole(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.SecurityContext securityContext, @Valid @Valid RestoreEntity restore) -
getRole
-