Platform SDK Java 8.5 API Reference

com.genesyslab.platform.configuration.protocol.utilities
Class CfgUtilities

java.lang.Object
  extended by com.genesyslab.platform.configuration.protocol.utilities.CfgUtilities

public final class CfgUtilities
extends java.lang.Object

CfgUtilities class is intended as a container for and a point of access to a set of configuration data utility functionality.


Constructor Summary
CfgUtilities(CfgMetadata metadata)
           
 
Method Summary
 void applyDelta(org.w3c.dom.Document xmlObject, org.w3c.dom.Document xmlDelta)
          Applies delta object to an object.
 void applyDelta(org.w3c.dom.Element xObject, org.w3c.dom.Element xDelta)
          Applies delta object to an object.
 org.w3c.dom.Document createDelta(org.w3c.dom.Document originalObject, org.w3c.dom.Document changedObject)
          Creates delta object for an object.
 org.w3c.dom.Element createDelta(org.w3c.dom.Element originalObject, org.w3c.dom.Element changedObject)
          Creates delta object for an object.
static java.lang.String enumLiteralToName(java.lang.String name)
           
static org.w3c.dom.Element findChildElement(org.w3c.dom.Node container, java.lang.String name)
           
static org.w3c.dom.Node findFirst(java.util.List<org.w3c.dom.Node> list, java.lang.String name)
           
 java.lang.Object getAttributeValue(org.w3c.dom.Element parentClass, java.lang.String attributeName)
           
static java.util.List<org.w3c.dom.Element> getChildElements(org.w3c.dom.Node container)
           
static java.lang.String getDataNS()
          Deprecated. 
static java.util.Calendar getDateTime(int utc)
           
static CfgErrorCode getErrorCode(int errorCode)
          Unpacks configuration server error code.
Usage sample:
static CfgErrorType getErrorType(int errorCode)
           
static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Node container)
           
static org.w3c.dom.Element getNextSiblingElement(org.w3c.dom.Node element)
           
static java.lang.String nameToEnumLiteral(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CfgUtilities

public CfgUtilities(CfgMetadata metadata)
Method Detail

getDataNS

@Deprecated
public static java.lang.String getDataNS()
Deprecated. 


getErrorCode

public static CfgErrorCode getErrorCode(int errorCode)
Unpacks configuration server error code.
Usage sample:
 void handleCfgSrvError(final EventError evError) {
     CfgErrorCode errorCode = CfgUtilities.getErrorCode(evError.getErrorCode());
     if (errorCode.getErrorType() == CfgErrorType.CFGObjectNotFound) {
         ...
     }
 }

Parameters:
errorCode - error code from configuration server error event
Returns:
unpacked structure with initialized error attributes
See Also:
EventError.getErrorCode()

getErrorType

public static CfgErrorType getErrorType(int errorCode)

getDateTime

public static java.util.Calendar getDateTime(int utc)

getAttributeValue

public java.lang.Object getAttributeValue(org.w3c.dom.Element parentClass,
                                          java.lang.String attributeName)

applyDelta

public void applyDelta(org.w3c.dom.Document xmlObject,
                       org.w3c.dom.Document xmlDelta)
Applies delta object to an object. The xml presentation of the parameters should be valid, including order/sequence of its elements. The 'DBID' elements of the object parameters should be present and have equal values.

Parameters:
xmlObject - Is an original object in Document format. The object is the subject to change by applying the delta. The root element of the object should be the configuration data wrapper: 'ConfData'.
xmlDelta - Is a delta object in Document format. The root element of the object should be the configuration data wrapper: 'ConfData'.

applyDelta

public void applyDelta(org.w3c.dom.Element xObject,
                       org.w3c.dom.Element xDelta)
Applies delta object to an object. The xml presentation of the parameters should be valid, including order/sequence of its elements. The 'DBID' elements of the object parameters should be present and have equal values.

Parameters:
xObject - Is an original object The object is the subject to change by applying the delta.
xDelta - Is a delta object

createDelta

public org.w3c.dom.Document createDelta(org.w3c.dom.Document originalObject,
                                        org.w3c.dom.Document changedObject)
Creates delta object for an object. The xml presentation of the parameters should be valid, including order/sequence of its elements. The 'DBID' elements of the object parameters should be present and have equal values.

Parameters:
originalObject - Is an original object. The root element of the object should be the configuration data wrapper: 'ConfData'.
changedObject - Is the changed object. The root element of the object should be the configuration data wrapper: 'ConfData'.
Returns:
A delta object as the result of the create delta operation.

createDelta

public org.w3c.dom.Element createDelta(org.w3c.dom.Element originalObject,
                                       org.w3c.dom.Element changedObject)
Creates delta object for an object. The xml presentation of the parameters should be valid, including order/sequence of its elements. The 'DBID' elements of the object parameters should be present and have equal values.

Parameters:
originalObject - Is an original object.
changedObject - Is the changed object.
Returns:
A delta object as the result of the create delta operation.

enumLiteralToName

public static java.lang.String enumLiteralToName(java.lang.String name)

nameToEnumLiteral

public static java.lang.String nameToEnumLiteral(java.lang.String name)

getFirstChildElement

public static org.w3c.dom.Element getFirstChildElement(org.w3c.dom.Node container)

getNextSiblingElement

public static org.w3c.dom.Element getNextSiblingElement(org.w3c.dom.Node element)

getChildElements

public static java.util.List<org.w3c.dom.Element> getChildElements(org.w3c.dom.Node container)

findChildElement

public static org.w3c.dom.Element findChildElement(org.w3c.dom.Node container,
                                                   java.lang.String name)

findFirst

public static org.w3c.dom.Node findFirst(java.util.List<org.w3c.dom.Node> list,
                                         java.lang.String name)

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.