public class ImportMigrationExternalEntryImpl extends ImportMigrationEntryImpl
ImportMigrationEntry representing an external file that was exported.restoredMETADATA_CHECKSUM, METADATA_FILES, METADATA_FILTERED, METADATA_FOLDER, METADATA_LAST_MODIFIED, METADATA_NAME, METADATA_PROPERTY, METADATA_REFERENCE, METADATA_SOFTLINK| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
The superclass implementation is sufficient for our needs.
|
protected Optional<InputStream> |
getInputStream(boolean checkAccess) |
long |
getLastModifiedTime()
Gets the last modification time of the entry.
|
int |
hashCode()
The superclass implementation is sufficient for our needs.
|
boolean |
restore(boolean required)
Restores this entry's content underneath the distribution root directory based on this entry's
path which can include sub-directories.
|
boolean |
restore(boolean required,
PathMatcher filter)
Restores all entries that recursively match the provided path filter underneath the
distribution root directory based on this entry's path which can include sub-directories.
|
protected String |
toDebugString()
Gets a debug string to represent this entry.
|
getAbsolutePath, getContext, getFile, getInputStream, getName, getPath, getPropertyReferencedEntry, getReport, isDirectory, isFile, restorecompareTo, getId, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitrestore, restoregetIdcompareTopublic long getLastModifiedTime()
MigrationEntrygetLastModifiedTime in interface MigrationEntrygetLastModifiedTime in class ImportMigrationEntryImplpublic boolean restore(boolean required)
ImportMigrationEntryThis entry's sub-directories (if any) will be created if they don't already exist. The destination file will be overwritten if it already exists.
All errors and warnings are automatically recorded with the associated migration report.
Errors can be reported in two ways:
MigrationException
(e.g. failure to write to the exported file)
false
is returned from this method. This allows for the accumulation of as many issues
as possible to report to the user before aborting the operation.
Note: If this entry represents a directory which had been completely exported using
ExportMigrationEntry.store() or ExportMigrationEntry.store(boolean) then in
addition to restoring all entries recursively, calling this method will also remove any
existing files or directories that were not on the original system.
Note: Calling restore() twice will not restore the entry two times. The
second time it is called, the same result will be returned as the first time no matter which
restore() method was called.
restore in interface ImportMigrationEntryrestore in class ImportMigrationEntryImplrequired - true if the file or directory is required to exist in the export
and if it doesn't an error should be recorded; false if the file or directory
is optional and may not be exported in which case calling this method will do nothingtrue if no errors were recorded as a result of processing this command;
false otherwisepublic boolean restore(boolean required,
PathMatcher filter)
ImportMigrationEntryrequired
parameter is interpreted for recording errors and deciding what to return.
This entry's sub-directories (if any) will be created if they don't already exist. The destination file will be overwritten if it already exists.
All errors and warnings are automatically recorded with the associated migration report.
Errors can be reported in two ways:
MigrationException
(e.g. failure to write to the exported file)
false
is returned from this method. This allows for the accumulation of as many issues
as possible to report to the user before aborting the operation.
Note: Calling restore() twice will not restore the entry two times. The
second time it is called, the same result will be returned as the first time no matter which
restore() method was called.
restore in interface ImportMigrationEntryrestore in class ImportMigrationEntryImplrequired - true if the file or directory is required to exist in the export
and if it doesn't an error should be recorded; false if the file or directory
is optional and may not be exported in which case calling this method will do nothingfilter - the path filter to usetrue if no errors were recorded as a result of processing this command;
false otherwiseprotected Optional<InputStream> getInputStream(boolean checkAccess) throws IOException
getInputStream in class ImportMigrationEntryImplIOExceptionprotected String toDebugString()
ImportMigrationEntryImpltoDebugString in class ImportMigrationEntryImplpublic boolean equals(Object o)
equals in class ImportMigrationEntryImplo - the object to checkpublic int hashCode()
hashCode in class ImportMigrationEntryImplThis work is licensed under a Creative Commons Attribution 4.0 International License.