public class OwXMLUtilPlaceholderFilter extends Object implements OwXMLUtil
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
Modifier and Type | Field and Description |
---|---|
protected OwXMLUtil |
m_wrappednode |
Constructor and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
protected String |
getAttributeValue(String attributeName_p)
get the specified attribute value
replace placeholder if specified
|
String |
getName()
Return the name (tag-name) of this instance
|
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
|
void |
writeHtmlDumpFiltered(Writer htmlWriter_p,
Map<String,String> hiddenTags)
write configuration as HTML to a writer object and filter xml tags
|
protected OwXMLUtil m_wrappednode
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
protected String getAttributeValue(String attributeName_p) throws Exception
protected String getNodeValue(String strNodeName_p) throws Exception
protected String getNodeValue() throws 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 foundpublic 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 foundpublic 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 foundpublic String getSafeTextValue(String default_p)
OwXMLUtil
getSafeTextValue
in interface OwXMLUtil
default_p
- Default string in case the node could not be foundprotected 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 foundpublic 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 foundpublic 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 foundpublic 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 listpublic Set getSafeStringSet(String strNodeName_p)
OwXMLUtil
getSafeStringSet
in interface OwXMLUtil
strNodeName_p
- String name of the subnode with the string listpublic void writeHtmlDump(Writer w_p) throws Exception
OwXMLUtil
writeHtmlDump
in interface OwXMLUtil
w_p
- a Writer
Exception
public Node getNode()
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 listpublic Node getSubNode(String strNodeName_p) throws Exception
OwXMLUtil
getSubNode
in interface OwXMLUtil
strNodeName_p
- tag name of requested nodeException
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 itemsList
public List getSafeUtilList(String itemName_p)
OwXMLUtil
getSafeUtilList
in interface OwXMLUtil
itemName_p
- the name of the item's or null to retrieve all itemsList
public OwXMLUtil getSubUtil(String nodeName_p) throws Exception
OwXMLUtil
getSubUtil
in interface OwXMLUtil
nodeName_p
- the subnode nameException
public URL getURLFromNode(String nodeName_p) throws MalformedURLException
OwXMLUtil
getURLFromNode
in interface OwXMLUtil
nodeName_p
- String name of child node, where to extract the URLMalformedURLException
- if the extracted text is not URL conform stringpublic void writeHtmlDumpFiltered(Writer htmlWriter_p, Map<String,String> hiddenTags) throws Exception
OwXMLUtil
writeHtmlDumpFiltered
in interface OwXMLUtil
htmlWriter_p
- a Writer
hiddenTags
- Map
Exception
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.