Search in sources :

Example 6 with Information

use of org.talend.core.model.properties.Information in project tdi-studio-se by Talend.

the class Problems method addRoutineFile.

public static List<Information> addRoutineFile(IFile file, final Property property, boolean... fromJob) {
    if (file == null) {
        return Collections.emptyList();
    }
    String routineFileName = null;
    String version = null;
    if (property == null) {
        routineFileName = getFileName(file);
    } else {
        routineFileName = property.getLabel();
        version = property.getVersion();
    }
    ProblemType type = ProblemType.NONE;
    if (property.getItem() instanceof RoutineItem) {
        type = ProblemType.ROUTINE;
    } else if (property.getItem() instanceof ProcessItem) {
        type = ProblemType.JOB;
    }
    List<Information> listInfos = addRoutineFile(file, type, routineFileName, version, fromJob);
    if (property == null || listInfos == null) {
        return Collections.emptyList();
    }
    return listInfos;
}
Also used : ProcessItem(org.talend.core.model.properties.ProcessItem) ProblemType(org.talend.core.model.process.Problem.ProblemType) RoutineItem(org.talend.core.model.properties.RoutineItem) Information(org.talend.core.model.properties.Information)

Aggregations

Information (org.talend.core.model.properties.Information)6 ArrayList (java.util.ArrayList)2 IMarker (org.eclipse.core.resources.IMarker)2 CoreException (org.eclipse.core.runtime.CoreException)2 IPath (org.eclipse.core.runtime.IPath)2 ProblemStatus (org.talend.core.model.process.Problem.ProblemStatus)2 InformationLevel (org.talend.core.model.properties.InformationLevel)2 ProcessItem (org.talend.core.model.properties.ProcessItem)2 RoutineItem (org.talend.core.model.properties.RoutineItem)2 HashSet (java.util.HashSet)1 PersistenceException (org.talend.commons.exception.PersistenceException)1 ProblemType (org.talend.core.model.process.Problem.ProblemType)1 Item (org.talend.core.model.properties.Item)1 Property (org.talend.core.model.properties.Property)1 IProxyRepositoryFactory (org.talend.repository.model.IProxyRepositoryFactory)1 IRepositoryService (org.talend.repository.model.IRepositoryService)1