|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.progeeks.util.xml.AbstractObjectHandler
org.progeeks.meta.xml.MetaObjectHandler
org.progeeks.meta.xml.PreferencesMetaObjectHandler
public class PreferencesMetaObjectHandler
Object handler implementation to deal with converting XML to PreferencesMetaObjects. This is different than regular meta-objects because the preference node must be specified to wrap. To distinguish these meta-objects from regular meta-objects the handler uses the prefs- prefix. Some of this could probably be more general but I want to wait for more use-cases and also for some epiphany on how XML rendering would keep track of this stuff.
Field Summary | |
---|---|
static java.lang.String |
PREFERENCES_PREFIX
|
static java.lang.String |
ROOT_NODE_KEY
|
static java.lang.String |
SYSTEM_NODE_ATTR
|
static java.lang.String |
USER_NODE_ATTR
|
Fields inherited from class org.progeeks.meta.xml.MetaObjectHandler |
---|
CONFIG_IMPORT_PACKAGE |
Constructor Summary | |
---|---|
PreferencesMetaObjectHandler()
Creates a new meta-object handler that will use the default PreferencesMetaKit to create new objects and the context class registry to resolve meta-classes. |
|
PreferencesMetaObjectHandler(MetaClassRegistry classRegistry,
FormatRegistry formats,
PreferencesMetaKit metaKit)
Creates a new meta-object handler that will use the specified preferences meta-kit to create new objects and the specified class registry to resolve meta-classes |
|
PreferencesMetaObjectHandler(PreferencesMetaKit metaKit)
Creates a new meta-object handler that will use the specified preferences meta-kit to create new objects and the context class registry to resolve meta-classes. |
Method Summary | |
---|---|
boolean |
canHandle(java.lang.String tag)
Returns true if this handler applies to the specified object tag. |
java.lang.Object |
createObject(java.lang.String tag,
org.xml.sax.Attributes atts,
ObjectXmlReader reader)
Creates and returns an object based on the specified parameters. |
java.lang.String |
getRootNodeId()
Returns the root preference ID to prepend to any relative node paths or null if the real preferences root should be used. |
protected java.lang.String |
getStrippedTag(java.lang.String tag)
Returns the tag name with the PREFERENCES_PREFIX stripped off or null if it does not start with PREFERENCES_PREFIX. |
protected boolean |
ignoreAttribute(java.lang.String name,
ObjectXmlReader reader)
Returns true if the specified attribute should be ignored within the context of the specified reader. |
void |
setRootNodeId(java.lang.String id)
Sets the root preference ID to prepend to any relative node paths. |
Methods inherited from class org.progeeks.meta.xml.MetaObjectHandler |
---|
addClassPrefix, getClassPrefixes, getFormatRegistry, getMetaClassRegistry, getProperty, getPropertyClass, getPropertyCollection, importPackage, importPackages, resolveTagClass, setClassPrefixes, setConfigurationProperty, setFormatRegistry, setMetaClassRegistry, setObjectProperties, setProperty, setTextProperty |
Methods inherited from class org.progeeks.util.xml.AbstractObjectHandler |
---|
resolveObject, setContainedText |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PREFERENCES_PREFIX
public static final java.lang.String USER_NODE_ATTR
public static final java.lang.String SYSTEM_NODE_ATTR
public static final java.lang.String ROOT_NODE_KEY
Constructor Detail |
---|
public PreferencesMetaObjectHandler()
public PreferencesMetaObjectHandler(PreferencesMetaKit metaKit)
public PreferencesMetaObjectHandler(MetaClassRegistry classRegistry, FormatRegistry formats, PreferencesMetaKit metaKit)
Method Detail |
---|
public void setRootNodeId(java.lang.String id)
public java.lang.String getRootNodeId()
protected java.lang.String getStrippedTag(java.lang.String tag)
public boolean canHandle(java.lang.String tag)
canHandle
in interface ObjectHandler
canHandle
in class MetaObjectHandler
protected boolean ignoreAttribute(java.lang.String name, ObjectXmlReader reader)
MetaObjectHandler
ignoreAttribute
in class MetaObjectHandler
public java.lang.Object createObject(java.lang.String tag, org.xml.sax.Attributes atts, ObjectXmlReader reader)
createObject
in interface ObjectHandler
createObject
in class MetaObjectHandler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |