|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.stardust.engine.api.runtime.DmsUtils
public class DmsUtils
Utility class for operating DocumentManagementService
| Constructor Summary | |
|---|---|
DmsUtils()
|
|
| Method Summary | |
|---|---|
static ZipOutputStream |
backupToZipFile(Folder rootFolder,
OutputStream outputStream,
DocumentManagementService documentManagementService,
boolean ignoreEmptyFolders,
String partitionId)
Backup a folder to a zip stream |
static void |
cleanupFolder(Folder parentFolder,
DocumentManagementService documentManagementService)
|
static String |
composeDefaultPath(long scopeProcessInstanceOID,
Date scopeProcessInstanceStartTime)
Initialize default path based on the scope process instance OID and its start time. |
static String |
composeDefaultPath(long activityInstanceOID,
long scopeProcessInstanceOID,
Date scopeProcessInstanceStartTime)
Initialize default path based on the activity instance OID, scope process instance OID and its start time. |
static DocumentInfo |
createDocumentInfo(String name)
Creates a new DocumentInfo object that can be filled with additional
information. |
static DocumentInfo |
createDocumentInfo(String name,
String id)
Creates a new DocumentInfo object that can be filled with additional
information. |
static FolderInfo |
createFolderInfo(String name)
Creates a new FolderInfo object that can be filled with additional
information. |
static Folder |
ensureFolderHierarchyExists(String folderPath,
DocumentManagementService dms)
|
static Long |
getActivityInstanceOid(Resource resource)
Retrieves the activity instance oid from a Resource path. |
static Document |
getDocument(List documents,
String id)
|
static Long |
getProcessInstanceOid(Resource resource)
Retrieves the process instance oid from a Resource path. |
static void |
loadFromZipFile(String rootFolderPath,
InputStream inputStream,
DocumentManagementService documentManagementService,
boolean ignoreEmptyFolders)
Load a folder from an inputStream |
static void |
removeDocument(List documents,
String id)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DmsUtils()
| Method Detail |
|---|
public static DocumentInfo createDocumentInfo(String name)
DocumentInfo object that can be filled with additional
information.
name - the document name
public static DocumentInfo createDocumentInfo(String name,
String id)
DocumentInfo object that can be filled with additional
information. This method allows assigning the document ID for the case where no DMS
backend is used (the caller must ensure the uniqueness of IDs)
name - the document nameid - id of the document
public static FolderInfo createFolderInfo(String name)
FolderInfo object that can be filled with additional
information.
name - the folder name
public static Document getDocument(List documents,
String id)
public static void removeDocument(List documents,
String id)
public static String composeDefaultPath(long scopeProcessInstanceOID,
Date scopeProcessInstanceStartTime)
scopeProcessInstanceStartTime - scopeProcessInstanceOID -
public static String composeDefaultPath(long activityInstanceOID,
long scopeProcessInstanceOID,
Date scopeProcessInstanceStartTime)
activityInstanceOID - scopeProcessInstanceStartTime - scopeProcessInstanceOID -
public static Long getActivityInstanceOid(Resource resource)
Resource path.
resource - with ai-oid in path
composeDefaultPath(long, long, Date)public static Long getProcessInstanceOid(Resource resource)
Resource path.
resource - with pi-oid in path
composeDefaultPath(long, Date),
composeDefaultPath(long, long, Date)
public static ZipOutputStream backupToZipFile(Folder rootFolder,
OutputStream outputStream,
DocumentManagementService documentManagementService,
boolean ignoreEmptyFolders,
String partitionId)
throws Exception
rootFolder - folder to backupoutputStream - the stream to use for ZipOutputStreamdocumentManagementService - ignoreEmptyFolders - option to not backup empty folderspartitionId - used for zip comment
Exception
public static void loadFromZipFile(String rootFolderPath,
InputStream inputStream,
DocumentManagementService documentManagementService,
boolean ignoreEmptyFolders)
throws Exception
rootFolderPath - loaded data is saved to this repository pathinputStream - the stream is used to create a new ZipInputStreamdocumentManagementService - ignoreEmptyFolders - option to not create empty folders that exist in the zip stream
Exception
public static void cleanupFolder(Folder parentFolder,
DocumentManagementService documentManagementService)
public static Folder ensureFolderHierarchyExists(String folderPath,
DocumentManagementService dms)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||