Search in sources :

Example 1 with ProblemType

use of org.talend.core.model.process.Problem.ProblemType 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

ProblemType (org.talend.core.model.process.Problem.ProblemType)1 Information (org.talend.core.model.properties.Information)1 ProcessItem (org.talend.core.model.properties.ProcessItem)1 RoutineItem (org.talend.core.model.properties.RoutineItem)1