< prev index next >

src/jdk.jpackage/share/classes/jdk/jpackage/internal/DeployParams.java

Print this page

        

*** 50,84 **** */ public class DeployParams { final List<RelativeFileSet> resources = new ArrayList<>(); ! String id; ! String vendor; ! String email; ! String description; String licenseType; String copyright; String version; - Boolean systemWide; - Boolean serviceHint; - Boolean signBundle; - Boolean installdirChooser; - String applicationClass; - List<Param> params; - // Java modules support String addModules = null; String limitModules = null; - String modulePath = null; String module = null; File outdir = null; - String appId = null; // list of jvm args // (in theory string can contain spaces and need to be escaped List<String> jvmargs = new LinkedList<>(); --- 50,73 ---- */ public class DeployParams { final List<RelativeFileSet> resources = new ArrayList<>(); ! BundlerType bundleType = BundlerType.NONE; ! String targetFormat = null; //means any String licenseType; String copyright; String version; String applicationClass; // Java modules support String addModules = null; String limitModules = null; String module = null; File outdir = null; // list of jvm args // (in theory string can contain spaces and need to be escaped List<String> jvmargs = new LinkedList<>();
*** 95,116 **** void setVersion(String version) { this.version = version; } - void setSystemWide(Boolean systemWide) { - this.systemWide = systemWide; - } - - void setInstalldirChooser(Boolean installdirChooser) { - this.installdirChooser = installdirChooser; - } - - void setSignBundle(Boolean signBundle) { - this.signBundle = signBundle; - } - void addJvmArg(String v) { jvmargs.add(v); } void addAddModule(String value) { --- 84,93 ----
*** 129,170 **** else { limitModules += "," + value; } } - String getModulePath() { - return this.modulePath; - } - - void setModulePath(String value) { - this.modulePath = value; - } - void setModule(String value) { this.module = value; } - void setDescription(String description) { - this.description = description; - } - - public void setAppId(String id) { - appId = id; - } - - void setParams(List<Param> params) { - this.params = params; - } - - void setVendor(String vendor) { - this.vendor = vendor; - } - - void setEmail(String email) { - this.email = email; - } - void setApplicationClass(String applicationClass) { this.applicationClass = applicationClass; } File getOutput() { --- 106,119 ----
*** 235,251 **** } addBundleArgument( StandardBundlerParam.CLASSPATH.getID(), classpath); } - private static File createFile(final File baseDir, final String path) { - final File testFile = new File(path); - return testFile.isAbsolute() ? - testFile : new File(baseDir == null ? - null : baseDir.getAbsolutePath(), path); - } - static void validateName(String s, boolean forApp) throws PackagerException { String exceptionKey = forApp ? "ERR_InvalidAppName" : "ERR_InvalidSLName"; --- 184,193 ----
*** 398,410 **** } return result; } - BundlerType bundleType = BundlerType.NONE; - String targetFormat = null; //means any - void setBundleType(BundlerType type) { bundleType = type; } BundlerType getBundleType() { --- 340,349 ----
*** 417,440 **** String getTargetFormat() { return targetFormat; } ! private String getArch() { ! String arch = System.getProperty("os.arch").toLowerCase(); ! ! if ("x86".equals(arch) || "i386".equals(arch) || "i486".equals(arch) ! || "i586".equals(arch) || "i686".equals(arch)) { ! arch = "x86"; ! } else if ("x86_64".equals(arch) || "amd64".equals("arch")) { ! arch = "x86_64"; ! } ! ! return arch; ! } ! ! static final Set<String> multi_args = new TreeSet<>(Arrays.asList( StandardBundlerParam.JAVA_OPTIONS.getID(), StandardBundlerParam.ARGUMENTS.getID(), StandardBundlerParam.MODULE_PATH.getID(), StandardBundlerParam.ADD_MODULES.getID(), StandardBundlerParam.LIMIT_MODULES.getID(), --- 356,366 ---- String getTargetFormat() { return targetFormat; } ! private static final Set<String> multi_args = new TreeSet<>(Arrays.asList( StandardBundlerParam.JAVA_OPTIONS.getID(), StandardBundlerParam.ARGUMENTS.getID(), StandardBundlerParam.MODULE_PATH.getID(), StandardBundlerParam.ADD_MODULES.getID(), StandardBundlerParam.LIMIT_MODULES.getID(),
*** 477,491 **** bundleParams.setApplicationClass(applicationClass); bundleParams.setAppVersion(version); bundleParams.setType(bundleType); bundleParams.setBundleFormat(targetFormat); - bundleParams.setVendor(vendor); - bundleParams.setEmail(email); - bundleParams.setInstalldirChooser(installdirChooser); bundleParams.setCopyright(copyright); - bundleParams.setDescription(description); bundleParams.setJvmargs(jvmargs); if (addModules != null && !addModules.isEmpty()) { bundleParams.setAddModules(addModules); --- 403,413 ----
*** 493,517 **** if (limitModules != null && !limitModules.isEmpty()) { bundleParams.setLimitModules(limitModules); } - if (modulePath != null && !modulePath.isEmpty()) { - bundleParams.setModulePath(modulePath); - } - if (module != null && !module.isEmpty()) { bundleParams.setMainModule(module); } - Map<String, String> paramsMap = new TreeMap<>(); - if (params != null) { - for (Param p : params) { - paramsMap.put(p.name, p.value); - } - } - Map<String, String> unescapedHtmlParams = new TreeMap<>(); Map<String, String> escapedHtmlParams = new TreeMap<>(); // check for collisions TreeSet<String> keys = new TreeSet<>(bundlerArguments.keySet()); --- 415,428 ----
*** 529,556 **** Map<String, ? super Object> getBundlerArguments() { return this.bundlerArguments; } - void putUnlessNull(String param, Object value) { - if (value != null) { - bundlerArguments.put(param, value); - } - } - - void putUnlessNullOrEmpty(String param, Map<?, ?> value) { - if (value != null && !value.isEmpty()) { - bundlerArguments.put(param, value); - } - } - - void putUnlessNullOrEmpty(String param, Collection<?> value) { - if (value != null && !value.isEmpty()) { - bundlerArguments.put(param, value); - } - } - @Override public String toString() { return "DeployParams {" + "output: " + outdir + " resources: {" + resources + "}}"; } --- 440,449 ----
< prev index next >