1 19 20 package org.netbeans.modules.j2ee.earproject; 21 22 import java.io.IOException ; 23 import org.netbeans.api.project.Project; 24 import org.netbeans.spi.project.support.ant.AntBasedProjectType; 25 import org.netbeans.spi.project.support.ant.AntProjectHelper; 26 31 public final class EarProjectType implements AntBasedProjectType { 32 33 public static final String TYPE = "org.netbeans.modules.j2ee.earproject"; 34 private static final String PROJECT_CONFIGURATION_NAME = "data"; 35 public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-earproject/2"; 36 private static final String PRIVATE_CONFIGURATION_NAME = "data"; 37 private static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-earproject-private/1"; 38 39 40 public EarProjectType() {} 41 42 public String getType() { 43 return TYPE; 44 } 45 46 public Project createProject(AntProjectHelper helper) throws IOException { 47 if (null == helper) 48 throw new IllegalArgumentException ("helper"); 49 return new EarProject(helper, this); 50 } 51 52 public String getPrimaryConfigurationDataElementName(boolean shared) { 53 return shared ? PROJECT_CONFIGURATION_NAME : PRIVATE_CONFIGURATION_NAME; 54 } 55 56 public String getPrimaryConfigurationDataElementNamespace(boolean shared) { 57 return shared ? PROJECT_CONFIGURATION_NAMESPACE : PRIVATE_CONFIGURATION_NAMESPACE; 58 } 59 60 } 61 | Popular Tags |