use of com.amalto.workbench.webservices.WSMDMJob in project tmdm-studio-se by Talend.
the class JobAvailableModel method addTreeObjects.
@Override
public void addTreeObjects(TMDMService service, IProgressMonitor monitor, TreeParent serverRoot) {
monitor.subTask(Messages.JobAvailableModel_LoadingJobs);
// MDM Job
TreeParent jobs = serverRoot.findServerFolder(TreeObject.JOB_REGISTRY);
if (jobs == null) {
jobs = new TreeParent(EXtentisObjects.JobRegistry.getDisplayName(), serverRoot, TreeObject.JOB_REGISTRY, null, null);
}
TreeParent deployedJob = new TreeParent(Messages.JobAvailableModel_DeployedJobs, serverRoot, TreeObject.BUILT_IN_CATEGORY_FOLDER, null, null);
try {
List<WSMDMJob> jobPKs = service.getMDMJob(new WSMDMNULL()).getWsMDMJob();
if (jobPKs != null) {
for (WSMDMJob jobPK : jobPKs) {
// $NON-NLS-1$
String name = jobPK.getJobName() + "_" + jobPK.getJobVersion() + jobPK.getSuffix();
TreeObject obj = new TreeObject(name, serverRoot, TreeObject.JOB, name, null);
deployedJob.addChild(obj);
}
}
} catch (Exception e) {
}
jobs.addChild(deployedJob);
serverRoot.addChild(jobs);
monitor.worked(1);
}
Aggregations