1 19 20 package org.netbeans.modules.j2ee.ejbjarproject; 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 27 31 public final class EjbJarProjectType implements AntBasedProjectType { 32 33 public static final String TYPE = "org.netbeans.modules.j2ee.ejbjarproject"; 34 private static final String PROJECT_CONFIGURATION_NAME = "data"; 35 public static final String PROJECT_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-ejbjarproject/3"; 36 private static final String PRIVATE_CONFIGURATION_NAME = "data"; 37 private static final String PRIVATE_CONFIGURATION_NAMESPACE = "http://www.netbeans.org/ns/j2ee-ejbjarproject-private/1"; 38 39 public String getType() { 40 return TYPE; 41 } 42 43 public Project createProject(AntProjectHelper helper) throws IOException { 44 if (null == helper) 45 throw new IllegalArgumentException ("helper"); 46 return new EjbJarProject(helper); 47 } 48 49 public String getPrimaryConfigurationDataElementName(boolean shared) { 50 return shared ? PROJECT_CONFIGURATION_NAME : PRIVATE_CONFIGURATION_NAME; 51 } 52 53 public String getPrimaryConfigurationDataElementNamespace(boolean shared) { 54 return shared ? PROJECT_CONFIGURATION_NAMESPACE : PRIVATE_CONFIGURATION_NAMESPACE; 55 } 56 57 } 58 | Popular Tags |