|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.virtual.plugins.copy.AbstractCopyMechanism
public abstract class AbstractCopyMechanism
Copy mechanism to be used in VFSUtils.
Constructor Summary | |
---|---|
AbstractCopyMechanism()
|
Method Summary | |
---|---|
protected java.io.File |
copy(java.io.File guidDir,
VirtualFileHandler handler)
Copy handler. |
VirtualFile |
copy(VirtualFile file,
VirtualFileHandler handler)
Copy handler. |
protected java.io.File |
createCopy(java.io.File guidDir,
VirtualFileHandler handler)
Create copy destination. |
protected static java.io.File |
createTempDirectory(java.io.File parent,
java.lang.String name)
Create the temp directory. |
protected abstract void |
doCopy(java.io.File copy,
VirtualFileHandler handler)
Do copy. |
protected static void |
exactCopy(java.io.File copy,
VirtualFileHandler root)
Exact copy. |
protected static void |
explode(java.io.File copy,
VirtualFileHandler root)
Explode the root into file. |
static java.io.File |
getTempDirectory()
Get temp directory. |
protected abstract java.lang.String |
getType()
Get mechanism type. |
protected abstract boolean |
isAlreadyModified(VirtualFileHandler handler)
Is handler already modified. |
protected abstract boolean |
replaceOldHandler(VirtualFileHandler parent,
VirtualFileHandler oldHandler,
VirtualFileHandler newHandler)
Should we replace old handler with new. |
protected static void |
rewrite(VirtualFileHandler handler,
java.io.File file)
Rewrite contents of handler into file. |
protected static void |
unjar(java.io.File copy,
VirtualFileHandler handler)
Unjar to copy parameter. |
protected static void |
unpack(java.io.File copy,
VirtualFileHandler root,
org.jboss.virtual.plugins.copy.AbstractCopyMechanism.WriteRootChecker checker)
Unpack the root into file. |
protected static VirtualFileHandler |
unwrap(VirtualFileHandler handler)
Unwrap the handler from possible delegate handler. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractCopyMechanism()
Method Detail |
---|
public static java.io.File getTempDirectory()
protected abstract java.lang.String getType()
protected abstract boolean isAlreadyModified(VirtualFileHandler handler) throws java.io.IOException
handler
- the handler
java.io.IOException
- for any errorprotected abstract boolean replaceOldHandler(VirtualFileHandler parent, VirtualFileHandler oldHandler, VirtualFileHandler newHandler) throws java.io.IOException
parent
- the parent handleroldHandler
- the old handlernewHandler
- the new handler
java.io.IOException
- for any errorprotected static VirtualFileHandler unwrap(VirtualFileHandler handler)
handler
- the handler to unwrap
public VirtualFile copy(VirtualFile file, VirtualFileHandler handler) throws java.io.IOException, java.net.URISyntaxException
CopyMechanism
copy
in interface CopyMechanism
file
- the original filehandler
- the handler to copy
java.io.IOException
- for any error
java.net.URISyntaxException
- for any URI syntax errorprotected java.io.File copy(java.io.File guidDir, VirtualFileHandler handler) throws java.io.IOException
guidDir
- the guid directoryhandler
- the handler to copy
java.io.IOException
- for any errorprotected java.io.File createCopy(java.io.File guidDir, VirtualFileHandler handler) throws java.io.IOException
guidDir
- the guid dirhandler
- the handler to copy
java.io.IOException
- for any errorprotected abstract void doCopy(java.io.File copy, VirtualFileHandler handler) throws java.io.IOException
copy
- the copy destinationhandler
- the handler
java.io.IOException
- for any errorprotected static java.io.File createTempDirectory(java.io.File parent, java.lang.String name)
parent
- the parentname
- the dir name
protected static void exactCopy(java.io.File copy, VirtualFileHandler root) throws java.io.IOException
copy
- the copy destroot
- the handler to copy
java.io.IOException
- for any errorprotected static void explode(java.io.File copy, VirtualFileHandler root) throws java.io.IOException
copy
- the copy destroot
- the root
java.io.IOException
- for any errorprotected static void unpack(java.io.File copy, VirtualFileHandler root, org.jboss.virtual.plugins.copy.AbstractCopyMechanism.WriteRootChecker checker) throws java.io.IOException
copy
- the copy destroot
- the rootchecker
- do we write the root checker
java.io.IOException
- for any errorprotected static void unjar(java.io.File copy, VirtualFileHandler handler) throws java.io.IOException
copy
- the dest to unjarhandler
- the handler to unjar
java.io.IOException
- for any errorprotected static void rewrite(VirtualFileHandler handler, java.io.File file) throws java.io.IOException
handler
- the handlerfile
- the file
java.io.IOException
- for any error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |