Interface IResourceTypes

All Superinterfaces:
IRestoreCrudSupport<ResourceTypeDescriptor>, IRestoreSupport<ResourceTypeDescriptor>

@Path("/resources/{domainUid}/type") public interface IResourceTypes extends IRestoreCrudSupport<ResourceTypeDescriptor>
Resource types API. Allows you to categorize resources by type. Resource types are part of a domain (and only one).
  • Method Details

    • create

      @PUT @Path("{identifier}") void create(@PathParam("identifier") String uid, ResourceTypeDescriptor resourceTypeDescriptor) throws ServerFault
      Create a { @link ResourceTypeDescriptor }.
      Parameters:
      uid - { @link ResourceTypeDescriptor } unique id
      resourceTypeDescriptor - { @link ResourceTypeDescriptor }
      Throws:
      ServerFault - standard error object
    • update

      @POST @Path("{uid}") void update(@PathParam("uid") String uid, ResourceTypeDescriptor resourceTypeDescriptor) throws ServerFault
      Modify an existing { @link ResourceTypeDescriptor }.
      Parameters:
      uid - { @link ResourceTypeDescriptor } unique id
      resourceTypeDescriptor - updated { @link ResourceTypeDescriptor }
      Throws:
      ServerFault - standard error object
    • delete

      @DELETE @Path("{uid}") void delete(@PathParam("uid") String uid) throws ServerFault
      Delete an existing { @link ResourceTypeDescriptor }.
      Specified by:
      delete in interface IRestoreCrudSupport<ResourceTypeDescriptor>
      Parameters:
      uid - { @link ResourceTypeDescriptor } unique id
      Throws:
      ServerFault - standard error object
    • get

      @GET @Path("{uid}") ResourceTypeDescriptor get(@PathParam("uid") String uid) throws ServerFault
      Fetch a { @link ResourceTypeDescriptor }.
      Specified by:
      get in interface IRestoreSupport<ResourceTypeDescriptor>
      Parameters:
      uid - { @link ResourceTypeDescriptor } unique id
      Returns:
      { @link ResourceTypeDescriptor } or null if it does not exist
      Throws:
      ServerFault - standard error object
    • getTypes

      @GET List<ResourceType> getTypes() throws ServerFault
      Fetch all resources types
      Returns:
      list of all { @link ResourceType }
      Throws:
      ServerFault - standard error object
    • getIcon

      @GET @Path("{uid}/icon") @Produces("image/png") byte[] getIcon(@PathParam("uid") String uid) throws ServerFault
      Fetch a { @link ResourceTypeDescriptor } icon.
      Parameters:
      uid - { @link ResourceTypeDescriptor } unique id
      Returns:
      icon binary data (png format) or null if the { @link ResourceTypeDescriptor } does not exist
      Throws:
      ServerFault - standard error object
    • setIcon

      @POST @Path("{uid}/icon") @Consumes("image/png") void setIcon(@PathParam("uid") String uid, byte[] icon) throws ServerFault
      Set an icon to { @link ResourceTypeDescriptor }.
      Parameters:
      uid - { @link ResourceTypeDescriptor } unique id
      icon - icon binary data (png format)
      Throws:
      ServerFault - standard error object