|
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.obj.ConfObjectBase
com.genesyslab.platform.configuration.protocol.obj.ConfObject
com.genesyslab.platform.configuration.protocol.obj.ConfObjectDelta
public class ConfObjectDelta
Configuration delta object represents changes which are done, or which are to be done on particular configuration server object.
Delta objects are used in two main scenarios:RequestRegisterNotification
);EventObjectUpdated
protocol messages containing "delta" data in
EventObjectUpdated.getObjectDelta()
value.
ConfObjectDelta hostDelta = new ConfObjectDelta(metadata, CfgObjectType.CFGHost);
ConfObject obj = (ConfObject) hostDelta.getOrCreatePropertyValue("deltaHost");
obj.setPropertyValue("DBID", objDbid); // - required
obj.setPropertyValue("name", "new-host-name"); // - to set new host name (if needed)
obj.setPropertyValue("IPaddress", "21.21.21.21"); // - to change ip address (if needed)
RequestUpdateObject reqUpdate = RequestUpdateObject.create();
reqUpdate.setObjectDelta(hostDelta);
Message resp = protocol.request(reqUpdate);
if (resp instanceof EventObjectUpdated) {
// The object has been updated
} else if (resp instanceof EventError) {
log.error("Error on object update: "
+ CfgUtilities.getErrorCode(((EventError) resp).getErrorCode())
+ "\tDescription: " + ((EventError) resp).getDescription());
}
Constructor Summary | |
---|---|
ConfObjectDelta(CfgDescriptionObjectDelta metadata)
Constructor for creation of uninitialized delta object container of particular type. |
|
ConfObjectDelta(CfgMetadata metadata,
CfgObjectType objType)
Constructor for creation of uninitialized delta object container of particular type. |
Method Summary | |
---|---|
CfgDescriptionObjectDelta |
getClassInfo()
Returns reference to the delta object class MetaData description. |
java.lang.Integer |
getObjectDbid()
Configuration objects DBID uniquely identifies configuration object of a particular type on particular configuration server. |
Methods inherited from class com.genesyslab.platform.configuration.protocol.obj.ConfObject |
---|
getObjectType |
Methods inherited from class com.genesyslab.platform.configuration.protocol.obj.ConfObjectBase |
---|
checkTypeCompatibility, clone, createChildElement, equals, getAttributeInfo, getOrCreatePropertyValue, getPropertyInfo, getPropertyValue, getPropertyValue, hashCode, setPropertyValue, setPropertyValue, toString, toString, toStringContentHelper, toStringHelper |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConfObjectDelta(CfgDescriptionObjectDelta metadata)
metadata
- configuration object class MetaData.
ConfObjectAttributeException
- if given MetaData is null or there is some problem
with its usage for this data structure.public ConfObjectDelta(CfgMetadata metadata, CfgObjectType objType)
metadata
- actual configuration server MetaData.objType
- configuration object type.
java.lang.NullPointerException
- if given MetaData is null.
ConfObjectAttributeException
- if referred MetaData does not contain description
of given object type or there is some problem with its usage for this data structure.Method Detail |
---|
public CfgDescriptionObjectDelta getClassInfo()
getClassInfo
in class ConfObject
public java.lang.Integer getObjectDbid()
ConfObject
[object type, object DBID]
uniquely specifies
particular configuration object in configuration server database.
This value is been assigned by configuration server at moment of the object creation
and can't be changed during its whole life cycle.
This method is a helper to find the DBID value in the object properties or
properties of child structures depending on this object type.
getObjectDbid
in class ConfObject
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |