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>
  • Field Details

  • Constructor Details

    • RoleResource

      public RoleResource(Authorizer authorizer)
  • Method Details

    • addHref

      public Role addHref(javax.ws.rs.core.UriInfo uriInfo, Role role)
      Overrides:
      addHref in class EntityResource<Role,RoleRepository>
    • getEntitySpecificOperations

      protected List<MetadataOperation> getEntitySpecificOperations()
      Overrides:
      getEntitySpecificOperations in class EntityResource<Role,RoleRepository>
    • initialize

      public void initialize(OpenMetadataApplicationConfig config) throws IOException
      Description copied from class: EntityResource
      Method used for initializing a resource, such as creating default policies, roles, etc.
      Overrides:
      initialize in class EntityResource<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

      @GET @Valid @Path("/{id}") public @Valid Role get(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.SecurityContext securityContext, @PathParam("id") UUID id, @QueryParam("fields") String fieldsParam, @QueryParam("include") @DefaultValue("non-deleted") Include include)
    • 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

      @GET @Path("/{id}/versions/{version}") public Role getVersion(@Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.SecurityContext securityContext, @PathParam("id") UUID id, @PathParam("version") String version)
    • 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

      public static EntityReference getRole(String roleName)