|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sam.rules.ModusOperandi.Opus | +--sam.core.Unstorer
General-purpose class implementing the unstoring procedure.
Field Summary |
Fields inherited from class sam.rules.ModusOperandi.Opus |
name |
Constructor Summary | |
protected |
Unstorer(java.lang.String name)
|
Method Summary | |
protected void |
checkUserAndGroup(java.lang.String creatorUser,
java.lang.String creatorGroup,
java.lang.String currentUser,
java.lang.String currentGroup)
Checks user and group information. |
protected java.io.InputStream |
open(sam.rules.ModusOperandi modusOperandi,
java.io.InputStream input)
Opens the encoded data and turns it to a plain data stream |
protected java.io.InputStream |
openArchive(java.io.File archive,
java.io.File temporaryDirectory)
Opens the encoded data from the archive. |
protected void |
printComment(java.lang.String comment)
Prints the comment, if any. |
protected java.util.jar.JarOutputStream |
process(sam.rules.ModusOperandi modusOperandi)
|
protected void |
unstore(sam.entry.Enumerator files,
sam.entry.List wildcards,
java.io.File actualDirectory,
java.io.InputStream input,
sam.event.EventNotifier eventNotifier)
Unstores specified entries. |
protected abstract void |
unstoreEntry(java.io.InputStream data,
sam.entry.Entry entry,
java.io.File actualDirectory,
sam.event.FileEventNotifier fileEventNotifier)
Unstores an entry. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected Unstorer(java.lang.String name)
Method Detail |
protected java.util.jar.JarOutputStream process(sam.rules.ModusOperandi modusOperandi)
process
in class ModusOperandi.Opus
protected void printComment(java.lang.String comment)
comment
- the non-null
commentprotected void checkUserAndGroup(java.lang.String creatorUser, java.lang.String creatorGroup, java.lang.String currentUser, java.lang.String currentGroup)
creatorUser
- the system-dependent user who created the archivecreatorGroup
- the system-dependent group of the user who created the archivecurrentUser
- the system-dependent user who is currently running the applicationcurrentGroup
- the system-dependent group of the user who is currently running the applicationprotected java.io.InputStream openArchive(java.io.File archive, java.io.File temporaryDirectory)
archive
- the archivetemporaryDirectory
- a writable temporary directory in case of data pre-extractionprotected java.io.InputStream open(sam.rules.ModusOperandi modusOperandi, java.io.InputStream input) throws java.io.IOException
modusOperandi
- the modus operandi containing the application settingsinput
- the encoded data
java.io.IOException
protected void unstore(sam.entry.Enumerator files, sam.entry.List wildcards, java.io.File actualDirectory, java.io.InputStream input, sam.event.EventNotifier eventNotifier) throws java.io.IOException
files
- the catalog of all entries contained in the archivewildcards
- the filename filter specifying which entries to extractactualDirectory
- the base directory to extract files intoinput
- the decoded data streameventNotifier
- the event notifier to handle events
java.io.IOException
protected abstract void unstoreEntry(java.io.InputStream data, sam.entry.Entry entry, java.io.File actualDirectory, sam.event.FileEventNotifier fileEventNotifier) throws java.io.IOException
data
- the decoded data streamentry
- the entry to be processedactualDirectory
- the base directory to extract files into
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |