it.sistematica.isharedoc.service
Interface InstanceService

All Known Implementing Classes:
InstanceServiceImpl

public interface InstanceService

The Interface InstanceService.


Method Summary
 void addFile(ItemInstance instance, java.lang.String fileSetName, File file)
          Adds the file.
 void addFiles(ItemInstance instance, java.lang.String fileSetName, java.util.Collection<? extends File> files)
          Adds the files.
 void addFiles(ItemInstance instance, java.lang.String fileSetName, File... files)
          Adds the files.
 ContactInstance addInstanceContact(ItemInstance instance, ContactInstance.DestinationType destinationType, Contact contact)
          Adds the instance contact.
 ContactInstance addInstanceContact(ItemInstance instance, ContactInstance.DestinationType destinationType, LocationAttribute location)
          Adds the instance contact.
 ContactInstance addInstanceContact(ItemInstance instance, ContactInstance.DestinationType destinationType, Organization organization, ContactInstance parent)
          Adds the instance contact.
 ContactInstance addInstanceContact(ItemInstance instance, ContactInstance.DestinationType destinationType, java.lang.String contactDescription)
          Adds the instance contact.
 ContactInstance addInstanceContact(ItemInstance instance, ContactInstance.DestinationType destinationType, it.neverworks.security.User user, ContactInstance parent)
          Adds the instance contact.
 ContactInstance addInstanceContact(ItemInstance instance, ContactInstance contactInstance)
          Adds the instance contact.
 ContactInstance addInstanceContactOrganization(ItemInstance instance, ContactInstance.DestinationType destinationType, java.lang.String organizationId, ContactInstance parent)
          Adds the instance contact organization.
 ContactInstance addInstanceContactOrganization(java.lang.String instanceId, ContactInstance.DestinationType destinationType, java.lang.String organizationId, ContactInstance parent)
          Adds the instance contact organization.
 ContactInstance addInstanceContactUserOrganization(java.lang.String instanceId, ContactInstance.DestinationType destinationType, java.lang.String userOrganizationId, ContactInstance parent)
          Adds the instance contact user organization.
 void cleanTrash()
          Clean trash.
 void cleanTrash(MessageBox mbox)
          Clean trash.
 void clearFiles(ItemInstance instance, java.lang.String fileSetName, boolean deleteFromDms)
          Clear files.
 ItemInstance cloneItemInstance(ItemInstance instance, boolean cloneFrom, boolean cloneTo, boolean cloneCc, boolean cloneBcc, boolean cloneAttachments)
          Clone item instance.
 java.util.List<ItemInstance> cloneMultipleItemInstance(ItemInstance instance, boolean spamBccIntoTo, boolean cloneOnlyExternal)
          Clone multiple item instance.
 File createFromAttachment(ItemInstance instance, AttachmentItem ar, ConfidentialityLevel confidentialityLevel)
          Creates the from attachment.
 File createFromAttachment(ItemInstance instance, InstanceBaseAction.AttachmentInfo attachment, ConfidentialityLevel confidentialityLevel)
          Creates the from attachment.
 ItemInstance createItemInstance(Storyboard storyboard, MessageBox mbox, MessageInstance.MessageType msgType, java.util.List<AttachmentItem> attachments, java.util.HashMap<java.lang.String,java.lang.Object> variables)
          Creates the item instance.
 ItemInstance createItemInstance(Storyboard storyboard, MessageBox mbox, MessageInstance.MessageType msgType, java.util.List<AttachmentItem> attachments, java.util.HashMap<java.lang.String,java.lang.Object> variables, boolean startProcess)
          Creates the item instance.
 ItemInstance createItemInstance(Storyboard storyboard, MessageBox mbox, MessageInstance.MessageType msgType, java.util.List<AttachmentItem> attachments, java.util.HashMap<java.lang.String,java.lang.Object> variables, View processLayout)
          Creates the item instance.
 ItemInstance createItemInstance(Storyboard storyboard, MessageBox mbox, MessageInstance.MessageType msgType, java.util.List<AttachmentItem> attachments, java.util.HashMap<java.lang.String,java.lang.Object> variables, View processLayout, boolean startProcess)
          Creates the item instance.
 ItemInstance createItemInstance(java.lang.String storyboardProcessName, MessageBox mbox, MessageInstance.MessageType msgType, java.util.List<AttachmentItem> attachments, java.util.HashMap<java.lang.String,java.lang.Object> variables)
          Creates the item instance.
 ItemInstance createItemInstance(java.lang.String storyboardProcessName, MessageBox mbox, MessageInstance.MessageType msgType, java.util.List<AttachmentItem> attachments, java.util.HashMap<java.lang.String,java.lang.Object> variables, boolean startProcess)
          Creates the item instance.
 ItemInstance createItemInstance(java.lang.String storyboardProcessName, MessageBox mbox, MessageInstance.MessageType msgType, java.util.List<AttachmentItem> attachments, java.util.HashMap<java.lang.String,java.lang.Object> variables, View processLayout)
          Creates the item instance.
 ItemInstance createItemInstance(java.lang.String storyboardProcessName, MessageBox mbox, MessageInstance.MessageType msgType, java.util.List<AttachmentItem> attachments, java.util.HashMap<java.lang.String,java.lang.Object> variables, View processLayout, boolean startProcess)
          Creates the item instance.
 File createItemLink(ItemInstance itemInstance, File destination, java.lang.String newName)
          Creates the item link.
 File createItemLink(ItemInstance itemInstance, File destination, java.lang.String newName, java.lang.String note)
          Creates the item link.
 Document createLocalAttachment(ItemInstance instance, java.lang.String name, java.lang.String contentType, ObjectTemplate objectTemplate, ConfidentialityLevel confidentialityLevel, java.io.InputStream stream, long size)
          Creates the local attachment.
 RemoteDocument createRemoteAttachment(ItemInstance instance, java.lang.String name, CloudFile remoteFile)
          Creates the remote attachment.
 void deleteProcessInstance(ItemInstance instance)
          Delete process instance.
 void exportInstancesXml(java.util.Date fromDate, java.util.Date toDate, java.io.File exportFile)
          Export instances xml.
 void exportInstancesXml(InstancesSet instances, java.io.File exportFile)
          Export instances xml.
 java.util.List<ItemInstance> findByVariableMapValueEquals(java.util.Map<java.lang.String,java.lang.Object> values)
          Find by variable map value equals.
 java.util.List<ItemInstance> findByVariableValueEquals(java.lang.String varName, java.lang.Object varValue)
          Find by variable value equals.
 ContactInstance findContactInstanceById(java.lang.Long id)
          Find contact instance by id.
 MessageInstance findFirstMessageInstanceByAppIdentifierAndYear(java.lang.String appIdentifier, int year)
          Come sopra ma in presenza di duplicati ritorna il primo che trova.
 ItemInstance findInstanceById(java.lang.Long id)
          Find instance by id.
 ItemInstance findInstanceRelated(CloudFile file)
          Find instance related.
 ItemInstance findInstanceRelated(File file)
          Find instance related.
 java.util.Set<ItemInstance> findInstances(CloudFile file)
          Find instances.
 java.util.Set<ItemInstance> findInstances(File file)
          Find instances.
 ItemInstance findItemInstanceByAppIdentifierAndSbCode(java.lang.String appIdentifier, java.lang.String sbCode)
          Find item instance by app identifier and sb code.
 Document findMailEML(MessageInstance messageInstance)
          Find mail eml.
 MessageInstance findMessageInstanceByAppIdentifier(java.lang.String appIdentifier, java.util.Date appIdentifierDate)
          Find message instance by app identifier.
 MessageInstance findMessageInstanceByAppIdentifierAndYear(java.lang.String appIdentifier, int year)
          Find message instance by app identifier and year.
 MessageInstance findMessageInstanceById(java.lang.Long id)
          Find message instance by id.
 MessageServiceInstance findMessageServiceInstanceByAppIdentifier(java.lang.String appIdentifier, java.util.Date appIdentifierDate, javax.mail.internet.InternetAddress recipient, MessageServiceInstance.XmlAutomationType xmlAutomationType)
          Find message service instance by app identifier.
 MessageServiceInstance findMessageServiceInstanceByAppIdentifier(java.lang.String appIdentifier, java.util.Date appIdentifierDate, MessageServiceInstance.XmlAutomationType xmlAutomationType)
          Find message service instance by app identifier.
 java.util.Set<ItemLink> getActiveItemLinks(ItemInstance instance)
          Gets the active item links.
 Document getDocumentByName(ItemInstance instance, java.lang.String attachmentName)
          Gets the document by name.
 File getFile(ItemInstance instance, java.lang.String fileSetName, java.lang.String fileName)
          Gets the file.
 java.util.Set<File> getFiles(ItemInstance instance, java.lang.String fileSetName)
          Gets the files.
 java.util.Set<File> getFilesAll(ItemInstance instance)
          Gets the files all.
 FileSet getFileSet(ItemInstance instance, java.lang.String fileSetName)
          Gets the file set.
 File getInstanceAttachmentFolder(ItemInstance instance)
          Gets the instance attachment folder.
 File getInstanceAttachmentStoryboardFolder(ItemInstance instance, File rootSbFolder)
          Gets the instance attachment storyboard folder.
 it.neverworks.mail.helper.MessageHelper getMessageHelper(MessageInstance messageInstance)
          Gets the message helper.
 FileSet getOrCreateFileSet(ItemInstance instance, java.lang.String fileSetName)
          Gets the or create file set.
 it.neverworks.mail.helper.MessageHelper getOriginalMessagePEC(MessageServiceInstance instance)
          Gets the original message pec.
 java.util.Set<File> getUserFilesAll(ItemInstance instance)
          Gets the user files all.
 boolean itemLinkExists(ItemInstance itemInstance, File destination)
          Item link exists.
 void moveToTrash(ItemInstance instance)
          Move to trash.
 ContactInstance prepareInstanceContactByEmail(javax.mail.internet.InternetAddress email)
          Prepare instance contact by email.
 void recoveryFromTrash(ItemInstance instance)
          Recovery from trash.
 void removeFile(ItemInstance instance, java.lang.String fileSetName, boolean deleteFromDms, File file)
          Removes the file.
 void removeFiles(ItemInstance instance, java.lang.String fileSetName, boolean deleteFromDms, java.util.Collection<? extends File> files)
          Removes the files.
 void removeFiles(ItemInstance instance, java.lang.String fileSetName, boolean deleteFromDms, File... files)
          Removes the files.
 void removeInstanceContact(ContactInstance contactInstance)
          Removes the instance contact.
 void removeInstanceContactOrganization(java.lang.String instanceId, ContactInstance.DestinationType destinationType, java.lang.String organizationId)
          Removes the instance contact organization.
 void removeItemLink(ItemInstance itemInstance, ItemLink link)
          Removes the item link.
 void replaceFiles(ItemInstance instance, java.lang.String fileSetName, boolean deleteFromDms, java.util.Collection<? extends File> files)
          Replace files.
 void replaceFiles(ItemInstance instance, java.lang.String fileSetName, boolean deleteFromDms, File... files)
          Replace files.
 void replicaAttachments(java.lang.String replicaServerId, ItemInstance instance, java.lang.String fileRegEx)
          Replica attachments.
 void restartAssignment(MessageInstance messageInstance, java.util.List<InstanceAssignmentEntry> instanceAssignmentEntries)
          Restart assignment.
 void restartAssignment(MessageInstance messageInstance, java.util.List<InstanceAssignmentEntry> instanceAssignmentEntries, java.util.Map<java.lang.String,java.lang.Object> customVariables)
          Restart assignment.
 void restartAssignmentFromSheet(java.lang.String filePath, ContactInstance parentCi)
          Restart assignment from sheet.
 void restartInstance(ItemInstance instance, boolean preserveProtVariables)
          void exportMessageInstance(Collection instances, OutputStream output, TaskLink link) throws Exception; void importMessageInstance(String appIdentifier, Date appIdentifierDate, String sender, Collection to, Collection cc, Map variables, MessageType messageType, String sConfidentialityLevel, Collection attachments, String orgVersion, boolean isPec, boolean skipCreated) throws Exception; void importMessageInstanceFromSheet(String filePath) throws Exception;
 void restartInstance(ItemInstance instance, boolean preserveProtVariables, Storyboard storyboard)
          Restart instance.
 void resumeProcessInstance(ItemInstance instance)
          Resume process instance.
 void saveItemInstance(ItemInstance instance)
          Save item instance.
 void suspendProcessInstance(ItemInstance instance)
          Suspend process instance.
 void updateItemHistoryVariables(ItemInstance instance, java.util.Map<java.lang.String,java.lang.Object> variables)
          Update item history variables.
 void updateItemHistoryVariables(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> variables)
          Update item history variables.
 void updateStatusById(java.lang.String itemInstanceId, ItemInstance.WorkStatus status, java.lang.String statusDescription)
          Update status by id.
 

Method Detail

getInstanceAttachmentFolder

File getInstanceAttachmentFolder(ItemInstance instance)
Gets the instance attachment folder.

Parameters:
instance - the instance
Returns:
the instance attachment folder

getInstanceAttachmentStoryboardFolder

File getInstanceAttachmentStoryboardFolder(ItemInstance instance,
                                           File rootSbFolder)
Gets the instance attachment storyboard folder.

Parameters:
instance - the instance
rootSbFolder - the root sb folder
Returns:
the instance attachment storyboard folder

findByVariableValueEquals

java.util.List<ItemInstance> findByVariableValueEquals(java.lang.String varName,
                                                       java.lang.Object varValue)
Find by variable value equals.

Parameters:
varName - the var name
varValue - the var value
Returns:
the list

findByVariableMapValueEquals

java.util.List<ItemInstance> findByVariableMapValueEquals(java.util.Map<java.lang.String,java.lang.Object> values)
Find by variable map value equals.

Parameters:
values - the values
Returns:
the list

findMessageInstanceById

MessageInstance findMessageInstanceById(java.lang.Long id)
Find message instance by id.

Parameters:
id - the id
Returns:
the message instance

findInstanceById

ItemInstance findInstanceById(java.lang.Long id)
Find instance by id.

Parameters:
id - the id
Returns:
the item instance

findItemInstanceByAppIdentifierAndSbCode

ItemInstance findItemInstanceByAppIdentifierAndSbCode(java.lang.String appIdentifier,
                                                      java.lang.String sbCode)
Find item instance by app identifier and sb code.

Parameters:
appIdentifier - the app identifier
sbCode - the sb code
Returns:
the item instance

findMessageInstanceByAppIdentifier

MessageInstance findMessageInstanceByAppIdentifier(java.lang.String appIdentifier,
                                                   java.util.Date appIdentifierDate)
Find message instance by app identifier.

Parameters:
appIdentifier - the app identifier
appIdentifierDate - the app identifier date
Returns:
the message instance

findMessageServiceInstanceByAppIdentifier

MessageServiceInstance findMessageServiceInstanceByAppIdentifier(java.lang.String appIdentifier,
                                                                 java.util.Date appIdentifierDate,
                                                                 MessageServiceInstance.XmlAutomationType xmlAutomationType)
Find message service instance by app identifier.

Parameters:
appIdentifier - the app identifier
appIdentifierDate - the app identifier date
xmlAutomationType - the xml automation type
Returns:
the message service instance

findMessageServiceInstanceByAppIdentifier

MessageServiceInstance findMessageServiceInstanceByAppIdentifier(java.lang.String appIdentifier,
                                                                 java.util.Date appIdentifierDate,
                                                                 javax.mail.internet.InternetAddress recipient,
                                                                 MessageServiceInstance.XmlAutomationType xmlAutomationType)
Find message service instance by app identifier.

Parameters:
appIdentifier - the app identifier
appIdentifierDate - the app identifier date
recipient - the recipient
xmlAutomationType - the xml automation type
Returns:
the message service instance

findMessageInstanceByAppIdentifierAndYear

MessageInstance findMessageInstanceByAppIdentifierAndYear(java.lang.String appIdentifier,
                                                          int year)
Find message instance by app identifier and year.

Parameters:
appIdentifier - the app identifier
year - the year
Returns:
the message instance

findFirstMessageInstanceByAppIdentifierAndYear

MessageInstance findFirstMessageInstanceByAppIdentifierAndYear(java.lang.String appIdentifier,
                                                               int year)
Come sopra ma in presenza di duplicati ritorna il primo che trova. Serve a tamponare le registrazioni importate con quelle fatte per prova con lo stesso numero

Parameters:
appIdentifier - the app identifier
year - the year
Returns:
the message instance

findMailEML

Document findMailEML(MessageInstance messageInstance)
Find mail eml.

Parameters:
messageInstance - the message instance
Returns:
the document

createItemInstance

ItemInstance createItemInstance(java.lang.String storyboardProcessName,
                                MessageBox mbox,
                                MessageInstance.MessageType msgType,
                                java.util.List<AttachmentItem> attachments,
                                java.util.HashMap<java.lang.String,java.lang.Object> variables)
Creates the item instance.

Parameters:
storyboardProcessName - the storyboard process name
mbox - the mbox
msgType - the msg type
attachments - the attachments
variables - the variables
Returns:
the item instance

createItemInstance

ItemInstance createItemInstance(java.lang.String storyboardProcessName,
                                MessageBox mbox,
                                MessageInstance.MessageType msgType,
                                java.util.List<AttachmentItem> attachments,
                                java.util.HashMap<java.lang.String,java.lang.Object> variables,
                                View processLayout)
Creates the item instance.

Parameters:
storyboardProcessName - the storyboard process name
mbox - the mbox
msgType - the msg type
attachments - the attachments
variables - the variables
processLayout - the process layout
Returns:
the item instance

createItemInstance

ItemInstance createItemInstance(java.lang.String storyboardProcessName,
                                MessageBox mbox,
                                MessageInstance.MessageType msgType,
                                java.util.List<AttachmentItem> attachments,
                                java.util.HashMap<java.lang.String,java.lang.Object> variables,
                                boolean startProcess)
Creates the item instance.

Parameters:
storyboardProcessName - the storyboard process name
mbox - the mbox
msgType - the msg type
attachments - the attachments
variables - the variables
startProcess - the start process
Returns:
the item instance

createItemInstance

ItemInstance createItemInstance(java.lang.String storyboardProcessName,
                                MessageBox mbox,
                                MessageInstance.MessageType msgType,
                                java.util.List<AttachmentItem> attachments,
                                java.util.HashMap<java.lang.String,java.lang.Object> variables,
                                View processLayout,
                                boolean startProcess)
Creates the item instance.

Parameters:
storyboardProcessName - the storyboard process name
mbox - the mbox
msgType - the msg type
attachments - the attachments
variables - the variables
processLayout - the process layout
startProcess - the start process
Returns:
the item instance

createItemInstance

ItemInstance createItemInstance(Storyboard storyboard,
                                MessageBox mbox,
                                MessageInstance.MessageType msgType,
                                java.util.List<AttachmentItem> attachments,
                                java.util.HashMap<java.lang.String,java.lang.Object> variables)
Creates the item instance.

Parameters:
storyboard - the storyboard
mbox - the mbox
msgType - the msg type
attachments - the attachments
variables - the variables
Returns:
the item instance

createItemInstance

ItemInstance createItemInstance(Storyboard storyboard,
                                MessageBox mbox,
                                MessageInstance.MessageType msgType,
                                java.util.List<AttachmentItem> attachments,
                                java.util.HashMap<java.lang.String,java.lang.Object> variables,
                                boolean startProcess)
Creates the item instance.

Parameters:
storyboard - the storyboard
mbox - the mbox
msgType - the msg type
attachments - the attachments
variables - the variables
startProcess - the start process
Returns:
the item instance

createItemInstance

ItemInstance createItemInstance(Storyboard storyboard,
                                MessageBox mbox,
                                MessageInstance.MessageType msgType,
                                java.util.List<AttachmentItem> attachments,
                                java.util.HashMap<java.lang.String,java.lang.Object> variables,
                                View processLayout)
Creates the item instance.

Parameters:
storyboard - the storyboard
mbox - the mbox
msgType - the msg type
attachments - the attachments
variables - the variables
processLayout - the process layout
Returns:
the item instance

createItemInstance

ItemInstance createItemInstance(Storyboard storyboard,
                                MessageBox mbox,
                                MessageInstance.MessageType msgType,
                                java.util.List<AttachmentItem> attachments,
                                java.util.HashMap<java.lang.String,java.lang.Object> variables,
                                View processLayout,
                                boolean startProcess)
Creates the item instance.

Parameters:
storyboard - the storyboard
mbox - the mbox
msgType - the msg type
attachments - the attachments
variables - the variables
processLayout - the process layout
startProcess - the start process
Returns:
the item instance

cloneItemInstance

ItemInstance cloneItemInstance(ItemInstance instance,
                               boolean cloneFrom,
                               boolean cloneTo,
                               boolean cloneCc,
                               boolean cloneBcc,
                               boolean cloneAttachments)
Clone item instance.

Parameters:
instance - the instance
cloneFrom - the clone from
cloneTo - the clone to
cloneCc - the clone cc
cloneBcc - the clone bcc
cloneAttachments - the clone attachments
Returns:
the item instance

cloneMultipleItemInstance

java.util.List<ItemInstance> cloneMultipleItemInstance(ItemInstance instance,
                                                       boolean spamBccIntoTo,
                                                       boolean cloneOnlyExternal)
Clone multiple item instance.

Parameters:
instance - the instance
spamBccIntoTo - the spam bcc into to
cloneOnlyExternal - the clone only external
Returns:
the list

saveItemInstance

void saveItemInstance(ItemInstance instance)
Save item instance.

Parameters:
instance - the instance

updateStatusById

void updateStatusById(java.lang.String itemInstanceId,
                      ItemInstance.WorkStatus status,
                      java.lang.String statusDescription)
                      throws java.lang.Exception
Update status by id.

Parameters:
itemInstanceId - the item instance id
status - the status
statusDescription - the status description
Throws:
java.lang.Exception - the exception

updateItemHistoryVariables

void updateItemHistoryVariables(java.lang.String id,
                                java.util.Map<java.lang.String,java.lang.Object> variables)
Update item history variables.

Parameters:
id - the id
variables - the variables

updateItemHistoryVariables

void updateItemHistoryVariables(ItemInstance instance,
                                java.util.Map<java.lang.String,java.lang.Object> variables)
Update item history variables.

Parameters:
instance - the instance
variables - the variables

moveToTrash

void moveToTrash(ItemInstance instance)
Move to trash.

Parameters:
instance - the instance

recoveryFromTrash

void recoveryFromTrash(ItemInstance instance)
Recovery from trash.

Parameters:
instance - the instance

findContactInstanceById

ContactInstance findContactInstanceById(java.lang.Long id)
Find contact instance by id.

Parameters:
id - the id
Returns:
the contact instance

prepareInstanceContactByEmail

ContactInstance prepareInstanceContactByEmail(javax.mail.internet.InternetAddress email)
Prepare instance contact by email.

Parameters:
email - the email
Returns:
the contact instance

addInstanceContact

ContactInstance addInstanceContact(ItemInstance instance,
                                   ContactInstance contactInstance)
Adds the instance contact.

Parameters:
instance - the instance
contactInstance - the contact instance
Returns:
the contact instance

addInstanceContact

ContactInstance addInstanceContact(ItemInstance instance,
                                   ContactInstance.DestinationType destinationType,
                                   java.lang.String contactDescription)
Adds the instance contact.

Parameters:
instance - the instance
destinationType - the destination type
contactDescription - the contact description
Returns:
the contact instance

addInstanceContact

ContactInstance addInstanceContact(ItemInstance instance,
                                   ContactInstance.DestinationType destinationType,
                                   Contact contact)
Adds the instance contact.

Parameters:
instance - the instance
destinationType - the destination type
contact - the contact
Returns:
the contact instance

addInstanceContact

ContactInstance addInstanceContact(ItemInstance instance,
                                   ContactInstance.DestinationType destinationType,
                                   LocationAttribute location)
Adds the instance contact.

Parameters:
instance - the instance
destinationType - the destination type
location - the location
Returns:
the contact instance

addInstanceContact

ContactInstance addInstanceContact(ItemInstance instance,
                                   ContactInstance.DestinationType destinationType,
                                   it.neverworks.security.User user,
                                   ContactInstance parent)
Adds the instance contact.

Parameters:
instance - the instance
destinationType - the destination type
user - the user
parent - the parent
Returns:
the contact instance

addInstanceContact

ContactInstance addInstanceContact(ItemInstance instance,
                                   ContactInstance.DestinationType destinationType,
                                   Organization organization,
                                   ContactInstance parent)
Adds the instance contact.

Parameters:
instance - the instance
destinationType - the destination type
organization - the organization
parent - the parent
Returns:
the contact instance

addInstanceContactOrganization

ContactInstance addInstanceContactOrganization(ItemInstance instance,
                                               ContactInstance.DestinationType destinationType,
                                               java.lang.String organizationId,
                                               ContactInstance parent)
Adds the instance contact organization.

Parameters:
instance - the instance
destinationType - the destination type
organizationId - the organization id
parent - the parent
Returns:
the contact instance

addInstanceContactOrganization

ContactInstance addInstanceContactOrganization(java.lang.String instanceId,
                                               ContactInstance.DestinationType destinationType,
                                               java.lang.String organizationId,
                                               ContactInstance parent)
Adds the instance contact organization.

Parameters:
instanceId - the instance id
destinationType - the destination type
organizationId - the organization id
parent - the parent
Returns:
the contact instance

addInstanceContactUserOrganization

ContactInstance addInstanceContactUserOrganization(java.lang.String instanceId,
                                                   ContactInstance.DestinationType destinationType,
                                                   java.lang.String userOrganizationId,
                                                   ContactInstance parent)
Adds the instance contact user organization.

Parameters:
instanceId - the instance id
destinationType - the destination type
userOrganizationId - the user organization id
parent - the parent
Returns:
the contact instance

removeInstanceContact

void removeInstanceContact(ContactInstance contactInstance)
Removes the instance contact.

Parameters:
contactInstance - the contact instance

removeInstanceContactOrganization

void removeInstanceContactOrganization(java.lang.String instanceId,
                                       ContactInstance.DestinationType destinationType,
                                       java.lang.String organizationId)
Removes the instance contact organization.

Parameters:
instanceId - the instance id
destinationType - the destination type
organizationId - the organization id

getMessageHelper

it.neverworks.mail.helper.MessageHelper getMessageHelper(MessageInstance messageInstance)
Gets the message helper.

Parameters:
messageInstance - the message instance
Returns:
the message helper

restartInstance

void restartInstance(ItemInstance instance,
                     boolean preserveProtVariables)
void exportMessageInstance(Collection instances, OutputStream output, TaskLink link) throws Exception; void importMessageInstance(String appIdentifier, Date appIdentifierDate, String sender, Collection to, Collection cc, Map variables, MessageType messageType, String sConfidentialityLevel, Collection attachments, String orgVersion, boolean isPec, boolean skipCreated) throws Exception; void importMessageInstanceFromSheet(String filePath) throws Exception;

Parameters:
instance - the instance
preserveProtVariables - the preserve prot variables

restartInstance

void restartInstance(ItemInstance instance,
                     boolean preserveProtVariables,
                     Storyboard storyboard)
Restart instance.

Parameters:
instance - the instance
preserveProtVariables - the preserve prot variables
storyboard - the storyboard

suspendProcessInstance

void suspendProcessInstance(ItemInstance instance)
Suspend process instance.

Parameters:
instance - the instance

resumeProcessInstance

void resumeProcessInstance(ItemInstance instance)
Resume process instance.

Parameters:
instance - the instance

deleteProcessInstance

void deleteProcessInstance(ItemInstance instance)
Delete process instance.

Parameters:
instance - the instance

restartAssignment

void restartAssignment(MessageInstance messageInstance,
                       java.util.List<InstanceAssignmentEntry> instanceAssignmentEntries)
                       throws java.lang.Exception
Restart assignment.

Parameters:
messageInstance - the message instance
instanceAssignmentEntries - the instance assignment entries
Throws:
java.lang.Exception - the exception

restartAssignment

void restartAssignment(MessageInstance messageInstance,
                       java.util.List<InstanceAssignmentEntry> instanceAssignmentEntries,
                       java.util.Map<java.lang.String,java.lang.Object> customVariables)
                       throws java.lang.Exception
Restart assignment.

Parameters:
messageInstance - the message instance
instanceAssignmentEntries - the instance assignment entries
customVariables - the custom variables
Throws:
java.lang.Exception - the exception

restartAssignmentFromSheet

void restartAssignmentFromSheet(java.lang.String filePath,
                                ContactInstance parentCi)
                                throws java.lang.Exception
Restart assignment from sheet.

Parameters:
filePath - the file path
parentCi - the parent ci
Throws:
java.lang.Exception - the exception

cleanTrash

void cleanTrash()
Clean trash.


cleanTrash

void cleanTrash(MessageBox mbox)
Clean trash.

Parameters:
mbox - the mbox

getOriginalMessagePEC

it.neverworks.mail.helper.MessageHelper getOriginalMessagePEC(MessageServiceInstance instance)
Gets the original message pec.

Parameters:
instance - the instance
Returns:
the original message pec

createFromAttachment

File createFromAttachment(ItemInstance instance,
                          InstanceBaseAction.AttachmentInfo attachment,
                          ConfidentialityLevel confidentialityLevel)
Creates the from attachment.

Parameters:
instance - the instance
attachment - the attachment
confidentialityLevel - the confidentiality level
Returns:
the file

createFromAttachment

File createFromAttachment(ItemInstance instance,
                          AttachmentItem ar,
                          ConfidentialityLevel confidentialityLevel)
Creates the from attachment.

Parameters:
instance - the instance
ar - the ar
confidentialityLevel - the confidentiality level
Returns:
the file

createRemoteAttachment

RemoteDocument createRemoteAttachment(ItemInstance instance,
                                      java.lang.String name,
                                      CloudFile remoteFile)
Creates the remote attachment.

Parameters:
instance - the instance
name - the name
remoteFile - the remote file
Returns:
the remote document

createLocalAttachment

Document createLocalAttachment(ItemInstance instance,
                               java.lang.String name,
                               java.lang.String contentType,
                               ObjectTemplate objectTemplate,
                               ConfidentialityLevel confidentialityLevel,
                               java.io.InputStream stream,
                               long size)
Creates the local attachment.

Parameters:
instance - the instance
name - the name
contentType - the content type
objectTemplate - the object template
confidentialityLevel - the confidentiality level
stream - the stream
size - the size
Returns:
the document

getFile

File getFile(ItemInstance instance,
             java.lang.String fileSetName,
             java.lang.String fileName)
Gets the file.

Parameters:
instance - the instance
fileSetName - the file set name
fileName - the file name
Returns:
the file

getFiles

java.util.Set<File> getFiles(ItemInstance instance,
                             java.lang.String fileSetName)
Gets the files.

Parameters:
instance - the instance
fileSetName - the file set name
Returns:
the files

getUserFilesAll

java.util.Set<File> getUserFilesAll(ItemInstance instance)
Gets the user files all.

Parameters:
instance - the instance
Returns:
the user files all

getFilesAll

java.util.Set<File> getFilesAll(ItemInstance instance)
Gets the files all.

Parameters:
instance - the instance
Returns:
the files all

getFileSet

FileSet getFileSet(ItemInstance instance,
                   java.lang.String fileSetName)
Gets the file set.

Parameters:
instance - the instance
fileSetName - the file set name
Returns:
the file set

getOrCreateFileSet

FileSet getOrCreateFileSet(ItemInstance instance,
                           java.lang.String fileSetName)
Gets the or create file set.

Parameters:
instance - the instance
fileSetName - the file set name
Returns:
the or create file set

addFile

void addFile(ItemInstance instance,
             java.lang.String fileSetName,
             File file)
Adds the file.

Parameters:
instance - the instance
fileSetName - the file set name
file - the file

addFiles

void addFiles(ItemInstance instance,
              java.lang.String fileSetName,
              File... files)
Adds the files.

Parameters:
instance - the instance
fileSetName - the file set name
files - the files

addFiles

void addFiles(ItemInstance instance,
              java.lang.String fileSetName,
              java.util.Collection<? extends File> files)
Adds the files.

Parameters:
instance - the instance
fileSetName - the file set name
files - the files

removeFile

void removeFile(ItemInstance instance,
                java.lang.String fileSetName,
                boolean deleteFromDms,
                File file)
Removes the file.

Parameters:
instance - the instance
fileSetName - the file set name
deleteFromDms - the delete from dms
file - the file

removeFiles

void removeFiles(ItemInstance instance,
                 java.lang.String fileSetName,
                 boolean deleteFromDms,
                 File... files)
Removes the files.

Parameters:
instance - the instance
fileSetName - the file set name
deleteFromDms - the delete from dms
files - the files

removeFiles

void removeFiles(ItemInstance instance,
                 java.lang.String fileSetName,
                 boolean deleteFromDms,
                 java.util.Collection<? extends File> files)
Removes the files.

Parameters:
instance - the instance
fileSetName - the file set name
deleteFromDms - the delete from dms
files - the files

replaceFiles

void replaceFiles(ItemInstance instance,
                  java.lang.String fileSetName,
                  boolean deleteFromDms,
                  File... files)
Replace files.

Parameters:
instance - the instance
fileSetName - the file set name
deleteFromDms - the delete from dms
files - the files

replaceFiles

void replaceFiles(ItemInstance instance,
                  java.lang.String fileSetName,
                  boolean deleteFromDms,
                  java.util.Collection<? extends File> files)
Replace files.

Parameters:
instance - the instance
fileSetName - the file set name
deleteFromDms - the delete from dms
files - the files

clearFiles

void clearFiles(ItemInstance instance,
                java.lang.String fileSetName,
                boolean deleteFromDms)
Clear files.

Parameters:
instance - the instance
fileSetName - the file set name
deleteFromDms - the delete from dms

getDocumentByName

Document getDocumentByName(ItemInstance instance,
                           java.lang.String attachmentName)
Gets the document by name.

Parameters:
instance - the instance
attachmentName - the attachment name
Returns:
the document by name

findInstances

java.util.Set<ItemInstance> findInstances(File file)
Find instances.

Parameters:
file - the file
Returns:
the sets the

findInstances

java.util.Set<ItemInstance> findInstances(CloudFile file)
Find instances.

Parameters:
file - the file
Returns:
the sets the

findInstanceRelated

ItemInstance findInstanceRelated(File file)
Find instance related.

Parameters:
file - the file
Returns:
the item instance

findInstanceRelated

ItemInstance findInstanceRelated(CloudFile file)
Find instance related.

Parameters:
file - the file
Returns:
the item instance

replicaAttachments

void replicaAttachments(java.lang.String replicaServerId,
                        ItemInstance instance,
                        java.lang.String fileRegEx)
Replica attachments.

Parameters:
replicaServerId - the replica server id
instance - the instance
fileRegEx - the file reg ex

exportInstancesXml

void exportInstancesXml(InstancesSet instances,
                        java.io.File exportFile)
                        throws java.io.IOException
Export instances xml.

Parameters:
instances - the instances
exportFile - the export file
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

exportInstancesXml

void exportInstancesXml(java.util.Date fromDate,
                        java.util.Date toDate,
                        java.io.File exportFile)
                        throws java.io.IOException
Export instances xml.

Parameters:
fromDate - the from date
toDate - the to date
exportFile - the export file
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

removeItemLink

void removeItemLink(ItemInstance itemInstance,
                    ItemLink link)
Removes the item link.

Parameters:
itemInstance - the item instance
link - the link

createItemLink

File createItemLink(ItemInstance itemInstance,
                    File destination,
                    java.lang.String newName)
Creates the item link.

Parameters:
itemInstance - the item instance
destination - the destination
newName - the new name
Returns:
the it.sistematica.isharedoc.model.dms. file

createItemLink

File createItemLink(ItemInstance itemInstance,
                    File destination,
                    java.lang.String newName,
                    java.lang.String note)
Creates the item link.

Parameters:
itemInstance - the item instance
destination - the destination
newName - the new name
note - the note
Returns:
the it.sistematica.isharedoc.model.dms. file

itemLinkExists

boolean itemLinkExists(ItemInstance itemInstance,
                       File destination)
Item link exists.

Parameters:
itemInstance - the item instance
destination - the destination
Returns:
true, if successful

getActiveItemLinks

java.util.Set<ItemLink> getActiveItemLinks(ItemInstance instance)
Gets the active item links.

Parameters:
instance - the instance
Returns:
the active item links