|
||||||||||
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 File |
copy(File guidDir,
VirtualFileHandler handler)
Copy handler. |
VirtualFile |
copy(VirtualFile file,
VirtualFileHandler handler)
Copy handler. |
protected File |
createCopy(File guidDir,
VirtualFileHandler handler)
Create copy destination. |
protected static File |
createTempDirectory(File parent,
String name)
Create the temp directory. |
protected abstract void |
doCopy(File copy,
VirtualFileHandler handler)
Do copy. |
protected static void |
exactCopy(File copy,
VirtualFileHandler root)
Exact copy. |
protected static void |
explode(File copy,
VirtualFileHandler root)
Explode the root into file. |
static File |
getTempDirectory()
Get temp directory. |
protected abstract 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,
File file)
Rewrite contents of handler into file. |
protected static void |
unjar(File copy,
VirtualFileHandler handler)
Unjar to copy parameter. |
protected static void |
unpack(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 File getTempDirectory()
protected abstract String getType()
protected abstract boolean isAlreadyModified(VirtualFileHandler handler) throws IOException
handler
- the handler
IOException
- for any errorprotected abstract boolean replaceOldHandler(VirtualFileHandler parent, VirtualFileHandler oldHandler, VirtualFileHandler newHandler) throws IOException
parent
- the parent handleroldHandler
- the old handlernewHandler
- the new handler
IOException
- for any errorprotected static VirtualFileHandler unwrap(VirtualFileHandler handler)
handler
- the handler to unwrap
public VirtualFile copy(VirtualFile file, VirtualFileHandler handler) throws IOException, URISyntaxException
CopyMechanism
copy
in interface CopyMechanism
file
- the original filehandler
- the handler to copy
IOException
- for any error
URISyntaxException
- for any URI syntax errorprotected File copy(File guidDir, VirtualFileHandler handler) throws IOException
guidDir
- the guid directoryhandler
- the handler to copy
IOException
- for any errorprotected File createCopy(File guidDir, VirtualFileHandler handler) throws IOException
guidDir
- the guid dirhandler
- the handler to copy
IOException
- for any errorprotected abstract void doCopy(File copy, VirtualFileHandler handler) throws IOException
copy
- the copy destinationhandler
- the handler
IOException
- for any errorprotected static File createTempDirectory(File parent, String name)
parent
- the parentname
- the dir name
protected static void exactCopy(File copy, VirtualFileHandler root) throws IOException
copy
- the copy destroot
- the handler to copy
IOException
- for any errorprotected static void explode(File copy, VirtualFileHandler root) throws IOException
copy
- the copy destroot
- the root
IOException
- for any errorprotected static void unpack(File copy, VirtualFileHandler root, org.jboss.virtual.plugins.copy.AbstractCopyMechanism.WriteRootChecker checker) throws IOException
copy
- the copy destroot
- the rootchecker
- do we write the root checker
IOException
- for any errorprotected static void unjar(File copy, VirtualFileHandler handler) throws IOException
copy
- the dest to unjarhandler
- the handler to unjar
IOException
- for any errorprotected static void rewrite(VirtualFileHandler handler, File file) throws IOException
handler
- the handlerfile
- the file
IOException
- for any error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |