Platform SDK Java 8.5 API Reference

com.genesyslab.platform.configuration.protocol.obj
Class ConfObject

java.lang.Object
  extended by com.genesyslab.platform.configuration.protocol.obj.ConfObjectBase
      extended by com.genesyslab.platform.configuration.protocol.obj.ConfObject
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
ConfObjectBrief, ConfObjectDelta

public class ConfObject
extends ConfObjectBase

Class represents particular configuration object information container.
It contains a compact set of properties which are indexed and mapped in accordance to referred actual configuration server CfgMetadata.

Sample usage scenarios are following:

Note: Be aware that some objects attributes may have special structure type like ParentID or OwnerID in Folder object.
It is possible to create and fill ConfStructure instance separately, and set it as objects' property value like this (its not right, don't use it):

 ConfStructure ownerId = new ConfStructure(metadata, CfgStructureType.CFGID);
 ownerId.setPropertyValue("type", 7);
 ownerId.setPropertyValue("DBID", 1);
 folder.setPropertyValue("ownerID", ownerId);
It may work in some cases, but it can fail in other scenarios like XML serialization.
Recommended way is to use special helper method getOrCreatePropertyValue():
 ConfStructure ownerId = (ConfStructure) folder.getOrCreatePropertyValue("ownerID");
 ownerId.setPropertyValue("type", 7);
 ownerId.setPropertyValue("DBID", 1);
This method works for child structure or structure collection properties. For example, adding of members to access group may look like:
 ConfStructureCollection members = (ConfStructureCollection) accGroup.getOrCreatePropertyValue("memberIDs");
 ConfStructure id = members.createStructure();
 id.setPropertyValue("type", CfgObjectType.CFGPerson.ordinal());
 id.setPropertyValue("DBID", person1.getObjectDbid());
 members.add(id);
 id = members.createStructure();
 id.setPropertyValue("type", CfgObjectType.CFGPerson.ordinal());
 id.setPropertyValue("DBID", person2.getObjectDbid());
 members.add(id);
Note*: Structure collections does not control uniqueness of child elements. So, in mentioned sample it is supposed that the persons are not present in the members list already.


Constructor Summary
ConfObject(CfgDescriptionObject metadata)
          Constructor for creation of uninitialized object of particular type.
ConfObject(CfgMetadata metadata, CfgObjectType objType)
          Constructor for creation of uninitialized object of particular type.
 
Method Summary
 CfgDescriptionObject getClassInfo()
          Returns reference to the object class MetaData description.
 java.lang.Integer getObjectDbid()
          Configuration objects DBID uniquely identifies configuration object of a particular type on particular configuration server.
 CfgObjectType getObjectType()
          Returns type of the configuration object.
 
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

ConfObject

public ConfObject(CfgDescriptionObject metadata)
Constructor for creation of uninitialized object of particular type. Its type is strictly defined by the configuration class MetaData.

Parameters:
metadata - configuration object class MetaData.
Throws:
ConfObjectAttributeException - if given MetaData is null or there is some problem with its usage here.

ConfObject

public ConfObject(CfgMetadata metadata,
                  CfgObjectType objType)
Constructor for creation of uninitialized object of particular type.

Parameters:
metadata - actual configuration server MetaData.
objType - configuration object type.
Throws:
java.lang.NullPointerException - if given MetaData is null.
ConfObjectAttributeException - if there is no MetaData for referred type or there is some problem with its usage here.
Method Detail

getClassInfo

public CfgDescriptionObject getClassInfo()
Returns reference to the object class MetaData description.

Overrides:
getClassInfo in class ConfObjectBase
Returns:
object class MetaData description.

getObjectType

public CfgObjectType getObjectType()
Returns type of the configuration object.

Returns:
configuration object type.

getObjectDbid

public java.lang.Integer getObjectDbid()
Configuration objects DBID uniquely identifies configuration object of a particular type on particular configuration server. It means that pair [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.

Returns:
configuration object DBID or null.

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.