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 - Exceptionpublic OwXMLUtilPlaceholderFilter(Node node_p, OwAttributeBag placeholderattributeBag_p) throws Exception
node_p - DOM NodeplaceholderattributeBag_p - Exceptionprotected 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)
OwXMLUtilgetSafeBooleanValue in interface OwXMLUtilstrNodeName_p - name of the subnodedefault_p - Default value in case the node could not be foundpublic int getSafeIntegerValue(String strNodeName_p, int default_p)
OwXMLUtilgetSafeIntegerValue in interface OwXMLUtilstrNodeName_p - name of the subnodedefault_p - Default value in case the node could not be foundpublic String getSafeTextValue(String strNodeName_p, String default_p)
OwXMLUtilgetSafeTextValue in interface OwXMLUtilstrNodeName_p - name of the text subnodedefault_p - Default string in case the node could not be foundpublic String getSafeTextValue(String default_p)
OwXMLUtilgetSafeTextValue in interface OwXMLUtildefault_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)
OwXMLUtilgetSafeBooleanAttributeValue in interface OwXMLUtilstrAttributeName_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)
OwXMLUtilgetSafeIntegerAttributeValue in interface OwXMLUtilstrAttributeName_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)
OwXMLUtilgetSafeStringAttributeValue in interface OwXMLUtilstrAttributeName_p - name of the String attributedefault_p - Default string in case the attribute could not be foundpublic List getSafeStringList()
OwXMLUtilgetSafeStringList in interface OwXMLUtilpublic List getSafeCDATAList()
OwXMLUtilgetSafeCDATAList in interface OwXMLUtilpublic List getSafeCDATAList(String strNodeName_p)
OwXMLUtilgetSafeCDATAList in interface OwXMLUtilpublic List getSafeStringList(String strNodeName_p)
OwXMLUtilgetSafeStringList in interface OwXMLUtilstrNodeName_p - String name of the subnode with the string listpublic Set getSafeStringSet(String strNodeName_p)
OwXMLUtilgetSafeStringSet in interface OwXMLUtilstrNodeName_p - String name of the subnode with the string listpublic void writeHtmlDump(Writer w_p) throws Exception
OwXMLUtilwriteHtmlDump in interface OwXMLUtilw_p - a WriterExceptionpublic Node getNode()
OwXMLUtilpublic List getSafeNodeList()
OwXMLUtilgetSafeNodeList in interface OwXMLUtilpublic List getSafeNodeList(String strNodeName_p)
OwXMLUtilgetSafeNodeList in interface OwXMLUtilstrNodeName_p - String name of the subnode with the node listpublic Node getSubNode(String strNodeName_p) throws Exception
OwXMLUtilgetSubNode in interface OwXMLUtilstrNodeName_p - tag name of requested nodeExceptionpublic List getSafeUtilList(String nodeName_p, String itemName_p)
OwXMLUtilgetSafeUtilList in interface OwXMLUtilnodeName_p - the subnode nameitemName_p - the name of the item's or null to retrieve all itemsListpublic List getSafeUtilList(String itemName_p)
OwXMLUtilgetSafeUtilList in interface OwXMLUtilitemName_p - the name of the item's or null to retrieve all itemsListpublic OwXMLUtil getSubUtil(String nodeName_p) throws Exception
OwXMLUtilgetSubUtil in interface OwXMLUtilnodeName_p - the subnode nameExceptionpublic URL getURLFromNode(String nodeName_p) throws MalformedURLException
OwXMLUtilgetURLFromNode in interface OwXMLUtilnodeName_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
OwXMLUtilwriteHtmlDumpFiltered in interface OwXMLUtilhtmlWriter_p - a WriterhiddenTags - MapExceptionCopyright © 2014 Alfresco Business Solutions. All Rights Reserved.