Package com.logicaldoc.impex
Class Archive
- java.lang.Object
-
- com.logicaldoc.core.PersistentObject
-
- com.logicaldoc.impex.Archive
-
- All Implemented Interfaces:
Serializable
public class Archive extends com.logicaldoc.core.PersistentObject implements Serializable
This class represents archives.
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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intCUSTOMID_IMPORT_AND_NEW_DOCUMENTstatic intCUSTOMID_IMPORT_AND_NEW_RELEASEstatic intCUSTOMID_IMPORT_AND_NEW_SUBVERSIONstatic intCUSTOMID_NOT_IMPORTstatic intMODE_EXPORTstatic intMODE_IMPORTstatic intSTATUS_CLOSEDstatic intSTATUS_ERRORstatic intSTATUS_FINALIZEDstatic intSTATUS_OPENEDstatic intSTATUS_READY_TO_IMPORTstatic intSTATUS_READYTOSIGNstatic intTYPE_DEFAULT
-
Constructor Summary
Constructors Constructor Description Archive()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddEntry(com.logicaldoc.core.document.Version newVersion)Adds a new entryLonggetCloserId()The archive closer idStringgetCloserName()The archive closer nameDategetClosure()The archive's closure dateDategetCreation()The archive's creation datelonggetCreatorId()The archive creator idStringgetCreatorName()The archive creator nameStringgetDescription()The archive descriptionSet<com.logicaldoc.core.document.Version>getEntries()com.logicaldoc.core.document.VersiongetEntry(long versionId)Long[]getEntryIds()intgetImportCustomId()intgetImportTemplate()intgetMode()StringgetName()The archive name.longgetSize()Archive dimension in bytes, that is the sum of sizes of all document plus the size of all metadata filesintgetStatus()The archive statusintgetType()The archive typevoidsetCloserId(Long closerId)voidsetCloserName(String closerName)voidsetClosure(Date closure)voidsetCreation(Date creation)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)voidsetName(String name)voidsetSize(long size)voidsetStatus(int status)voidsetType(int type)
-
-
-
Field Detail
-
STATUS_OPENED
public static int STATUS_OPENED
-
STATUS_READY_TO_IMPORT
public static int STATUS_READY_TO_IMPORT
-
STATUS_CLOSED
public static int STATUS_CLOSED
-
STATUS_FINALIZED
public static int STATUS_FINALIZED
-
STATUS_READYTOSIGN
public static int STATUS_READYTOSIGN
-
STATUS_ERROR
public static int STATUS_ERROR
-
TYPE_DEFAULT
public static int TYPE_DEFAULT
-
MODE_IMPORT
public static int MODE_IMPORT
-
MODE_EXPORT
public static int MODE_EXPORT
-
CUSTOMID_NOT_IMPORT
public static int CUSTOMID_NOT_IMPORT
-
CUSTOMID_IMPORT_AND_NEW_RELEASE
public static int CUSTOMID_IMPORT_AND_NEW_RELEASE
-
CUSTOMID_IMPORT_AND_NEW_SUBVERSION
public static int CUSTOMID_IMPORT_AND_NEW_SUBVERSION
-
CUSTOMID_IMPORT_AND_NEW_DOCUMENT
public static int CUSTOMID_IMPORT_AND_NEW_DOCUMENT
-
-
Method Detail
-
getName
public String getName()
The archive name. Also alternative identifier- Returns:
- the name of the archive
-
setName
public void setName(String name)
-
getDescription
public String getDescription()
The archive description- Returns:
- the description
-
setDescription
public void setDescription(String description)
-
getCreation
public Date getCreation()
The archive's creation date- Returns:
- the creation date
-
setCreation
public void setCreation(Date creation)
-
getStatus
public int getStatus()
The archive status- Returns:
- the status
- See Also:
STATUS_OPENED,STATUS_CLOSED,STATUS_FINALIZED,STATUS_READYTOSIGN,STATUS_ERROR
-
setStatus
public void setStatus(int status)
-
getEntryIds
public Long[] getEntryIds()
-
getEntry
public com.logicaldoc.core.document.Version getEntry(long versionId)
-
getEntries
public Set<com.logicaldoc.core.document.Version> getEntries()
-
setEntries
public void setEntries(Set<com.logicaldoc.core.document.Version> entries)
-
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:
TYPE_DEFAULT
-
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
public String getCreatorName()
The archive creator name- Returns:
- name of the creator user
-
setCreatorName
public void setCreatorName(String creatorName)
-
getCloserId
public Long getCloserId()
The archive closer id- Returns:
- identifier of the user that closed the archive
-
setCloserId
public void setCloserId(Long closerId)
-
getCloserName
public String getCloserName()
The archive closer name- Returns:
- name of the user that closed the archive
-
setCloserName
public void setCloserName(String closerName)
-
getClosure
public Date getClosure()
The archive's closure date- Returns:
- the closure date
-
setClosure
public void setClosure(Date closure)
-
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)
-
-