use of com.amalto.workbench.utils.JobInfo in project tmdm-studio-se by Talend.
the class RepositoryJobInfoHolder method getExternalInfo.
@Override
public JobInfo[] getExternalInfo() {
List<JobInfo> results = new LinkedList<JobInfo>();
List<IRepositoryViewObject> viewObjs = RepositoryResourceUtil.findAllViewObjects(ERepositoryObjectType.PROCESS);
for (IRepositoryViewObject viewObj : viewObjs) {
Property prop = viewObj.getProperty();
String path = null;
if (prop != null) {
Item item = prop.getItem();
if (item != null) {
path = item.getState().getPath();
}
}
MDMServerDef serverDef = RepositoryResourceUtil.getLastServerDef(viewObj);
String lastServerName = (serverDef != null) ? serverDef.getName() : null;
// the suffix should be "war" or "zip", now use "" to replace
// $NON-NLS-1$
JobInfo jobInfo = new JobInfo(prop.getLabel(), prop.getVersion(), "", path, lastServerName);
results.add(jobInfo);
}
return results.toArray(new JobInfo[0]);
}
Aggregations