public class RichXMLFactory.GenericAddon<A extends IAddon> extends Object implements RichXMLFactory.RichSubFactory<A>
Constructor and Description |
---|
GenericAddon() |
Modifier and Type | Method and Description |
---|---|
void |
afterWriteChildren(Outer os,
A addon,
String nodeName,
Map<PersistantPropertyInfo,Object> deferredNodes)
Called if current node has children, after writing them.
|
boolean |
beforeCloseNoChild(Outer os,
A addon,
String nodeName)
Called if current node has no child: will be called after attributes writing.
|
void |
beforeWriteChildren(Outer os,
A addon,
String nodeName,
Map<PersistantPropertyInfo,Object> deferredNodes)
Called if current node has children, before writing them.
|
String |
getImplementationId()
Null for generic implem.
|
protected void |
handleReadAttr(A addon,
Node node,
Node attr) |
protected void |
handleReadAttributes(Node mainNode,
A addon) |
protected void |
handleReadChildNodes(Node mainNode,
A addon) |
protected void |
handleReadNode(A addon,
Node node) |
protected void |
handleWriteAttribute(Outer os,
A addon,
PersistantPropertyInfo property,
Object propertyValue,
String defaultValue) |
protected void |
handleWriteNode(Outer os,
A addon,
PersistantPropertyInfo property,
Object propertyValue) |
protected void |
injectIntoProperty(Object target,
Node node,
String propertyName) |
protected boolean |
isWriteAsAttribute(PersistantPropertyInfo property,
Object propertyValue)
Does value should be writen as node ?
|
protected boolean |
isWriteAsNode(PersistantPropertyInfo property,
Object propertyValue)
Does value should be writen as attribute?
|
A |
read(Node mainNode) |
protected Object |
readPersistantObject(Node node,
Class<?> type) |
void |
write(Outer os,
A addon) |
void |
write(Outer os,
A addon,
String nodeName) |
void |
writePersistantObject(Outer os,
String property,
Object propertyValue) |
public A read(Node mainNode) throws XMLMConfigurationException
read
in interface RichXMLFactory.RichSubFactory<A extends IAddon>
XMLMConfigurationException
protected void handleReadChildNodes(Node mainNode, A addon) throws XMLMConfigurationException
XMLMConfigurationException
protected void handleReadAttributes(Node mainNode, A addon) throws XMLMConfigurationException
XMLMConfigurationException
protected void handleReadNode(A addon, Node node) throws XMLMConfigurationException
XMLMConfigurationException
protected void injectIntoProperty(Object target, Node node, String propertyName) throws UtilsException, XMLMConfigurationException
protected Object readPersistantObject(Node node, Class<?> type) throws UtilsException, XMLMConfigurationException
protected void handleReadAttr(A addon, Node node, Node attr) throws XMLMConfigurationException
XMLMConfigurationException
public void write(Outer os, A addon) throws XMLMConfigurationException, IOException
public void write(Outer os, A addon, String nodeName) throws XMLMConfigurationException, IOException
write
in interface RichXMLFactory.RichSubFactory<A extends IAddon>
XMLMConfigurationException
IOException
public boolean beforeCloseNoChild(Outer os, A addon, String nodeName) throws XMLMConfigurationException, IOException
XMLMConfigurationException
IOException
public void beforeWriteChildren(Outer os, A addon, String nodeName, Map<PersistantPropertyInfo,Object> deferredNodes) throws XMLMConfigurationException, IOException
public void afterWriteChildren(Outer os, A addon, String nodeName, Map<PersistantPropertyInfo,Object> deferredNodes) throws XMLMConfigurationException, IOException
protected boolean isWriteAsAttribute(PersistantPropertyInfo property, Object propertyValue) throws XMLMConfigurationException, MRuleInternalException
property
- property info. might be null.propertyValue
- corresponding property value. might be null.XMLMConfigurationException
MRuleInternalException
isWriteAsNode(PersistantPropertyInfo, Object)
protected boolean isWriteAsNode(PersistantPropertyInfo property, Object propertyValue) throws XMLMConfigurationException, MRuleInternalException
property
- property info. might be null.propertyValue
- corresponding property value. might be null.XMLMConfigurationException
MRuleInternalException
isWriteAsAttribute(PersistantPropertyInfo, Object)
protected void handleWriteNode(Outer os, A addon, PersistantPropertyInfo property, Object propertyValue) throws XMLMConfigurationException, IOException
public void writePersistantObject(Outer os, String property, Object propertyValue) throws XMLMConfigurationException, IOException
protected void handleWriteAttribute(Outer os, A addon, PersistantPropertyInfo property, Object propertyValue, String defaultValue) throws XMLMConfigurationException, IOException
public String getImplementationId()
getImplementationId
in interface RichXMLFactory.RichSubFactory<A extends IAddon>