de.schlichtherle.truezip.fs
Class FsFederatingController
java.lang.Object
de.schlichtherle.truezip.fs.FsController<M>
de.schlichtherle.truezip.fs.FsDecoratingController<FsModel,FsController<?>>
de.schlichtherle.truezip.fs.FsFederatingController
@ThreadSafe
final class FsFederatingController
- extends FsDecoratingController<FsModel,FsController<?>>
Implements a chain of responsibility in order to resolve
FsFalsePositiveExceptions thrown by the prospective file system
provided to its constructor.
Whenever the controller for the prospective file system throws a
FsFalsePositiveException, the method call is delegated to the
controller for its parent file system in order to resolve the requested
operation.
- Author:
- Christian Schlichtherle
path
private volatile FsPath path
FsFederatingController
FsFederatingController(@NonNull
FsController<?> controller)
- Constructs a new file system federating controller.
- Parameters:
controller - the decorated file system controller.
resolveParent
private FsEntryName resolveParent(FsEntryName name)
getPath
private FsPath getPath()
getOpenIcon
public Icon getOpenIcon()
throws IOException
- Overrides:
getOpenIcon in class FsDecoratingController<FsModel,FsController<?>>
- Throws:
IOException
getClosedIcon
public Icon getClosedIcon()
throws IOException
- Overrides:
getClosedIcon in class FsDecoratingController<FsModel,FsController<?>>
- Throws:
IOException
isReadOnly
public boolean isReadOnly()
throws IOException
- Overrides:
isReadOnly in class FsDecoratingController<FsModel,FsController<?>>
- Throws:
IOException
getEntry
public FsEntry getEntry(FsEntryName name)
throws IOException
- Overrides:
getEntry in class FsDecoratingController<FsModel,FsController<?>>
- Throws:
IOException
isReadable
public boolean isReadable(FsEntryName name)
throws IOException
- Overrides:
isReadable in class FsDecoratingController<FsModel,FsController<?>>
- Throws:
IOException
isWritable
public boolean isWritable(FsEntryName name)
throws IOException
- Overrides:
isWritable in class FsDecoratingController<FsModel,FsController<?>>
- Throws:
IOException
setReadOnly
public void setReadOnly(FsEntryName name)
throws IOException
- Overrides:
setReadOnly in class FsDecoratingController<FsModel,FsController<?>>
- Throws:
IOException
setTime
public boolean setTime(FsEntryName name,
BitField<Entry.Access> types,
long value)
throws IOException
- Overrides:
setTime in class FsDecoratingController<FsModel,FsController<?>>
- Throws:
IOException
getInputSocket
public InputSocket<?> getInputSocket(FsEntryName name,
BitField<FsInputOption> options)
- Description copied from class:
FsController
- Returns an input socket for reading the contents of the entry addressed
by the given name from the file system.
- Overrides:
getInputSocket in class FsDecoratingController<FsModel,FsController<?>>
- Parameters:
name - a file system entry name.
- Returns:
- An
InputSocket.
getOutputSocket
public OutputSocket<?> getOutputSocket(FsEntryName name,
BitField<FsOutputOption> options,
Entry template)
- Description copied from class:
FsController
- Returns an output socket for writing the contents of the entry addressed
by the given name to the file system.
If
template is not null, then the output entry shall
have as many of its properties copied as reasonable, e.g. the last
modification time.
- Overrides:
getOutputSocket in class FsDecoratingController<FsModel,FsController<?>>
- Parameters:
name - a file system entry name.template - a nullable template for the properties of the output
entry.
- Returns:
- An
OutputSocket.
mknod
public void mknod(@NonNull
FsEntryName name,
@NonNull
Entry.Type type,
@NonNull
BitField<FsOutputOption> options,
@CheckForNull
Entry template)
throws IOException
- Description copied from class:
FsController
- Creates or replaces and finally links a chain of one or more entries
for the given entry
name into the file system.
- Overrides:
mknod in class FsDecoratingController<FsModel,FsController<?>>
- Parameters:
name - the file system entry name.type - the file system entry type.options - the file system output options.
If CREATE_PARENTS is set, any missing parent directories
will be created and linked into this file system with its last
modification time set to the system's current time.template - if not null, then the file system entry
at the end of the chain shall inherit as much properties from
this entry as possible - with the exception of its name and type.
- Throws:
IOException - for some other I/O related reason, including but
not exclusively upon one or more of the following conditions:
- The file system is read only.
name contains characters which are not
supported by the file system.
- The entry already exists and either the option
FsOutputOption.EXCLUSIVE is set or the entry is a
directory.
- The entry exists as a different type.
- A parent entry exists but is not a directory.
- A parent entry is missing and
createParents is
false.
unlink
public void unlink(FsEntryName name)
throws IOException
- Overrides:
unlink in class FsDecoratingController<FsModel,FsController<?>>
- Throws:
IOException
Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.