Package org.imixs.workflow.office.forms
Class DMSController
java.lang.Object
org.imixs.workflow.office.forms.DMSController
- All Implemented Interfaces:
Serializable
@Named("dmsController")
@ConversationScoped
public class DMSController
extends Object
implements Serializable
This Bean acts a a front controller for the DMS feature. The Bean provides
additional properties for attached files and can also manage information
about file references to external file servers
- Author:
- rsoika
- See Also:
-
org.imixs.workflow.jee.faces.fileupload.FileUploadController- Serialized Form
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.imixs.workflow.engine.DocumentServiceprotected org.imixs.workflow.faces.util.LoginControllerstatic final Stringprotected org.imixs.workflow.faces.data.WorkflowController -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLink(jakarta.faces.event.ActionEvent event) This Method adds a new Link (url) into the DMS list.documentType(String name) List<org.imixs.workflow.ItemCollection>this method returns a list of all attached files and the file meta data provided in a list of ItemCollection.List<org.imixs.workflow.ItemCollection>getDmsListByWorkitem(org.imixs.workflow.ItemCollection workitem) This method returns a list of ItemCollections for all custom attributes of attached files.getLink()voidonWorkflowEvent(org.imixs.workflow.faces.data.WorkflowEvent workflowEvent) WorkflowEvent listener to update the DMS property if a WorkItem has changed, processed or saved.voidremoveFile(String aFile) This method removes a file form the current dms list and also from the workitemvoidreset()Reset the current dms listvoiduserFriendlyBytes(int bytes) Computes the file size into a user friendly format
-
Field Details
-
REGEX_URL_PATTERN
- See Also:
-
loginController
@Inject protected org.imixs.workflow.faces.util.LoginController loginController -
workflowController
@Inject protected org.imixs.workflow.faces.data.WorkflowController workflowController -
documentService
@Inject protected org.imixs.workflow.engine.DocumentService documentService
-
-
Constructor Details
-
DMSController
public DMSController()
-
-
Method Details
-
getLink
-
setLink
-
onWorkflowEvent
public void onWorkflowEvent(@Observes org.imixs.workflow.faces.data.WorkflowEvent workflowEvent) throws org.imixs.workflow.exceptions.AccessDeniedException WorkflowEvent listener to update the DMS property if a WorkItem has changed, processed or saved. The read and write access for a BlobWorkitem will be updated by the org.imixs.marty.plugins.BlobPlugin. The DMSController also updates the file Properties after a workItem was processed. This is because a plug-in can add a new file (like the reportPlugIn), and so the plug-in also updates the $file information of the parent WorkItem. For that reason the DMS property will be updated by the DmsController on the WorkflowEvent WORKITEM_AFTER_PROCESS- Parameters:
workflowEvent-- Throws:
org.imixs.workflow.exceptions.AccessDeniedException
-
getDmsList
this method returns a list of all attached files and the file meta data provided in a list of ItemCollection.- Returns:
- - list of file meta data objects
-
getDmsListByWorkitem
public List<org.imixs.workflow.ItemCollection> getDmsListByWorkitem(org.imixs.workflow.ItemCollection workitem) This method returns a list of ItemCollections for all custom attributes of attached files.The method is used by the DmsController to display the dms meta data.
The method caches the data result internally to avoid multiple calls because of JSF behavior (https://stackoverflow.com/questions/2090033/why-jsf-calls-getters-multiple-times/2090062)
- Parameters:
workitem- - source of meta data, sorted by $creation
-
removeFile
This method removes a file form the current dms list and also from the workitem- Parameters:
aFile-
-
reset
public void reset()Reset the current dms list -
addLink
public void addLink(jakarta.faces.event.ActionEvent event) This Method adds a new Link (url) into the DMS list.- Parameters:
event-
-
userFriendlyBytes
Computes the file size into a user friendly format- Parameters:
size-- Returns:
-
documentType
-