Class InboxExportDescriptor
- java.lang.Object
-
- de.xima.fc.gui.bean.export.inbox.model.InboxExportDescriptor
-
- All Implemented Interfaces:
Serializable
public class InboxExportDescriptor extends Object implements Serializable
Model for a single inbox data export.- Since:
- 8.5.4
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static DateTimeFormatterDEFAULT_DT_FORMATTERstatic StringINFO_FILE_NAME
-
Constructor Summary
Constructors Constructor Description InboxExportDescriptor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longcalcSecondsToKeep()StringexportSize(Locale locale)LocalDateTimegetCreatedAt()longgetCreatedAtTimestamp()StringgetCreatedBy()intgetDaysToKeep()LocalDateTimegetDeletedAt()longgetExportByteCount()StringgetExportName()StringgetExportPath()EInboxExportScopegetExportScope()StringgetId()LonggetMandantId()booleanisInProgress()static InboxExportDescriptorreadDescriptor(Path exportDescriptorPath)Creates an export descriptor instance by deserializing the data found under the provided path.voidremoveDescriptor()Removes this export descriptor from the file system, using the path the descriptor provides.voidsetCreatedAtTimestamp(long createdAtTimestamp)voidsetCreatedBy(String createdBy)voidsetDaysToKeep(int daysToKeep)voidsetExportName(String exportName)voidsetExportPath(String exportPath)voidsetExportScope(EInboxExportScope exportScope)voidsetId(String id)voidsetInProgress(boolean inProgress)voidsetMandantId(Long mandantId)voidstoreDescriptor()Serializes this export descriptor to the file system, using the path the descriptor provides.StringtoString()
-
-
-
Field Detail
-
INFO_FILE_NAME
public static final String INFO_FILE_NAME
- See Also:
- Constant Field Values
-
DEFAULT_DT_FORMATTER
public static final DateTimeFormatter DEFAULT_DT_FORMATTER
-
-
Method Detail
-
readDescriptor
public static InboxExportDescriptor readDescriptor(Path exportDescriptorPath) throws IOException
Creates an export descriptor instance by deserializing the data found under the provided path.- Parameters:
exportDescriptorPath- file system path that points to the description file- Returns:
- the deserialized export descriptor instance
- Throws:
IOException- in case of an I/O error during deserialization
-
storeDescriptor
public void storeDescriptor() throws IOExceptionSerializes this export descriptor to the file system, using the path the descriptor provides.- Throws:
IOException- in case of an I/O error during serialization
-
removeDescriptor
public void removeDescriptor() throws NoSuchFileException, IOExceptionRemoves this export descriptor from the file system, using the path the descriptor provides.- Throws:
NoSuchFileException- if the descriptor file doesn't existIOException- in case of an I/O error during deletion
-
calcSecondsToKeep
public long calcSecondsToKeep()
- Returns:
- the seconds between now and the configured removal of this export, always >= 0
-
getCreatedAt
public LocalDateTime getCreatedAt()
- Returns:
- the date and time this export was created
-
getDeletedAt
public LocalDateTime getDeletedAt()
- Returns:
- the date and time this export will be deleted
-
getExportByteCount
public long getExportByteCount()
- Returns:
- the export's size in bytes
-
exportSize
public String exportSize(Locale locale)
- Parameters:
locale- the locale to be used for the file size formatting- Returns:
- the export's size as a human-readable string
-
getId
public String getId()
-
setId
public void setId(String id)
-
getExportName
public String getExportName()
-
setExportName
public void setExportName(String exportName)
-
getCreatedBy
public String getCreatedBy()
-
setCreatedBy
public void setCreatedBy(String createdBy)
-
getExportPath
public String getExportPath()
-
setExportPath
public void setExportPath(String exportPath)
-
getCreatedAtTimestamp
public long getCreatedAtTimestamp()
-
setCreatedAtTimestamp
public void setCreatedAtTimestamp(long createdAtTimestamp)
-
getDaysToKeep
public int getDaysToKeep()
-
setDaysToKeep
public void setDaysToKeep(int daysToKeep)
-
getExportScope
public EInboxExportScope getExportScope()
-
setExportScope
public void setExportScope(EInboxExportScope exportScope)
-
getMandantId
public Long getMandantId()
-
setMandantId
public void setMandantId(Long mandantId)
-
isInProgress
public boolean isInProgress()
-
setInProgress
public void setInProgress(boolean inProgress)
-
-