Package net.bluemind.resource.api.type
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 Summary
Modifier and TypeMethodDescriptionvoid
create
(String uid, ResourceTypeDescriptor resourceTypeDescriptor) Create a { @link ResourceTypeDescriptor }.void
Delete an existing { @link ResourceTypeDescriptor }.Fetch a { @link ResourceTypeDescriptor }.byte[]
Fetch a { @link ResourceTypeDescriptor } icon.getTypes()
Fetch all resources typesvoid
Set an icon to { @link ResourceTypeDescriptor }.void
update
(String uid, ResourceTypeDescriptor resourceTypeDescriptor) Modify an existing { @link ResourceTypeDescriptor }.Methods inherited from interface net.bluemind.core.container.api.IRestoreSupport
restore
-
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 idresourceTypeDescriptor
- { @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 idresourceTypeDescriptor
- updated { @link ResourceTypeDescriptor }- Throws:
ServerFault
- standard error object
-
delete
Delete an existing { @link ResourceTypeDescriptor }.- Specified by:
delete
in interfaceIRestoreCrudSupport<ResourceTypeDescriptor>
- Parameters:
uid
- { @link ResourceTypeDescriptor } unique id- Throws:
ServerFault
- standard error object
-
get
Fetch a { @link ResourceTypeDescriptor }.- Specified by:
get
in interfaceIRestoreSupport<ResourceTypeDescriptor>
- Parameters:
uid
- { @link ResourceTypeDescriptor } unique id- Returns:
- { @link ResourceTypeDescriptor } or null if it does not exist
- Throws:
ServerFault
- standard error object
-
getTypes
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 idicon
- icon binary data (png format)- Throws:
ServerFault
- standard error object
-