com.wewebu.ow.server.util
Interface OwXMLUtil

All Known Implementing Classes:
OwStandardOptionXMLUtil, OwStandardXMLUtil, OwXMLUtilOptionAndPlaceholderFilter, OwXMLUtilPlaceholderFilter

public interface OwXMLUtil

Utility interface for structured configuration data access.

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


Method Summary
 Node getNode()
          return the wrapped DOM Node reference
 boolean getSafeBooleanAttributeValue(String strAttributeName_p, boolean fDefault_p)
          get the value of a boolean attribute [true | false], catch exception
 boolean getSafeBooleanValue(String strNodeName_p, boolean fDefault_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 iDefault_p)
          get the value of a string attribute, catch exception
 int getSafeIntegerValue(String strNodeName_p, int fDefault_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 strDefault_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 strDefault_p)
          get the value of THE node, catch exception
 String getSafeTextValue(String strNodeName_p, String strDefault_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
 

Method Detail

getSubUtil

OwXMLUtil getSubUtil(String nodeName_p)
                     throws Exception
get a sub util node with the given name

Parameters:
nodeName_p - the subnode name
Returns:
OwXMLUtil or null if not found
Throws:
Exception

getSafeUtilList

List getSafeUtilList(String nodeName_p,
                     String itemName_p)
get a list with OwXMLUtil's with the given subname

Parameters:
nodeName_p - the subnode name
itemName_p - the name of the item's or null to retrieve all items
Returns:
a List

getSafeUtilList

List getSafeUtilList(String itemName_p)
get a list with OwXMLUtil's

Parameters:
itemName_p - the name of the item's or null to retrieve all items
Returns:
a List

getNode

Node getNode()
return the wrapped DOM Node reference

Returns:
Node

getSubNode

Node getSubNode(String strNodeName_p)
                throws Exception
get the subnode with the given tagname

Parameters:
strNodeName_p - tag name of requested node
Returns:
org.w3c.dom.Node
Throws:
Exception

getSafeNodeList

List getSafeNodeList()
retrieve a node list in a subnode

Returns:
List of DOM Nodes

getSafeNodeList

List getSafeNodeList(String strNodeName_p)
retrieve a node list in a subnode

Parameters:
strNodeName_p - String name of the subnode with the node list
Returns:
List of DOM Nodes

writeHtmlDump

void writeHtmlDump(Writer w_p)
                   throws Exception
write configuration as HTML to a writer object

Parameters:
w_p - a Writer
Throws:
Exception

getSafeStringList

List getSafeStringList()
retrieve a string list in the node

Returns:
List of Strings

getSafeCDATAList

List getSafeCDATAList(String strNodeName_p)
retrieve a CDATA string list in the node

Returns:
List of Strings

getSafeCDATAList

List getSafeCDATAList()
retrieve a CDATA string list in a subnode

Returns:
List of Strings

getSafeStringList

List getSafeStringList(String strNodeName_p)
retrieve a string list in a subnode

Parameters:
strNodeName_p - String name of the subnode with the string list
Returns:
List of Strings

getSafeStringSet

Set getSafeStringSet(String strNodeName_p)
retrieve a string list in a subnode

Parameters:
strNodeName_p - String name of the subnode with the string list
Returns:
List of Strings

getSafeStringAttributeValue

String getSafeStringAttributeValue(String strAttributeName_p,
                                   String strDefault_p)
get the value of a string attribute, catch exception

Parameters:
strAttributeName_p - name of the String attribute
strDefault_p - Default string in case the attribute could not be found
Returns:
string value of attribute or strDefault_p on failure

getSafeIntegerAttributeValue

int getSafeIntegerAttributeValue(String strAttributeName_p,
                                 int iDefault_p)
get the value of a string attribute, catch exception

Parameters:
strAttributeName_p - name of the String attribute
iDefault_p - Default int in case the attribute could not be found
Returns:
int value of attribute or iDefault_p on failure

getSafeBooleanAttributeValue

boolean getSafeBooleanAttributeValue(String strAttributeName_p,
                                     boolean fDefault_p)
get the value of a boolean attribute [true | false], catch exception

Parameters:
strAttributeName_p - name of the String attribute
fDefault_p - Default string in case the attribute could not be found
Returns:
boolean value of attribute or fDefault_p on failure

getSafeBooleanValue

boolean getSafeBooleanValue(String strNodeName_p,
                            boolean fDefault_p)
get the value of a sub boolean node [true | false], catch exception

Parameters:
strNodeName_p - name of the subnode
fDefault_p - Default value in case the node could not be found
Returns:
boolean value of node or fDefault_p on failure

getSafeIntegerValue

int getSafeIntegerValue(String strNodeName_p,
                        int fDefault_p)
get the value of a sub Integer node, catch exception

Parameters:
strNodeName_p - name of the subnode
fDefault_p - Default value in case the node could not be found
Returns:
int value of node or fDefault_p on failure

getSafeTextValue

String getSafeTextValue(String strNodeName_p,
                        String strDefault_p)
get the value of a sub text node, catch exception

Parameters:
strNodeName_p - name of the text subnode
strDefault_p - Default string in case the node could not be found
Returns:
string value of subnode or strDefault_p on failure

getSafeTextValue

String getSafeTextValue(String strDefault_p)
get the value of THE node, catch exception

Parameters:
strDefault_p - Default string in case the node could not be found
Returns:
string value of subnode or strDefault_p on failure

getURLFromNode

URL getURLFromNode(String nodeName_p)
                   throws MalformedURLException
Helper method to create an URL from given configuration node.

Parameters:
nodeName_p - String name of child node, where to extract the URL
Returns:
java.net.URL
Throws:
MalformedURLException - if the extracted text is not URL conform string
Since:
4.0.0.0


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.