Package net.bluemind.resource.api
Interface IResources
- All Superinterfaces:
IRestoreDirEntryWithMailboxSupport<ResourceDescriptor>
,IRestoreSupport<ResourceDescriptor>
@Path("/resources/{domainUid}")
public interface IResources
extends IRestoreDirEntryWithMailboxSupport<ResourceDescriptor>
Resources API. Resources are used, for example, to create an entity like a
vehicle, a meeting room, a video-projector, etc. They can be categorized by
type.
Once created, you can invite a resource to a calendar event. It simply means
the resource is booked during the time of the event.
Resource are part of a domain (and only one).
-
Method Summary
Modifier and TypeMethodDescriptionaddToEventDescription
(String resourceUid, EventInfo eventInfo) Compute the transformed template associated to the given resource if any, then append it to the giveneventDescription
.Fetch an existingResourceDescriptor
by its email.List allResourceDescriptor
by type.void
create
(String uid, ResourceDescriptor resourceDescriptor) Creates aResourceDescriptor
.Delete an existingResourceDescriptor
.Fetch an existingResourceDescriptor
by its unique id.byte[]
Fetch aResourceDescriptor
icon.removeFromEventDescription
(String resourceUid, EventInfo eventInfo) Remove the transformed template associated to the given resource from the giveneventDescription
.void
Set aResourceDescriptor
icon.void
update
(String uid, ResourceDescriptor resourceDescriptor) Modify an existingResourceDescriptor
.Methods inherited from interface net.bluemind.core.container.api.IRestoreDirEntryWithMailboxSupport
getComplete
Methods inherited from interface net.bluemind.core.container.api.IRestoreSupport
restore
-
Method Details
-
create
@PUT @Path("{uid}") void create(@PathParam("uid") String uid, ResourceDescriptor resourceDescriptor) throws ServerFault Creates aResourceDescriptor
.- Parameters:
uid
- { @link ResourceDescriptor } unique idresourceDescriptor
- {ResourceDescriptor
- Throws:
ServerFault
- standard error object
-
update
@POST @Path("{uid}") void update(@PathParam("uid") String uid, ResourceDescriptor resourceDescriptor) throws ServerFault Modify an existingResourceDescriptor
.- Parameters:
uid
- { @link ResourceDescriptor } unique idresourceDescriptor
- updated {ResourceDescriptor
- Throws:
ServerFault
- standard error object
-
delete
Delete an existingResourceDescriptor
.- Specified by:
delete
in interfaceIRestoreDirEntryWithMailboxSupport<ResourceDescriptor>
- Parameters:
uid
- { @link ResourceDescriptor } unique id- Throws:
ServerFault
- standard error object
-
get
Fetch an existingResourceDescriptor
by its unique id.- Specified by:
get
in interfaceIRestoreSupport<ResourceDescriptor>
- Parameters:
uid
- { @link ResourceDescriptor } unique id- Returns:
ResourceDescriptor
, or null if theResourceDescriptor
does not exist- Throws:
ServerFault
- standard error object
-
getIcon
@GET @Path("{uid}/icon") @Produces("image/png") byte[] getIcon(@PathParam("uid") String uid) throws ServerFault Fetch aResourceDescriptor
icon.- Parameters:
uid
- { @link ResourceDescriptor } unique id- Returns:
- icon binary data (png format) or null if the
ResourceDescriptor
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 aResourceDescriptor
icon.- Parameters:
uid
- { @link ResourceDescriptor } unique idicon
- icon binary data (png format)- Throws:
ServerFault
- standard error object
-
byEmail
@GET @Path("byEmail/{email}") ItemValue<ResourceDescriptor> byEmail(@PathParam("email") String email) throws ServerFault Fetch an existingResourceDescriptor
by its email.- Parameters:
email
- { @link ResourceDescriptor } email- Returns:
ResourceDescriptor
invalid reference
net.bluemind.core.container.api.ItemValue
ResourceDescriptor
does not exist- Throws:
ServerFault
- standard error object
-
byType
@GET @Path("byType/{type}") List<String> byType(@PathParam("type") String typeUid) throws ServerFault List allResourceDescriptor
by type.- Parameters:
typeUid
- { @link net.bluemind.resource.api.type.ResourceType } unique id- Returns:
- list of
ResourceDescriptor
uids or null if the type does not exists or if there are noResourceDescriptor
matching. - Throws:
ServerFault
- standard error object
-
addToEventDescription
@POST @Path("{uid}/addToEventDesc") String addToEventDescription(@PathParam("uid") String resourceUid, EventInfo eventInfo) throws ServerFault Compute the transformed template associated to the given resource if any, then append it to the giveneventDescription
.- Parameters:
resourceUid
- the identifier ofResourceDescriptor
organizer
- the organizer of the calendar event- Returns:
- the modified - or not -
eventDescription
- Throws:
ServerFault
- standard error object- See Also:
-
removeFromEventDescription
@POST @Path("{uid}/removeFromEventDesc") String removeFromEventDescription(@PathParam("uid") String resourceUid, EventInfo eventInfo) throws ServerFault Remove the transformed template associated to the given resource from the giveneventDescription
.- Parameters:
resourceUid
- the identifier ofResourceDescriptor
- Returns:
- the modified - or not -
eventDescription
- Throws:
ServerFault
- standard error object- See Also:
-