|
3.1.2: 2012-07-31 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.basedb.util.extensions.manager.ExtensionsFile.WriteableExtensionsFile
public static class ExtensionsFile.WriteableExtensionsFile
An extensions file with additional methods that allows adding
or modifying information in the underlying extensions file. This kind of
view is usually handed out to ExtensionsFileProcessor
implementations
as a result of calling ExtensionsManager.processFiles(ExtensionsFileProcessor)
.
Note that the file starts out in read-only mode and that
the processor has to call open()
to aquire a write-lock
before calling any writing methods. It is recommended that
the lock is released as soon as possible by calling close()
.
Field Summary | |
---|---|
private boolean |
isClosed
|
private ExtensionsFile |
xtFile
|
Constructor Summary | |
---|---|
ExtensionsFile.WriteableExtensionsFile(ExtensionsFile xtFile)
Creates a new writeable extensions file. |
Method Summary | ||
---|---|---|
private void |
checkClosed()
Check if the file has been closed and throws an IllegalStateException if it has. |
|
void |
close()
Close the writeable file. |
|
ExtensionsFile |
getExtensionsFile()
Get the underlying extensions file (for readin information) |
|
void |
markAsProcessed()
Mark the file as fully processed by the extensions manager. |
|
boolean |
open()
|
|
|
registerMetadata(ObjectKey<M> key,
M metadata)
Register metadata about an object. |
|
|
registerObject(ObjectKey<O> key,
O obj)
Register an object as "defined" by this extensions file. |
|
void |
setError(boolean error)
Sets the error status. |
|
void |
setInstalled()
Mark the file as installed. |
|
void |
setUninstalled()
Mark the file as uninstalled. |
|
|
unregisterMetadata(ObjectKey<M> key)
Unregister metadata about an object. |
|
|
unregisterObject(ObjectKey<O> key)
Unregister an object that was "defined" by this extensions file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final ExtensionsFile xtFile
private boolean isClosed
Constructor Detail |
---|
ExtensionsFile.WriteableExtensionsFile(ExtensionsFile xtFile)
Method Detail |
---|
public ExtensionsFile getExtensionsFile()
public void close()
public boolean open()
private void checkClosed()
public void markAsProcessed()
public void setUninstalled()
public void setInstalled()
public void setError(boolean error)
public <O> void registerObject(ObjectKey<O> key, O obj)
key
- The object key used to identify the objectobj
- The object to register
IllegalStateException
- If the file has been closedpublic <O> void unregisterObject(ObjectKey<O> key)
key
- The object key used to identify the object
IllegalStateException
- If the file has been closedpublic <M> void registerMetadata(ObjectKey<M> key, M metadata)
registerObject(ObjectKey, Object)
method is that the registerObject
method
also registers the objects with the ExtensionsManager
.
key
- The object key used to identify the metadatametadata
- The metadata to store under the keypublic <M> void unregisterMetadata(ObjectKey<M> key)
key
- The object key used to identify the metadata
|
3.1.2: 2012-07-31 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |