Package com.orchestranetworks.service
Class Archive
- java.lang.Object
-
- com.orchestranetworks.service.Archive
-
public abstract class Archive extends Object
An instance of this class references an archive used to export data from / import data to EBX® repositories. For example, it can be used as a backup or to propagate datasets from a repository to another.The implementations of this class are light-weight references to their underlying resources. For example, they do not open a file stream if a file is provided.
-
-
Field Summary
Fields Modifier and Type Field Description static String
DIFF_HEADERS_ZIP_ENTRY
Name of the ZIP entry for header differences.static String
DIFF_RIGHTS_ZIP_ENTRY
Name of the ZIP entry for rights differences.static String
DIFF_VALUES_ZIP_ENTRY
Name of the ZIP entry for value differences.static String
HEADER_DOCUMENT_NAME
Default name of run header XML document.static String
TABLE_VALUES_ZIP_ENTRY
-
Constructor Summary
Constructors Constructor Description Archive()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract InputStream
computeInputStream()
static Archive
forFile(File archiveFile)
Returns a reference to an archive ZIP file.static Archive
forFileInDefaultDirectory(String aLocalFileName)
Returns a reference to an archive ZIP file located under the default archive directory.static Archive
forOutputStream(OutputStream aStream)
Returns a reference to an archive output stream.static Archive
forStream(String locationInfoOrNull, InputStream aStream)
Returns a reference to an archive ZIP stream.abstract String
getLocationInfo()
Returns user-readable information on the location of the archive.String
toString()
-
-
-
Field Detail
-
HEADER_DOCUMENT_NAME
public static final String HEADER_DOCUMENT_NAME
Default name of run header XML document.- See Also:
- Constant Field Values
-
DIFF_HEADERS_ZIP_ENTRY
public static final String DIFF_HEADERS_ZIP_ENTRY
Name of the ZIP entry for header differences.- See Also:
- Constant Field Values
-
DIFF_RIGHTS_ZIP_ENTRY
public static final String DIFF_RIGHTS_ZIP_ENTRY
Name of the ZIP entry for rights differences.- See Also:
- Constant Field Values
-
DIFF_VALUES_ZIP_ENTRY
public static final String DIFF_VALUES_ZIP_ENTRY
Name of the ZIP entry for value differences.- See Also:
- Constant Field Values
-
TABLE_VALUES_ZIP_ENTRY
public static final String TABLE_VALUES_ZIP_ENTRY
- See Also:
- Constant Field Values
-
-
Method Detail
-
forFile
public static Archive forFile(File archiveFile)
Returns a reference to an archive ZIP file.
-
forFileInDefaultDirectory
public static Archive forFileInDefaultDirectory(String aLocalFileName)
Returns a reference to an archive ZIP file located under the default archive directory.The path of this directory is:
${ebx.repository.directory}/archives/
.- Since:
- 5.6.0
- See Also:
- Setting the root directory
-
forStream
public static Archive forStream(String locationInfoOrNull, InputStream aStream)
Returns a reference to an archive ZIP stream. Only to be used for import purposes.
-
forOutputStream
public static Archive forOutputStream(OutputStream aStream)
Returns a reference to an archive output stream. Only to be used for export purposes.
-
computeInputStream
public abstract InputStream computeInputStream() throws FileNotFoundException
- Throws:
FileNotFoundException
-
getLocationInfo
public abstract String getLocationInfo()
Returns user-readable information on the location of the archive.
-
-