1 20 21 22 package net.sourceforge.jarbundler; 23 24 import java.util.ArrayList ; 26 import java.util.Hashtable ; 27 import java.util.List ; 28 import java.util.LinkedList ; 29 30 import java.lang.String ; 32 33 public class AppBundleProperties { 34 35 private String mApplicationName; 37 private String mMainClass; 38 39 private String mCFBundleName = null; 41 42 private String mCFBundleShortVersionString = "1.0"; 44 45 private String mCFBundleGetInfoString = null; 47 48 private String mCFBundleVersion = null; 50 51 private String mCFHelpBookFolder = null; 53 54 private String mCFHelpBookName = null; 56 57 private boolean mCFBundleAllowMixedLocalizations = false; 59 60 private String mCFBundleExecutable = "JavaApplicationStub"; 62 63 private String mCFBundleDevelopmentRegion = "English"; 65 66 private final String mCFBundlePackageType = "APPL"; 68 69 private String mCFBundleSignature = "????"; 71 72 private String mJVMVersion = "1.3+"; 74 75 private final String mCFBundleInfoDictionaryVersion = "6.0"; 77 78 80 private String mCFBundleIconFile = null; 81 private String mCFBundleIdentifier = null; 82 private String mVMOptions = null; private String mWorkingDirectory = null; private String mArguments = null; 86 private List mClassPath = new ArrayList (); 88 private List mExtraClassPath = new ArrayList (); 89 90 private Hashtable mJavaProperties = new Hashtable (); 92 93 private List mDocumentTypes = new LinkedList (); 95 96 private List mServices = new LinkedList (); 98 99 101 104 105 public void addJavaProperty(String prop, String val) { 106 mJavaProperties.put(prop, val); 107 } 108 109 public Hashtable getJavaProperties() { 110 return mJavaProperties; 111 } 112 113 public void addToClassPath(String s) { 114 mClassPath.add("$JAVAROOT/" + s); 115 } 116 117 public void addToExtraClassPath(String s) { 118 mExtraClassPath.add(s); 119 } 120 121 public List getExtraClassPath() { 122 return mExtraClassPath; 123 } 124 125 public DocumentType createDocumentType() { 126 return new DocumentType(); 127 } 128 129 public List getDocumentTypes() { 130 return mDocumentTypes; 131 } 132 133 136 public void addDocumentType(DocumentType documentType) { 137 mDocumentTypes.add(documentType); 138 } 139 140 public Service createService() { 141 return new Service(); 142 } 143 144 public List getServices() { 145 return mServices; 146 } 147 148 151 public void addService(Service service) { 152 mServices.add(service); 153 } 154 155 157 public void setApplicationName(String s) { 158 mApplicationName = s; 159 } 160 161 public String getApplicationName() { 162 return mApplicationName; 163 } 164 165 170 public void setCFBundleName(String s) { 171 172 if (s.length() > 16) 173 System.err 174 .println("WARNING: 'shortname' is recommeded to be no more than 16 " 175 + "charaters long. See usage notes."); 176 mCFBundleName = s; 177 } 178 179 public String getCFBundleName() { 180 if (mCFBundleName == null) 181 return getApplicationName(); 182 183 return mCFBundleName; 184 } 185 186 public void setCFBundleVersion(String s) { 187 mCFBundleVersion = s; 188 } 189 190 public String getCFBundleVersion() { 191 return mCFBundleVersion; 192 } 193 194 public void setCFBundleInfoDictionaryVersion(String s) { 195 } 197 198 public String getCFBundleInfoDictionaryVersion() { 199 return mCFBundleInfoDictionaryVersion; 200 } 201 202 public void setCFBundleIdentifier(String s) { 203 mCFBundleIdentifier = s; 204 } 205 206 public String getCFBundleIdentifier() { 207 return mCFBundleIdentifier; 208 } 209 210 public void setCFBundleGetInfoString(String s) { 211 mCFBundleGetInfoString = s; 212 } 213 214 public String getCFBundleGetInfoString() { 215 if (mCFBundleGetInfoString == null) 216 return getCFBundleShortVersionString(); 217 218 return mCFBundleGetInfoString; 219 } 220 221 public void setCFBundleShortVersionString(String s) { 222 mCFBundleShortVersionString = s; 223 } 224 225 public String getCFBundleShortVersionString() { 226 return mCFBundleShortVersionString; 227 } 228 229 public void setCFBundleIconFile(String s) { 230 mCFBundleIconFile = s; 231 } 232 233 public String getCFBundleIconFile() { 234 return mCFBundleIconFile; 235 } 236 237 public void setCFBundleAllowMixedLocalizations(boolean b) { 238 mCFBundleAllowMixedLocalizations = b; 239 } 240 241 public boolean getCFBundleAllowMixedLocalizations() { 242 return mCFBundleAllowMixedLocalizations; 243 } 244 245 public void setCFBundleExecutable(String s) { 246 mCFBundleExecutable = s; 247 } 248 249 public String getCFBundleExecutable() { 250 return mCFBundleExecutable; 251 } 252 253 public void setCFBundleDevelopmentRegion(String s) { 254 mCFBundleDevelopmentRegion = s; 255 } 256 257 public String getCFBundleDevelopmentRegion() { 258 return mCFBundleDevelopmentRegion; 259 } 260 261 public void setCFBundlePackageType(String s) { 262 } 264 265 public String getCFBundlePackageType() { 266 return mCFBundlePackageType; 267 } 268 269 public void setCFBundleSignature(String s) { 270 mCFBundleSignature = s; 271 } 272 273 public String getCFBundleSignature() { 274 return mCFBundleSignature; 275 } 276 277 public void setCFBundleHelpBookFolder(String s) { 278 mCFHelpBookFolder = s; 279 } 280 281 public String getCFBundleHelpBookFolder() { 282 return mCFHelpBookFolder; 283 } 284 285 public void setCFBundleHelpBookName(String s) { 286 mCFHelpBookName = s; 287 } 288 289 public String getCFBundleHelpBookName() { 290 return mCFHelpBookName; 291 } 292 293 public void setMainClass(String s) { 294 mMainClass = s; 295 } 296 297 public String getMainClass() { 298 return mMainClass; 299 } 300 301 public void setJVMVersion(String s) { 302 mJVMVersion = s; 303 } 304 305 public String getJVMVersion() { 306 return mJVMVersion; 307 } 308 309 public void setVMOptions(String s) { 310 mVMOptions = s; 311 } 312 313 public String getVMOptions() { 314 return mVMOptions; 315 } 316 317 public void setWorkingDirectory(String s) { 318 mWorkingDirectory = s; 319 } 320 321 public String getWorkingDirectory() { 322 return mWorkingDirectory; 323 } 324 325 public void setArguments(String s) { 326 mArguments = s; 327 } 328 329 public String getArguments() { 330 return mArguments; 331 } 332 333 public List getClassPath() { 334 return mClassPath; 335 } 336 337 } 338 | Popular Tags |