Search in sources :

Example 1 with StatusHelper

use of org.talend.repository.ui.properties.StatusHelper in project tdi-studio-se by Talend.

the class MainComposite method getStatusMap.

protected Map<String, String> getStatusMap() {
    statusHelper = new StatusHelper(CoreRuntimePlugin.getInstance().getProxyRepositoryFactory());
    Map<String, String> statusMap = new HashMap();
    try {
        if (statusHelper != null) {
            List<org.talend.core.model.properties.Status> statusList = statusHelper.getStatusList(repositoryObject.getProperty());
            if (statusList != null) {
                for (org.talend.core.model.properties.Status s : statusList) {
                    statusMap.put(s.getCode(), s.getLabel());
                }
            }
        }
    } catch (PersistenceException e) {
        CommonExceptionHandler.process(e);
    }
    return statusMap;
}
Also used : ERepositoryStatus(org.talend.commons.runtime.model.repository.ERepositoryStatus) IStatus(org.eclipse.core.runtime.IStatus) Status(org.talend.core.repository.utils.ConvertJobsUtil.Status) StatusHelper(org.talend.repository.ui.properties.StatusHelper) HashMap(java.util.HashMap) PersistenceException(org.talend.commons.exception.PersistenceException)

Aggregations

HashMap (java.util.HashMap)1 IStatus (org.eclipse.core.runtime.IStatus)1 PersistenceException (org.talend.commons.exception.PersistenceException)1 ERepositoryStatus (org.talend.commons.runtime.model.repository.ERepositoryStatus)1 Status (org.talend.core.repository.utils.ConvertJobsUtil.Status)1 StatusHelper (org.talend.repository.ui.properties.StatusHelper)1