Genesys CTI User Forum
Genesys CTI User Forum => Genesys-related Development => Topic started by: genesyslearner on August 24, 2018, 04:44:03 PM
-
Hi Experts,
I am trying to create a new DID Group & Resource group using Platform SDK but i am not able to find the class through which i could create them.
Could you please help me with the class name or any pointer?
-
These are not their own objects.. they are options co figured in the annex of other objects. DID groups (if I recall) are configured on the Tenang object. Resource groups are configured either on the annex of an application folder, or by specifying the option in the connection tab (connection tab of RM, connecting to MCP)..
The best bet is to create these objects in GA or GAX and review the objects (the Tenant and the Application Folder objects)
-
Hi jamesmurphyau,
Thanks for your advise. It did help me getting the code set for DIDGroup but for Resource Group, i need to create a folder under which i will add Applcation objectID. But i am getting the error:- No persmissions to create an object under this folder.
Here is the the code for DID Group which is working:-
CfgTenantQuery ctq = new CfgTenantQuery();
ctq.setDbid(1);
CfgTenant ct = confService.retrieveObject(CfgTenant.class, ctq);
KeyValueCollection kvc = ct.getUserProperties();
if (kvc != null)
{
if (kvc.containsKey("gvp.dn-groups"))
{
KeyValueCollection kvc1 = kvc.getList("gvp.dn-groups");
kvc1.addString("demo_test", "");
System.out.println("Success");
}
}
ct.save();
-
So,...check permissions for the user you are using
Check CfgServer logs
-
Sorry cavagnaro for the late reply as i was on long leave.
The thing is as we create a Resource group , CME automatically creates a folder with name "GVP_name we give_LRG" at the root level. I am finding it difficult to code for this automatic folder creation.
-
Why would you do that? Just curious. Seems you wanna replace GA? How often does one need to deploy a MCP into an existing environment?
-
Hey Cavagnaro,
this is the requirement given to us by our client which is to check whether we are able to get each and every configuration of CME through Platform SDK.
-
LRGP is just a CfgFolder type, so you have to create folder and configure options related to the LRGP configuration.
-
Hi All,
Here is the code to make a folder at Tenant level:-
CfgTenantQuery ctq = new CfgTenantQuery();
ctq.setDbid(1);
CfgTenant cfgFolderParent = ctq.executeSingleResult();
folderId = cfgFolderParent.getDBID();
ownerId = new CfgOwnerID(confService,null);
ownerId.setDBID(cfgFolderParent.getDBID());
ownerId.setType(cfgFolderParent.getObjectType());
CfgFolder folder = new CfgFolder(confService);
folder.setName("test");
folder.setOwnerID(ownerId);
folder.setType(CfgObjectType.CFGFolder);
folder.setFolderClass(CfgFolderClass.CFGFCDefault);
folder.setCustomType(0);
folder.save();