|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wewebu.ow.server.util.OwXMLUtilPlaceholderFilter
public class OwXMLUtilPlaceholderFilter
Utility class for XML access and debugging.
Implements OwXMLUtil with a OwAttributeBag interface.
So the place holder values are converted with the given OwAttributeBag.
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
OwStandardOptionXMLUtil
Field Summary | |
---|---|
protected OwXMLUtil |
m_wrappednode
|
Constructor Summary | |
---|---|
OwXMLUtilPlaceholderFilter(Node node_p,
OwAttributeBag placeholderattributeBag_p)
construct a template XML util node |
|
OwXMLUtilPlaceholderFilter(OwXMLUtil node_p,
OwAttributeBag placeholderattributeBag_p)
construct a template XML util node |
Method Summary | |
---|---|
protected String |
getAttributeValue(String attributeName_p)
get the specified attribute value replace placeholder if specified |
Node |
getNode()
return the wrapped DOM Node reference |
protected String |
getNodeValue()
get the value from the node replace placeholder if specified |
protected String |
getNodeValue(String strNodeName_p)
get the value from the given node name replace placeholder if specified |
protected String |
getPlaceholderValue(String value_p)
get the placeholder name if specified placeholders have the following syntax: {$Placeholdername} |
boolean |
getSafeBooleanAttributeValue(String strAttributeName_p,
boolean default_p)
get the value of a boolean attribute [true | false], catch exception |
boolean |
getSafeBooleanValue(String strNodeName_p,
boolean default_p)
get the value of a sub boolean node [true | false], catch exception |
List |
getSafeCDATAList()
retrieve a CDATA string list in a subnode |
List |
getSafeCDATAList(String strNodeName_p)
retrieve a CDATA string list in the node |
int |
getSafeIntegerAttributeValue(String strAttributeName_p,
int default_p)
get the value of a string attribute, catch exception |
int |
getSafeIntegerValue(String strNodeName_p,
int default_p)
get the value of a sub Integer node, catch exception |
List |
getSafeNodeList()
retrieve a node list in a subnode |
List |
getSafeNodeList(String strNodeName_p)
retrieve a node list in a subnode |
String |
getSafeStringAttributeValue(String strAttributeName_p,
String default_p)
get the value of a string attribute, catch exception |
List |
getSafeStringList()
retrieve a string list in the node |
List |
getSafeStringList(String strNodeName_p)
retrieve a string list in a subnode |
Set |
getSafeStringSet(String strNodeName_p)
retrieve a string list in a subnode |
String |
getSafeTextValue(String default_p)
get the value of THE node, catch exception |
String |
getSafeTextValue(String strNodeName_p,
String default_p)
get the value of a sub text node, catch exception |
List |
getSafeUtilList(String itemName_p)
get a list with OwXMLUtil's |
List |
getSafeUtilList(String nodeName_p,
String itemName_p)
get a list with OwXMLUtil's with the given subname |
Node |
getSubNode(String strNodeName_p)
get the subnode with the given tagname |
OwXMLUtil |
getSubUtil(String nodeName_p)
get a sub util node with the given name |
URL |
getURLFromNode(String nodeName_p)
Helper method to create an URL from given configuration node. |
void |
writeHtmlDump(Writer w_p)
write configuration as HTML to a writer object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected OwXMLUtil m_wrappednode
Constructor Detail |
---|
public OwXMLUtilPlaceholderFilter(OwXMLUtil node_p, OwAttributeBag placeholderattributeBag_p) throws Exception
node_p
- OwXMLUtil wrapped nodeplaceholderattributeBag_p
-
Exception
public OwXMLUtilPlaceholderFilter(Node node_p, OwAttributeBag placeholderattributeBag_p) throws Exception
node_p
- DOM NodeplaceholderattributeBag_p
-
Exception
Method Detail |
---|
protected String getAttributeValue(String attributeName_p) throws Exception
attributeName_p
-
String
Exception
protected String getNodeValue(String strNodeName_p) throws Exception
strNodeName_p
-
String
Exception
protected String getNodeValue() throws Exception
String
Exception
public boolean getSafeBooleanValue(String strNodeName_p, boolean default_p)
OwXMLUtil
getSafeBooleanValue
in interface OwXMLUtil
strNodeName_p
- name of the subnodedefault_p
- Default value in case the node could not be found
public int getSafeIntegerValue(String strNodeName_p, int default_p)
OwXMLUtil
getSafeIntegerValue
in interface OwXMLUtil
strNodeName_p
- name of the subnodedefault_p
- Default value in case the node could not be found
public String getSafeTextValue(String strNodeName_p, String default_p)
OwXMLUtil
getSafeTextValue
in interface OwXMLUtil
strNodeName_p
- name of the text subnodedefault_p
- Default string in case the node could not be found
public String getSafeTextValue(String default_p)
OwXMLUtil
getSafeTextValue
in interface OwXMLUtil
default_p
- Default string in case the node could not be found
protected String getPlaceholderValue(String value_p)
value_p
-
public boolean getSafeBooleanAttributeValue(String strAttributeName_p, boolean default_p)
OwXMLUtil
getSafeBooleanAttributeValue
in interface OwXMLUtil
strAttributeName_p
- name of the String attributedefault_p
- Default string in case the attribute could not be found
public int getSafeIntegerAttributeValue(String strAttributeName_p, int default_p)
OwXMLUtil
getSafeIntegerAttributeValue
in interface OwXMLUtil
strAttributeName_p
- name of the String attributedefault_p
- Default int in case the attribute could not be found
public String getSafeStringAttributeValue(String strAttributeName_p, String default_p)
OwXMLUtil
getSafeStringAttributeValue
in interface OwXMLUtil
strAttributeName_p
- name of the String attributedefault_p
- Default string in case the attribute could not be found
public List getSafeStringList()
OwXMLUtil
getSafeStringList
in interface OwXMLUtil
public List getSafeCDATAList()
OwXMLUtil
getSafeCDATAList
in interface OwXMLUtil
public List getSafeCDATAList(String strNodeName_p)
OwXMLUtil
getSafeCDATAList
in interface OwXMLUtil
public List getSafeStringList(String strNodeName_p)
OwXMLUtil
getSafeStringList
in interface OwXMLUtil
strNodeName_p
- String name of the subnode with the string list
public Set getSafeStringSet(String strNodeName_p)
OwXMLUtil
getSafeStringSet
in interface OwXMLUtil
strNodeName_p
- String name of the subnode with the string list
public void writeHtmlDump(Writer w_p) throws Exception
OwXMLUtil
writeHtmlDump
in interface OwXMLUtil
w_p
- a Writer
Exception
public Node getNode()
OwXMLUtil
getNode
in interface OwXMLUtil
public List getSafeNodeList()
OwXMLUtil
getSafeNodeList
in interface OwXMLUtil
public List getSafeNodeList(String strNodeName_p)
OwXMLUtil
getSafeNodeList
in interface OwXMLUtil
strNodeName_p
- String name of the subnode with the node list
public Node getSubNode(String strNodeName_p) throws Exception
OwXMLUtil
getSubNode
in interface OwXMLUtil
strNodeName_p
- tag name of requested node
Exception
public List getSafeUtilList(String nodeName_p, String itemName_p)
OwXMLUtil
getSafeUtilList
in interface OwXMLUtil
nodeName_p
- the subnode nameitemName_p
- the name of the item's or null to retrieve all items
List
public List getSafeUtilList(String itemName_p)
OwXMLUtil
getSafeUtilList
in interface OwXMLUtil
itemName_p
- the name of the item's or null to retrieve all items
List
public OwXMLUtil getSubUtil(String nodeName_p) throws Exception
OwXMLUtil
getSubUtil
in interface OwXMLUtil
nodeName_p
- the subnode name
Exception
public URL getURLFromNode(String nodeName_p) throws MalformedURLException
OwXMLUtil
getURLFromNode
in interface OwXMLUtil
nodeName_p
- String name of child node, where to extract the URL
MalformedURLException
- if the extracted text is not URL conform string
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |