Search in sources :

Example 1 with StandaloneJobPomRepositorySettingNode

use of org.talend.designer.maven.job.setting.repository.standalone.node.StandaloneJobPomRepositorySettingNode in project tdi-studio-se by Talend.

the class StandaloneJobRepositoryMavenSetting method createStandaloneJobChildrenNodes.

public static List<IPreferenceNode> createStandaloneJobChildrenNodes(IFolder nodeFolder, RepositoryNode node, String parentId, boolean checkExist) {
    List<IPreferenceNode> childrenNodes = new ArrayList<IPreferenceNode>();
    // if have existed the pom and assembly
    if (!checkExist || DesignerMavenUiHelper.existMavenSetting(nodeFolder, TalendMavenConstants.POM_FILE_NAME, TalendMavenConstants.ASSEMBLY_FILE_NAME)) {
        IFile pomTemplateFile = nodeFolder.getFile(TalendMavenConstants.POM_FILE_NAME);
        IFile assemblyTemplateFile = nodeFolder.getFile(TalendMavenConstants.ASSEMBLY_FILE_NAME);
        String pomId = DesignerMavenUiHelper.buildRepositoryPreferenceNodeId(parentId, pomTemplateFile);
        String assemblyId = DesignerMavenUiHelper.buildRepositoryPreferenceNodeId(parentId, assemblyTemplateFile);
        StandaloneJobPomRepositorySettingNode pomNode = new StandaloneJobPomRepositorySettingNode(pomId, pomTemplateFile);
        StandaloneJobAssemblyRepositorySettingNode assemblyNode = new StandaloneJobAssemblyRepositorySettingNode(assemblyId, assemblyTemplateFile);
        childrenNodes.add(pomNode);
        childrenNodes.add(assemblyNode);
    }
    return childrenNodes;
}
Also used : IFile(org.eclipse.core.resources.IFile) StandaloneJobPomRepositorySettingNode(org.talend.designer.maven.job.setting.repository.standalone.node.StandaloneJobPomRepositorySettingNode) ArrayList(java.util.ArrayList) IPreferenceNode(org.eclipse.jface.preference.IPreferenceNode) StandaloneJobAssemblyRepositorySettingNode(org.talend.designer.maven.job.setting.repository.standalone.node.StandaloneJobAssemblyRepositorySettingNode)

Aggregations

ArrayList (java.util.ArrayList)1 IFile (org.eclipse.core.resources.IFile)1 IPreferenceNode (org.eclipse.jface.preference.IPreferenceNode)1 StandaloneJobAssemblyRepositorySettingNode (org.talend.designer.maven.job.setting.repository.standalone.node.StandaloneJobAssemblyRepositorySettingNode)1 StandaloneJobPomRepositorySettingNode (org.talend.designer.maven.job.setting.repository.standalone.node.StandaloneJobPomRepositorySettingNode)1