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:
 - OPEN: the default status
- CLOSED: when the archive is ready to be build
- FINALIZED: the archive is completed
- READYTOSIGN: the 'store' archive is ready to be marked temporally
 
- TYPE_DEFAULT: the default status. It will be not signed temporally.
- Since:
- 4.5
- Author:
- Matteo Caruso - LogicalDOC
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intOn existing CustomID import as new documentstatic final intOn existing CustomID import as new major versionstatic final intOn existing CustomID import as new minor versionstatic final intOn existing CustomID skipstatic final intMode to mark the archive as exportstatic final intMode to mark the archive as importstatic final intStatus of the export archive when it is closed and you cannot put more files in itstatic final intThe archive is set to error status if have occurred errors in the import/export operations.static final intStatus of the export archive has been completely builtstatic final intStatus of the export archive when it is open and you can put more files in itstatic final intStatus of the export archive when it is ready to be importedstatic final intStatus of the export archive is ready to be signedstatic final intThe archive's default typeFields inherited from class com.logicaldoc.core.PersistentObjectDELETED_CODE_DEFAULT, DELETED_CODE_STRONG, id
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanaddEntry(com.logicaldoc.core.document.Version newVersion) Adds a new entrybooleanThe archive closer idThe archive closer nameThe archive's closure datelongThe archive creator idThe archive creator nameThe archive descriptionSet<com.logicaldoc.core.document.Version> com.logicaldoc.core.document.VersiongetEntry(long versionId) intintintgetMode()getName()The archive name.longgetSize()Archive dimension in bytes, that is the sum of sizes of all document plus the size of all metadata filesintThe archive statusintgetType()The archive typeinthashCode()voidsetCloserId(Long closerId) voidsetCloserName(String closerName) voidsetClosure(Date closure) voidsetCreatorId(long creatorId) voidsetCreatorName(String creatorName) voidsetDescription(String description) voidsetEntries(Set<com.logicaldoc.core.document.Version> entries) voidsetImportCustomId(int importCustomId) voidsetImportTemplate(int importTemplate) voidsetMode(int mode) voidvoidsetSize(long size) voidsetStatus(int status) voidsetType(int type) Methods inherited from class com.logicaldoc.core.PersistentObjectgetCreation, getDeleted, getId, getLastModified, getRecordVersion, getTenantId, setCreation, setDeleted, setId, setLastModified, setRecordVersion, setTenantId, toString
- 
Field Details- 
STATUS_OPENpublic static final int STATUS_OPENStatus of the export archive when it is open and you can put more files in it- See Also:
 
- 
STATUS_CLOSEDpublic static final int STATUS_CLOSEDStatus of the export archive when it is closed and you cannot put more files in it- See Also:
 
- 
STATUS_FINALIZEDpublic static final int STATUS_FINALIZEDStatus of the export archive has been completely built- See Also:
 
- 
STATUS_READYTOSIGNpublic static final int STATUS_READYTOSIGNStatus of the export archive is ready to be signed- See Also:
 
- 
STATUS_READY_TO_IMPORTpublic static final int STATUS_READY_TO_IMPORTStatus of the export archive when it is ready to be imported- See Also:
 
- 
STATUS_ERRORpublic static final int STATUS_ERRORThe archive is set to error status if have occurred errors in the import/export operations.- See Also:
 
- 
TYPE_DEFAULTpublic static final int TYPE_DEFAULTThe archive's default type- See Also:
 
- 
MODE_IMPORTpublic static final int MODE_IMPORTMode to mark the archive as import- See Also:
 
- 
MODE_EXPORTpublic static final int MODE_EXPORTMode to mark the archive as export- See Also:
 
- 
CUSTOMID_NOT_IMPORTpublic static final int CUSTOMID_NOT_IMPORTOn existing CustomID skip- See Also:
 
- 
CUSTOMID_IMPORT_AND_NEW_RELEASEpublic static final int CUSTOMID_IMPORT_AND_NEW_RELEASEOn existing CustomID import as new major version- See Also:
 
- 
CUSTOMID_IMPORT_AND_NEW_SUBVERSIONpublic static final int CUSTOMID_IMPORT_AND_NEW_SUBVERSIONOn existing CustomID import as new minor version- See Also:
 
- 
CUSTOMID_IMPORT_AND_NEW_DOCUMENTpublic static final int CUSTOMID_IMPORT_AND_NEW_DOCUMENTOn existing CustomID import as new document- See Also:
 
 
- 
- 
Constructor Details- 
Archivepublic Archive()
 
- 
- 
Method Details- 
getNameThe archive name. Also alternative identifier- Returns:
- the name of the archive
 
- 
setName
- 
getDescriptionThe archive description- Returns:
- the description
 
- 
setDescription
- 
getStatuspublic int getStatus()The archive status- Returns:
- the status
- See Also:
 
- 
setStatuspublic void setStatus(int status) 
- 
getEntryIds
- 
getEntrypublic com.logicaldoc.core.document.Version getEntry(long versionId) 
- 
getEntries
- 
setEntries
- 
getSizepublic 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
 
- 
setSizepublic void setSize(long size) 
- 
addEntrypublic 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
 
- 
getTypepublic int getType()The archive type- Returns:
- the type
- See Also:
 
- 
setTypepublic void setType(int type) 
- 
getCreatorIdpublic long getCreatorId()The archive creator id- Returns:
- identifier of the creator user
 
- 
setCreatorIdpublic void setCreatorId(long creatorId) 
- 
getCreatorNameThe archive creator name- Returns:
- name of the creator user
 
- 
setCreatorName
- 
getCloserIdThe archive closer id- Returns:
- identifier of the user that closed the archive
 
- 
setCloserId
- 
getCloserNameThe archive closer name- Returns:
- name of the user that closed the archive
 
- 
setCloserName
- 
getClosureThe archive's closure date- Returns:
- the closure date
 
- 
setClosure
- 
getModepublic int getMode()
- 
setModepublic void setMode(int mode) 
- 
getImportTemplatepublic int getImportTemplate()
- 
setImportTemplatepublic void setImportTemplate(int importTemplate) 
- 
getImportCustomIdpublic int getImportCustomId()
- 
setImportCustomIdpublic void setImportCustomId(int importCustomId) 
- 
hashCodepublic int hashCode()- Overrides:
- hashCodein class- com.logicaldoc.core.PersistentObject
 
- 
equals- Overrides:
- equalsin class- com.logicaldoc.core.PersistentObject
 
 
-