XInterface Provider = (XInterface) ((XMultiServiceFactory)tParam.getMSF())
.createInstance("com.sun.star.comp.configuration.ConfigurationProvider");
XMultiServiceFactory pMSF = (XMultiServiceFactory) UnoRuntime.queryInterface(
XMultiServiceFactory.class,
Provider);
XHierarchicalNameAccess names = (XHierarchicalNameAccess) UnoRuntime.queryInterface(
XHierarchicalNameAccess.class,
pMSF.createInstanceWithArguments(
"com.sun.star.configuration.ConfigurationAccess",
nodeArgs));
oObj = (XInterface) names.getByHierarchicalName("Jobs");
// create a changeable view on the element for XContainer interface
XNameAccess access = (XNameAccess) UnoRuntime.queryInterface(XNameAccess.class, pMSF.createInstanceWithArguments(
"com.sun.star.configuration.ConfigurationUpdateAccess", nodeArgs));
updateAccess = (XNameReplace) UnoRuntime.queryInterface(XNameReplace.class, access.getByName("Jobs"));
XSingleServiceFactory jobsFac = (XSingleServiceFactory) UnoRuntime.queryInterface(
XSingleServiceFactory.class,
updateAccess);
instance = jobsFac.createInstance();
} catch (com.sun.star.uno.Exception e) {
e.printStackTrace();
}
log.println("ImplementationName: " + utils.getImplName(oObj));
TestEnvironment tEnv = new TestEnvironment(oObj);
XNameAccess names = (XNameAccess) UnoRuntime.queryInterface(
XNameAccess.class, oObj);
String[] pNames = names.getElementNames();
tEnv.addObjRelation("ElementName", pNames[0]);
tEnv.addObjRelation("cannotSwitchParent",
"configmgr: BasicElement::setParent: cannot move Entry");