UnoRuntime.queryInterface(XSingleServiceFactory.class, jobs);
Object oNewJob = jobsFac.createInstance();
XNameReplace xNewJobNR = (XNameReplace)
UnoRuntime.queryInterface(XNameReplace.class, oNewJob);
xNewJobNR.replaceByName("Service", "test.Job");
XNameContainer xJobsNC = (XNameContainer)
UnoRuntime.queryInterface(XNameContainer.class, jobs);
xJobsNC.insertByName("TestJob", oNewJob);
log.println("Adding configuration to Events ...");
XSingleServiceFactory eventsFac = (XSingleServiceFactory)
UnoRuntime.queryInterface(XSingleServiceFactory.class, events);
Object oNewEvent = eventsFac.createInstance();
XNameAccess xNewEventNA = (XNameAccess)
UnoRuntime.queryInterface(XNameAccess.class, oNewEvent);
Object oJobList = xNewEventNA.getByName("JobList");
XSingleServiceFactory jobListFac = (XSingleServiceFactory)
AnyConverter.toObject(new Type(XSingleServiceFactory.class),
oJobList);
XNameContainer jobListNC = (XNameContainer)
AnyConverter.toObject(new Type(XNameContainer.class),
oJobList);
log.println("\tAdding TimeStamps to Events ...");
Object oNewJobTimeStamps = jobListFac.createInstance();
jobListNC.insertByName("TestJob", oNewJobTimeStamps);
XNameContainer xEventsNC = (XNameContainer)
UnoRuntime.queryInterface(XNameContainer.class, events);
xEventsNC.insertByName("TestEvent", oNewEvent);
XChangesBatch xCB = (XChangesBatch)
UnoRuntime.queryInterface(XChangesBatch.class, oRootCfg);
xCB.commitChanges();