|
org.netbeans.modules.registry/1 1.8 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResettableContext
BasicContext
extension supporting default values. If the implementation of
backend storage has concept of default values it should implement also
this context extension which allows examination of whether the
bound object has some default value, whether current value is modified
or the original one and also allows to revert the modified value to the
default one.
If the binding name is null
then the context is examined. The context
should be considered as modified if following condition is true for it or
for any of its subcontexts: some binding in the context is modified or list
of subcontext is different from default one. Reverting context means that
all modified bindings in the context (including the subcontexts) are reverted
and all nondefault subcontexts are destroyed.
Method Summary | |
---|---|
boolean |
hasDefault(String bindingName)
Exist a default value? |
boolean |
isModified(String bindingName)
Check whether the value is modified. |
void |
revert(String bindingName)
Revert modification. |
Methods inherited from interface org.netbeans.spi.registry.BasicContext |
---|
addContextListener, bindObject, createSubcontext, destroySubcontext, getAttribute, getAttributeNames, getBindingNames, getContextName, getParentContext, getRootContext, getSubcontext, getSubcontextNames, lookupObject, removeContextListener, setAttribute |
Method Detail |
---|
boolean hasDefault(String bindingName)
bindingName
- the binding name or null for the context
boolean isModified(String bindingName)
hasDefault(java.lang.String)
is false) returns this method
always true.
bindingName
- the binding name or null for the context
void revert(String bindingName) throws ContextException
isModified(java.lang.String)
returns true). If there is no default
value (ie. hasDefault(java.lang.String)
returns false) the revert operation
is identical to unbinding of object or destroying of context
content.
bindingName
- the binding name or null for the context
ContextException
- can throw exception if there were problems
during removal of modified values
|
org.netbeans.modules.registry/1 1.8 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |