|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.platform.configuration.protocol.utilities.ConfDeltaUtility
public final class ConfDeltaUtility
ConfDeltaUtility
class is designed for creation and appliance
of delta objects.
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 |
---|
public ConfDeltaUtility(CfgMetadata metadata)
metadata
- actual Configuration Server MetaData reference.Method Detail |
---|
public ConfObjectDelta createDelta(ConfObject originalObject, ConfObject changedObject)
originalObject
- the original object.changedObject
- the changed instance of the object.
java.lang.NullPointerException
- if some object or its DBID attribute is null.
java.lang.IllegalArgumentException
- if objects have different configuration object types or DBIDs.public void applyDelta(ConfObject theObject, ConfObjectDelta theDelta)
theObject
- the original object.
The object is the subject to change by applying the delta.theDelta
- the delta object.
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.protected void validateObjectsPair(java.lang.String obj1name, ConfObject obj1, java.lang.String obj2name, ConfObject obj2)
createDelta(ConfObject, ConfObject)
and applyDelta(ConfObject, ConfObjectDelta)
public methods.
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)
).
java.lang.NullPointerException
- if some object or its DBID attribute is null.
java.lang.IllegalArgumentException
- if objects have different configuration objects types or DBIDs.createDelta(ConfObject, ConfObject)
,
applyDelta(ConfObject, ConfObjectDelta)
protected static int asIntegerValue(java.lang.Object value)
protected static boolean isZeroIntValue(java.lang.Object value)
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |