Package com.logicaldoc.impex
Class Archive
java.lang.Object
com.logicaldoc.core.PersistentObject
com.logicaldoc.impex.Archive
- All Implemented Interfaces:
Serializable
This class represents archives.
Each archive contains one or more archived documents.
Mode:
Each archive contains one or more archived documents.
Mode:
- MODE_IMPORT: the archive for documents import
- MODE_EXPORT: the archive for documents export
- For Import Archive:
- READY_TO_IMPORT: the initial status, the archive is ready to be imported
- CLOSED: the import task is started, so the archive is read-only
- FINALIZED: the archive import task is completed
- For Export Archive:
- OPENED: the default status
- CLOSED: when the archive is ready to be build
- FINALIZED: the archive is completed
- READYTOSIGN: the 'storage' archive is ready to be marked temporally
- TYPE_DEFAULT: the default status. It will be not signed.
- TYPE_STORAGE: When it is ready to be build, it will signed and marked temporally
- Since:
- 4.5
- Author:
- Matteo Caruso - LogicalDOC
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
On existing CustomID import as new documentstatic final int
On existing CustomID import as new major versionstatic final int
On existing CustomID import as new minor versionstatic final int
On existing CustomID skipstatic final int
Mode to mark the archive as exportstatic final int
Mode to mark the archive as importstatic final int
Status of the export archive when it is closed and you cannot put more files in itstatic final int
The archive is set to error status if have occurred errors in the import/export operations.static final int
Status of the export archive has been completely builtstatic final int
Status of the export archive when it is open and you can put more files in itstatic final int
Status of the export archive when it is ready to be importedstatic final int
Status of the export archive is ready to be signedstatic final int
The archive's default typeFields inherited from class com.logicaldoc.core.PersistentObject
DELETED_CODE_DEFAULT, DELETED_CODE_STRONG
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addEntry
(com.logicaldoc.core.document.Version newVersion) Adds a new entryThe archive closer idThe archive closer nameThe archive's closure datelong
The archive creator idThe archive creator nameThe archive descriptionSet<com.logicaldoc.core.document.Version>
com.logicaldoc.core.document.Version
getEntry
(long versionId) Long[]
int
int
int
getMode()
getName()
The archive name.long
getSize()
Archive dimension in bytes, that is the sum of sizes of all document plus the size of all metadata filesint
The archive statusint
getType()
The archive typevoid
setCloserId
(Long closerId) void
setCloserName
(String closerName) void
setClosure
(Date closure) void
setCreatorId
(long creatorId) void
setCreatorName
(String creatorName) void
setDescription
(String description) void
setEntries
(Set<com.logicaldoc.core.document.Version> entries) void
setImportCustomId
(int importCustomId) void
setImportTemplate
(int importTemplate) void
setMode
(int mode) void
void
setSize
(long size) void
setStatus
(int status) void
setType
(int type) Methods inherited from class com.logicaldoc.core.PersistentObject
equals, getCreation, getDeleted, getId, getLastModified, getRecordVersion, getTenantId, hashCode, setCreation, setDeleted, setId, setLastModified, setRecordVersion, setTenantId, toString
-
Field Details
-
STATUS_OPENED
public static final int STATUS_OPENEDStatus of the export archive when it is open and you can put more files in it- See Also:
-
STATUS_CLOSED
public static final int STATUS_CLOSEDStatus of the export archive when it is closed and you cannot put more files in it- See Also:
-
STATUS_FINALIZED
public static final int STATUS_FINALIZEDStatus of the export archive has been completely built- See Also:
-
STATUS_READYTOSIGN
public static final int STATUS_READYTOSIGNStatus of the export archive is ready to be signed- See Also:
-
STATUS_READY_TO_IMPORT
public static final int STATUS_READY_TO_IMPORTStatus of the export archive when it is ready to be imported- See Also:
-
STATUS_ERROR
public static final int STATUS_ERRORThe archive is set to error status if have occurred errors in the import/export operations.- See Also:
-
TYPE_DEFAULT
public static final int TYPE_DEFAULTThe archive's default type- See Also:
-
MODE_IMPORT
public static final int MODE_IMPORTMode to mark the archive as import- See Also:
-
MODE_EXPORT
public static final int MODE_EXPORTMode to mark the archive as export- See Also:
-
CUSTOMID_NOT_IMPORT
public static final int CUSTOMID_NOT_IMPORTOn existing CustomID skip- See Also:
-
CUSTOMID_IMPORT_AND_NEW_RELEASE
public static final int CUSTOMID_IMPORT_AND_NEW_RELEASEOn existing CustomID import as new major version- See Also:
-
CUSTOMID_IMPORT_AND_NEW_SUBVERSION
public static final int CUSTOMID_IMPORT_AND_NEW_SUBVERSIONOn existing CustomID import as new minor version- See Also:
-
CUSTOMID_IMPORT_AND_NEW_DOCUMENT
public static final int CUSTOMID_IMPORT_AND_NEW_DOCUMENTOn existing CustomID import as new document- See Also:
-
-
Constructor Details
-
Archive
public Archive()
-
-
Method Details
-
getName
The archive name. Also alternative identifier- Returns:
- the name of the archive
-
setName
-
getDescription
The archive description- Returns:
- the description
-
setDescription
-
getStatus
public int getStatus()The archive status- Returns:
- the status
- See Also:
-
setStatus
public void setStatus(int status) -
getEntryIds
-
getEntry
public com.logicaldoc.core.document.Version getEntry(long versionId) -
getEntries
-
setEntries
-
getSize
public long getSize()Archive dimension in bytes, that is the sum of sizes of all document plus the size of all metadata files- Returns:
- the total size of the archive expressed in bytes
-
setSize
public void setSize(long size) -
addEntry
public boolean addEntry(com.logicaldoc.core.document.Version newVersion) Adds a new entry- Parameters:
newVersion
- The version to be added- Returns:
- true if the version was truly added
-
getType
public int getType()The archive type- Returns:
- the type
- See Also:
-
setType
public void setType(int type) -
getCreatorId
public long getCreatorId()The archive creator id- Returns:
- identifier of the creator user
-
setCreatorId
public void setCreatorId(long creatorId) -
getCreatorName
The archive creator name- Returns:
- name of the creator user
-
setCreatorName
-
getCloserId
The archive closer id- Returns:
- identifier of the user that closed the archive
-
setCloserId
-
getCloserName
The archive closer name- Returns:
- name of the user that closed the archive
-
setCloserName
-
getClosure
The archive's closure date- Returns:
- the closure date
-
setClosure
-
getMode
public int getMode() -
setMode
public void setMode(int mode) -
getImportTemplate
public int getImportTemplate() -
setImportTemplate
public void setImportTemplate(int importTemplate) -
getImportCustomId
public int getImportCustomId() -
setImportCustomId
public void setImportCustomId(int importCustomId)
-