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)
Fetch an existing
ResourceDescriptor by its email. |
java.util.List<java.lang.String> |
byType(java.lang.String typeUid)
List all
ResourceDescriptor by type. |
void |
create(java.lang.String uid,
ResourceDescriptor rd)
Creates a
ResourceDescriptor . |
TaskRef |
delete(java.lang.String uid)
Delete an existing
ResourceDescriptor . |
ResourceDescriptor |
get(java.lang.String uid)
Fetch an existing
ResourceDescriptor by its unique id. |
byte[] |
getIcon(java.lang.String uid)
Fetch a
ResourceDescriptor icon. |
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)
Set a
ResourceDescriptor icon. |
void |
update(java.lang.String uid,
ResourceDescriptor rd)
Modify an existing
ResourceDescriptor . |
public ResourcesService(BmContext context, ItemValue<Domain> domain, Container resourcesContainer) throws ServerFault
ServerFault
public void create(java.lang.String uid, ResourceDescriptor rd) throws ServerFault
IResources
ResourceDescriptor
.create
in interface IResources
uid
- { @link ResourceDescriptor } unique idrd
- { ResourceDescriptor
ServerFault
- standard error objectpublic void update(java.lang.String uid, ResourceDescriptor rd) throws ServerFault
IResources
ResourceDescriptor
.update
in interface IResources
uid
- { @link ResourceDescriptor } unique idrd
- updated { ResourceDescriptor
ServerFault
- standard error objectpublic TaskRef delete(java.lang.String uid) throws ServerFault
IResources
ResourceDescriptor
.delete
in interface IResources
uid
- { @link ResourceDescriptor } unique idServerFault
- standard error objectpublic ResourceDescriptor get(java.lang.String uid) throws ServerFault
IResources
ResourceDescriptor
by its unique id.get
in interface IResources
uid
- { @link ResourceDescriptor } unique idResourceDescriptor
, or null if the
ResourceDescriptor
does not existServerFault
- standard error objectpublic byte[] getIcon(java.lang.String uid) throws ServerFault
IResources
ResourceDescriptor
icon.getIcon
in interface IResources
uid
- { @link ResourceDescriptor } unique idResourceDescriptor
does not existServerFault
- standard error objectpublic void setIcon(java.lang.String uid, byte[] icon) throws ServerFault
IResources
ResourceDescriptor
icon.setIcon
in interface IResources
uid
- { @link ResourceDescriptor } unique idicon
- icon binary data (png format)ServerFault
- standard error objectpublic ItemValue<ResourceDescriptor> byEmail(java.lang.String email) throws ServerFault
IResources
ResourceDescriptor
by its email.byEmail
in interface IResources
email
- { @link ResourceDescriptor } emailResourceDescriptor
net.bluemind.core.container.api.ItemValue
, or null if the
ResourceDescriptor
does not existServerFault
- standard error objectpublic java.util.List<java.lang.String> byType(java.lang.String typeUid) throws ServerFault
IResources
ResourceDescriptor
by type.byType
in interface IResources
typeUid
- { @link net.bluemind.resource.api.type.ResourceType } unique
idResourceDescriptor
uids or null if the type does
not exists or if there are no ResourceDescriptor
matching.ServerFault
- standard error objectpublic 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.