@Immutable public abstract class AbstractKeyController extends FsDecoratingController
FsController.Factory<Context>
Modifier and Type | Field and Description |
---|---|
protected AbstractZipDriver<?> |
driver |
controller
Modifier | Constructor and Description |
---|---|
protected |
AbstractKeyController(FsController controller,
AbstractZipDriver<?> driver)
Constructs a new key manager controller.
|
Modifier and Type | Method and Description |
---|---|
void |
checkAccess(net.java.truecommons.shed.BitField<FsAccessOption> options,
FsNodeName name,
net.java.truecommons.shed.BitField<net.java.truecommons.cio.Entry.Access> types)
Checks if the file system node for the given
name exists when
constrained by the given access options and permits the given
access types . |
protected abstract Class<? extends IOException> |
getKeyExceptionType() |
protected abstract Class<?> |
getKeyType() |
FsNode |
node(net.java.truecommons.shed.BitField<FsAccessOption> options,
FsNodeName name)
Returns the file system node for the given
name or null
if it doesn't exist. |
void |
sync(net.java.truecommons.shed.BitField<FsSyncOption> options)
Commits all unsynchronized changes to the contents of this file system
to its parent file system,
releases the associated resources (e.g.
|
void |
unlink(net.java.truecommons.shed.BitField<FsAccessOption> options,
FsNodeName name)
Removes the named file system node from the file system.
|
getParent, input, make, output, setReadOnly, setTime, setTime, toString
getModel, getMountPoint, isMounted, setMounted
protected final AbstractZipDriver<?> driver
protected AbstractKeyController(FsController controller, AbstractZipDriver<?> driver)
controller
- the non-null
file system controller to
decorate.driver
- the ZIP driver.public void checkAccess(net.java.truecommons.shed.BitField<FsAccessOption> options, FsNodeName name, net.java.truecommons.shed.BitField<net.java.truecommons.cio.Entry.Access> types) throws IOException
FsController
name
exists when
constrained by the given access options
and permits the given
access types
.checkAccess
in interface FsController
checkAccess
in class FsDecoratingController
options
- the options for accessing the file system node.name
- the name of the file system node.types
- the types of the desired access.IOException
- on any I/O error.protected abstract Class<? extends IOException> getKeyExceptionType()
protected abstract Class<?> getKeyType()
public final FsNode node(net.java.truecommons.shed.BitField<FsAccessOption> options, FsNodeName name) throws IOException
FsController
name
or null
if it doesn't exist.
Modifying the returned node does not show any effect on the file system
and should result in an UnsupportedOperationException
.node
in interface FsController
node
in class FsDecoratingController
options
- the options for accessing the file system node.name
- the name of the file system node.null
if no file system node
exists for the given name.IOException
- on any I/O error.public void sync(net.java.truecommons.shed.BitField<FsSyncOption> options) throws FsSyncException
FsController
An implementation may ignore calls to this method if its stateless.
sync
in interface FsController
sync
in class FsDecoratingController
options
- the options for synchronizing the file system.FsSyncWarningException
- if only warning conditions
apply.
This implies that the respective parent file system has been
synchronized with constraints, e.g. if an unclosed archive entry
stream gets forcibly closed.FsSyncException
- if any error conditions apply.public final void unlink(net.java.truecommons.shed.BitField<FsAccessOption> options, FsNodeName name) throws IOException
FsController
unlink
in interface FsController
unlink
in class FsDecoratingController
options
- the options for accessing the file system node.name
- the name of the file system node.IOException
- on any I/O error.Copyright © 2005–2018 Schlichtherle IT Services. All rights reserved.