Search in sources :

Example 1 with WSMDMJob

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);
}
Also used : WSMDMJob(com.amalto.workbench.webservices.WSMDMJob) TreeParent(com.amalto.workbench.models.TreeParent) TreeObject(com.amalto.workbench.models.TreeObject) WSMDMNULL(com.amalto.workbench.webservices.WSMDMNULL)

Aggregations

TreeObject (com.amalto.workbench.models.TreeObject)1 TreeParent (com.amalto.workbench.models.TreeParent)1 WSMDMJob (com.amalto.workbench.webservices.WSMDMJob)1 WSMDMNULL (com.amalto.workbench.webservices.WSMDMNULL)1