public class ResourcesService extends java.lang.Object implements IResources
Constructor and Description |
---|
ResourcesService(BmContext context,
ItemValue<Domain> domain,
Container resourcesContainer) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
addToEventDescription(java.lang.String resourceUid,
EventInfo eventInfo)
Compute the transformed template associated to the given resource if any,
then append it to the given
eventDescription . |
ItemValue<ResourceDescriptor> |
byEmail(java.lang.String email)
Fetches a
ResourceDescriptor item from the database with its
email. |
java.util.List<java.lang.String> |
byType(java.lang.String typeUid)
Search resources by type.
|
void |
create(java.lang.String uid,
ResourceDescriptor rd)
Creates a resource
|
TaskRef |
delete(java.lang.String uid)
Deletes an existing resource
|
ResourceDescriptor |
get(java.lang.String uid)
Retrieve an existing resource
|
byte[] |
getIcon(java.lang.String uid) |
java.lang.String |
removeFromEventDescription(java.lang.String resourceUid,
EventInfo eventInfo)
Remove the transformed template associated to the given resource from the
given
eventDescription . |
void |
setIcon(java.lang.String uid,
byte[] icon) |
void |
update(java.lang.String uid,
ResourceDescriptor rd)
Modifies an existing resource
|
public ResourcesService(BmContext context, ItemValue<Domain> domain, Container resourcesContainer) throws ServerFault
ServerFault
public void create(java.lang.String uid, ResourceDescriptor rd) throws ServerFault
IResources
create
in interface IResources
ServerFault
- { ResourceDescriptor
public void update(java.lang.String uid, ResourceDescriptor rd) throws ServerFault
IResources
update
in interface IResources
ServerFault
- updated { ResourceDescriptor
public TaskRef delete(java.lang.String uid) throws ServerFault
IResources
delete
in interface IResources
ServerFault
public ResourceDescriptor get(java.lang.String uid) throws ServerFault
IResources
get
in interface IResources
ServerFault
public byte[] getIcon(java.lang.String uid) throws ServerFault
getIcon
in interface IResources
ServerFault
public void setIcon(java.lang.String uid, byte[] icon) throws ServerFault
setIcon
in interface IResources
ServerFault
public ItemValue<ResourceDescriptor> byEmail(java.lang.String email) throws ServerFault
IResources
ResourceDescriptor
item from the database with its
email.byEmail
in interface IResources
ServerFault
- standard error objectpublic java.util.List<java.lang.String> byType(java.lang.String typeUid) throws ServerFault
IResources
byType
in interface IResources
typeUid
- ResourceType.identifier
ServerFault
public java.lang.String addToEventDescription(java.lang.String resourceUid, EventInfo eventInfo)
IResources
eventDescription
.addToEventDescription
in interface IResources
resourceUid
- the identifier of ResourceDescriptor
eventDescription
ResourceTypeDescriptor.templates
public java.lang.String removeFromEventDescription(java.lang.String resourceUid, EventInfo eventInfo)
IResources
eventDescription
.removeFromEventDescription
in interface IResources
resourceUid
- the identifier of ResourceDescriptor
eventDescription
ResourceTypeDescriptor.templates
Copyright © 2021. All Rights Reserved.