ContextUtil

Access to services

This object exposes methods for accessing and interacting with the services exposed by FlowerDocs Core:

Name Description
getDocumentService() Get document management service
getVersionService() Get document version management service
getFolderService() Get folder management service
getTaskService() Get task management service
getVirtualFolderService() Get virtual folder management service
getService(Component component) Get component management service
Name Description
getClassService(Component component) Get component class management service
getTagClassService() Get tag class management service
getAclService() Get ACL management service
Name Description
getUserService() Get users management service
getGroupService() Get group management service
Methods Description
createFact(Fact fact) Create a business fact
log(String message) Display in logs a message prefixed by [Drools] in INFO
getFeatureService() Get the service accessing information from FlowerDocs internal features
getReservationService() Get reservation management service

Component persistence

The other methods can be used to modify a component:

Methods Description
create(Component component) Create the component supplied as input and return the one actually created
update(Component component) Modify the component supplied as input
Methods Description
changeClass(Component component, String classId) Modify the class of the component supplied as input and propagate only the tags in common between the initial class and the new one
getClassId(Component component) Get component class value otherwise empty
setClassId(Component component, String classId) Set component class
getStatus(Component component) Get component status value
setStatus(Component component, Status status) Set component status value
Methods Description
getTagValue(Component component, String tagName) Get the first tag value otherwise null
getTagValues(Component component, String tagName) Get the list of tag values otherwise null
setTagValue(Component component, String tagName, String value) Set a tag value by modifying its value if it exists, otherwise by adding a tag
setTagValues(Component component, String tagName, List<String> values) Set the list of tag values by modifying its value if it exists, otherwise by adding a tag
setTagReadOnly(Component component, String tagName, boolean readonly) Set a tag to read-only or read-write
addTagValues(Component component, String tagName, List<String> values) Add a list of values to an existing tag or add the tag
Methods Description
getAnswerId(Task task) Get the last answer applied to a task
getAttachments(Task task) Get the components attached to the task