Platform SDK Java 8.5 API Reference

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

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

public final class ConfDeltaUtility
extends java.lang.Object

ConfDeltaUtility class is designed for creation and appliance of delta objects.

"Delta object" is a special kind of configuration data structure representing changes on a particular configuration server object.
It is used in the configuration server protocol in client request to update object on server, or in server notification to clients to notify about objects changes by correspondent subscriptions.


Nested Class Summary
protected static class ConfDeltaUtility.ConfIDComparator
          Comparator function for "CfgID" configuration structures.
protected static class ConfDeltaUtility.ConfStructKeysComparator
          Comparator function for comparing of configuration structures by their key attributes values.
 
Constructor Summary
ConfDeltaUtility(CfgMetadata metadata)
          Delta utility constructor.
 
Method Summary
 void applyDelta(ConfObject theObject, ConfObjectDelta theDelta)
          Applies delta object to the correspondent configuration object.
The 'DBID' attribute of the both parameters should be present and should have equal values.
protected static int asIntegerValue(java.lang.Object value)
           
 ConfObjectDelta createDelta(ConfObject originalObject, ConfObject changedObject)
          Creates delta object for configuration object.
Method parameters should be "old" and "new" versions of a single object in configuration server.
The 'DBID' attribute of the both objects parameters should be present and be same value.
protected static boolean isZeroIntValue(java.lang.Object value)
           
protected  void validateObjectsPair(java.lang.String obj1name, ConfObject obj1, java.lang.String obj2name, ConfObject obj2)
          Parameters validation method for createDelta(ConfObject, ConfObject) and applyDelta(ConfObject, ConfObjectDelta) public methods.
It checks configuration objects types and their DBID attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfDeltaUtility

public ConfDeltaUtility(CfgMetadata metadata)
Delta utility constructor.

Parameters:
metadata - actual Configuration Server MetaData reference.
Method Detail

createDelta

public ConfObjectDelta createDelta(ConfObject originalObject,
                                   ConfObject changedObject)
Creates delta object for configuration object.
Method parameters should be "old" and "new" versions of a single object in configuration server.
The 'DBID' attribute of the both objects parameters should be present and be same value.

Parameters:
originalObject - the original object.
changedObject - the changed instance of the object.
Returns:
delta object containing differences between given object states.
Throws:
java.lang.NullPointerException - if some object or its DBID attribute is null.
java.lang.IllegalArgumentException - if objects have different configuration object types or DBIDs.

applyDelta

public void applyDelta(ConfObject theObject,
                       ConfObjectDelta theDelta)
Applies delta object to the correspondent configuration object.
The 'DBID' attribute of the both parameters should be present and should have equal values.

Parameters:
theObject - the original object. The object is the subject to change by applying the delta.
theDelta - the delta object.
Throws:
java.lang.NullPointerException - if some object or its DBID attribute is null.
java.lang.IllegalArgumentException - if given object and the delta have different configuration object types or DBIDs.

validateObjectsPair

protected void validateObjectsPair(java.lang.String obj1name,
                                   ConfObject obj1,
                                   java.lang.String obj2name,
                                   ConfObject obj2)
Parameters validation method for createDelta(ConfObject, ConfObject) and applyDelta(ConfObject, ConfObjectDelta) public methods.
It checks configuration objects types and their DBID attributes.

Parameters:
obj1name - name of the first parameter (used for possible exception message).
obj1 - object "old" version instance.
obj2name - name of the second parameter (used for possible exception message).
obj2 - object "new" version instance (from createDelta(ConfObject, ConfObject)) of delta object (from applyDelta(ConfObject, ConfObjectDelta)).
Throws:
java.lang.NullPointerException - if some object or its DBID attribute is null.
java.lang.IllegalArgumentException - if objects have different configuration objects types or DBIDs.
See Also:
createDelta(ConfObject, ConfObject), applyDelta(ConfObject, ConfObjectDelta)

asIntegerValue

protected static int asIntegerValue(java.lang.Object value)

isZeroIntValue

protected static boolean isZeroIntValue(java.lang.Object value)

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.