|
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.applicationblocks.com.CfgBase
com.genesyslab.platform.applicationblocks.com.CfgObject
public abstract class CfgObject
This is a base class for all standalone Configuration Server objects.
Constructor Summary | |
---|---|
protected |
CfgObject(IConfService confService,
ConfObjectBase objectData,
boolean isSaved,
java.lang.Object[] additionalParameters)
|
protected |
CfgObject(IConfService confService,
org.w3c.dom.Node xmlData,
java.lang.Object[] additionalParameters)
Main constructor designed for usage from generated classes in deserializing constructors. |
Method Summary | |
---|---|
CfgObject |
clone()
Creates and returns a copy of this object. |
void |
delete()
Deletes the configuration object from the Configuration Server. |
protected void |
doSetFolderId(java.lang.Integer dbid)
|
protected void |
ensureDataBackup()
This internal method is designed for "lazy initialization" of DOM data backup. |
java.lang.Integer |
getFolderId()
This property specifies DBID of the folder, in which the object resides in the Configuration Server. |
int |
getObjectDbid()
Returns the dbid of the current object, or 0 if object has not been saved. |
java.lang.String |
getObjectPath()
Returns path of the object in the Configuration Server. |
CfgObjectType |
getObjectType()
Returns the configuration object type. |
void |
refresh()
Retrieves the latest data from the Configuration Server and updates the object's data. |
protected void |
reloadObjectWithNewData(ConfObject newObject)
|
protected void |
reloadObjectWithNewData(ConfObject newObject,
java.lang.String objectPath,
java.lang.Integer folderDbid)
|
void |
removeAccount(CfgObject accountObject,
boolean recursive)
Deprecated. |
protected void |
resetDataBackup()
|
int |
retrieveAccountPermissions(CfgObject accountObject)
Retrieves a permission mask (see CfgPermissions enumeration)
of accessing the object by a specified account (another configuration object). |
CfgACL |
retrieveACL()
Retrieves a full list of permissions to access this object for all user accounts. |
java.util.List<PermissionDescriptor> |
retrievePermissions()
Deprecated. |
void |
save()
Synchronizes changes in a class with Configuration Server. |
void |
setAccountPermissions(CfgObject accountObject,
int newPermissionsMask)
Deprecated. |
void |
setAccountPermissions(CfgObject accountObject,
int newPermissionsMask,
boolean recursive)
Deprecated. |
void |
setFolderId(java.lang.Integer dbid)
This property specifies DBID of the folder, in which the object will reside in the Configuration Server. This method is to be used while the object is been created, but not modified. |
void |
update(ICfgDelta deltaObject)
Updates the current object from the passed delta object. |
boolean |
updateACL(CfgObject accountObject,
java.lang.Integer newPermissionsMask,
boolean recursive)
Changes the permissions on this object for the specified account. |
Methods inherited from class com.genesyslab.platform.applicationblocks.com.CfgBase |
---|
equals, flushChildrenContent, getConfigurationService, getData, getEndpoint, getLinkListCollection, getLinkValue, getLogger, getMetaData, getParent, getProperty, getProperty, getProperty, getRawObjectData, hashCode, initStruct, isSaved, lockObject, resolveLink, setProperty, toString, toStringProperties, toXml, updateChildrenSavedState |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.genesyslab.platform.applicationblocks.com.ICfgBase |
---|
getEndpoint, getProperty, getRawObjectData, setProperty, toXml |
Constructor Detail |
---|
protected CfgObject(IConfService confService, ConfObjectBase objectData, boolean isSaved, java.lang.Object[] additionalParameters)
protected CfgObject(IConfService confService, org.w3c.dom.Node xmlData, java.lang.Object[] additionalParameters)
confService
- configuration service instancexmlData
- bound data from Configuration SDK messageadditionalParameters
- additional parameters from Configuration SDK messageMethod Detail |
---|
public CfgObjectType getObjectType()
getObjectType
in interface ICfgObject
public int getObjectDbid()
getObjectDbid
in interface ICfgObject
public final java.lang.String getObjectPath()
ICfgFilterBasedQuery.getDoRequestObjectPath()
option enabled, configuration server did not return
this value for some reason, or this multiple objects read response does not contain paths for
all the objects read.
Note: Be aware that to track moving of the object to different folder ("to different path")
in the configuration server, it is required to subscribe for CfgFolder
's changes
and look which CfgFolder
got updated to contain this particular object.
ICfgFilterBasedQuery.getDoRequestObjectPath()
public final java.lang.Integer getFolderId()
ICfgFilterBasedQuery.getDoRequestFolderId()
option enabled, configuration server did not return
this value for some reason, or this multiple objects read response does not contain folders DBIDs for
all the objects read.
Note: Be aware that to track moving of the object to different folder
in the configuration server, it is required to subscribe for CfgFolder
's changes
and look which CfgFolder
got updated to contain this particular member.
ICfgFilterBasedQuery.getDoRequestFolderId()
public final void setFolderId(java.lang.Integer dbid)
CfgFolder
, add the new member and save it.
dbid
- folder DBID.
ConfigRuntimeException
- is object is saved.protected final void doSetFolderId(java.lang.Integer dbid)
protected void reloadObjectWithNewData(ConfObject newObject)
reloadObjectWithNewData
in class CfgBase
protected void reloadObjectWithNewData(ConfObject newObject, java.lang.String objectPath, java.lang.Integer folderDbid)
public void save() throws ConfigException
save
in interface ICfgObject
ConfigException
- exception while requesting configuration information updatepublic void delete() throws ConfigException
delete
in interface ICfgObject
ConfigException
- in case of exception on object remove requestpublic void refresh() throws ConfigException
refresh
in interface ICfgObject
ConfigException
- exception while requesting configuration informationpublic void update(ICfgDelta deltaObject)
update
in interface ICfgObject
deltaObject
- the delta object received from configuration serverpublic int retrieveAccountPermissions(CfgObject accountObject) throws ConfigException
CfgPermissions
enumeration)
of accessing the object by a specified account (another configuration object).
For example, called on CfgTenant with CfgAgent as a parameter, returns the set of permissions for this
agent to access this tenant.
accountObject
- account (can be any Configuration Server class).
ConfigException
- exception while requesting configuration informationCfgPermissions
,
retrieveACL()
,
updateACL(CfgObject, Integer, boolean)
@Deprecated public java.util.List<PermissionDescriptor> retrievePermissions() throws ConfigException
ConfigException
- exception while requesting configuration informationretrieveACL()
,
retrieveAccountPermissions(CfgObject)
public CfgACL retrieveACL() throws ConfigException
ConfigException
- exception while requesting configuration information.retrieveAccountPermissions(CfgObject)
,
updateACL(CfgObject, Integer, boolean)
public boolean updateACL(CfgObject accountObject, java.lang.Integer newPermissionsMask, boolean recursive) throws ConfigException
accountObject
- Account (can be any Configuration Server class)newPermissionsMask
- New permissions mask or null. See
CfgPermissions
enumeration. Null
means that the account record should be removed from the ACL.recursive
- This flag, if set to true
, directs Configuration Server to remove permissions
at the objects subordinate to the one specified in the accountObject parameter.
This way all the subordinate objects will receive permissions identical
to their parent object. However, this is not the way to set up an individual
permission recursively. For this purpose the NoPropagate flag
in the permission record should be used. The flag is only relevant
to the following object types: CfgFolder, CfgTenant, CfgSwitch, CfgIVR, CfgEnumerator.
true
if ACL was updated, or false
if no change was made.
ConfigException
- exception while requesting configuration information updateCfgPermissions
,
retrieveACL()
,
retrieveAccountPermissions(CfgObject)
@Deprecated public void removeAccount(CfgObject accountObject, boolean recursive) throws ConfigException
updateACL(accountObject, null, recursive)
instead of it.
accountObject
- the account object to remove from the access listrecursive
- specifies whether to remove the account recursively from child objects
ConfigException
- exception while updating configuration informationupdateACL(CfgObject, Integer, boolean)
@Deprecated public void setAccountPermissions(CfgObject accountObject, int newPermissionsMask) throws ConfigException
accountObject
- Account (can be any Configuration Server class)newPermissionsMask
- New permissions mask. See
CfgPermissions
enumeration.
ConfigException
- exception while requesting configuration information updateCfgPermissions
,
updateACL(CfgObject, Integer, boolean)
@Deprecated public void setAccountPermissions(CfgObject accountObject, int newPermissionsMask, boolean recursive) throws ConfigException
accountObject
- Account (can be any Configuration Server class)newPermissionsMask
- New permissions mask. See
CfgPermissions
enumeration.recursive
- This flag, if set to TRUE, directs Configuration Server to remove permissions
at the objects subordinate to the one specified in the accountObject parameter.
This way all the subordinate objects will receive permissions identical
to their parent object. However, this is not the way to set up an individual
permission recursively. For this purpose the NoPropagate flag
in the permission record should be used. The flag is only relevant
to the following object types: CfgFolder, CfgTenant, CfgSwitch, CfgIVR, CfgEnumerator
ConfigException
- exception while requesting configuration information updateCfgPermissions
,
updateACL(CfgObject, Integer, boolean)
protected void ensureDataBackup()
ensureDataBackup
in class CfgBase
protected void resetDataBackup()
public CfgObject clone() throws java.lang.CloneNotSupportedException
ICfgObject
clone
in interface ICfgObject
clone
in class CfgBase
java.lang.CloneNotSupportedException
- subclasses that override
the clone
method can throw this exception
to indicate that an instance cannot be cloned.Cloneable
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |