1 29 30 package com.caucho.server.e_app; 31 32 import com.caucho.config.ConfigException; 33 import com.caucho.util.L10N; 34 import com.caucho.vfs.Path; 35 36 import java.util.ArrayList ; 37 38 41 public class ApplicationConfig { 42 private static final L10N L = new L10N(ApplicationConfig.class); 43 44 private String _displayName; 45 private String _description; 46 47 private ArrayList <WebModule> _webModules = new ArrayList <WebModule>(); 48 private ArrayList <Path> _ejbModules = new ArrayList <Path>(); 49 private ArrayList <Path> _javaModules = new ArrayList <Path>(); 50 private ArrayList <String > _connectorModules = new ArrayList <String >(); 51 private ArrayList <String > _altDDModules = new ArrayList <String >(); 52 53 56 public ApplicationConfig() 57 { 58 } 59 60 63 public void setId(String id) 64 { 65 } 66 67 70 public void setVersion(String version) 71 { 72 } 73 74 77 public void setSchemaLocation(String schema) 78 { 79 } 80 81 84 public void setDisplayName(String name) 85 { 86 _displayName = name; 87 } 88 89 92 public void setDescription(String description) 93 { 94 _description = description; 95 } 96 97 100 public void setIcon(Icon icon) 101 { 102 } 103 104 107 public Module createModule() 108 { 109 return new Module(); 110 } 111 112 115 public void addSecurityRole(SecurityRole role) 116 { 117 } 118 119 122 ArrayList <WebModule> getWebModules() 123 { 124 return _webModules; 125 } 126 127 130 ArrayList <Path> getEjbModules() 131 { 132 return _ejbModules; 133 } 134 135 138 ArrayList <Path> getJavaModules() 139 { 140 return _javaModules; 141 } 142 143 public class Module { 144 private String _id; 145 146 149 public void setId(String id) 150 { 151 _id = id; 152 } 153 154 157 public void addWeb(WebModule web) 158 { 159 _webModules.add(web); 160 161 } 162 163 166 public void addEjb(Path path) 167 { 168 _ejbModules.add(path); 169 } 170 171 174 public void addJava(Path path) 175 throws ConfigException 176 { 177 if (! path.canRead()) 178 throw new ConfigException(L.l("<java> module {0} must be a valid path.", 179 path)); 180 181 _javaModules.add(path); 182 } 183 184 187 public void addConnector(String path) 188 { 189 _connectorModules.add(path); 190 } 191 192 195 public void addAltDD(String path) 196 { 197 _altDDModules.add(path); 198 } 199 } 200 } 201 | Popular Tags |