src/jdk.jpackage/share/classes/jdk/jpackage/internal/BundleParams.java
branchJDK-8200758-branch
changeset 57080 bd4ce7f9ea2c
parent 57078 db003bfc5bf7
child 57099 9a85a7a076ad
equal deleted inserted replaced
57079:c53a2eca0f57 57080:bd4ce7f9ea2c
    89     public static final String PARAM_DESCRIPTION        = "description";
    89     public static final String PARAM_DESCRIPTION        = "description";
    90 
    90 
    91     // String - License type. Needed on Linux (rpm)
    91     // String - License type. Needed on Linux (rpm)
    92     public static final String PARAM_LICENSE_TYPE       = "licenseType";
    92     public static final String PARAM_LICENSE_TYPE       = "licenseType";
    93 
    93 
    94     // List<String> - File(s) with license. Format is OS/bundler specific
    94     // String - File with license. Format is OS/bundler specific
    95     public static final String PARAM_LICENSE_FILE       = "licenseFile";
    95     public static final String PARAM_LICENSE_FILE       = "licenseFile";
    96 
       
    97     // boolean - service/daemon install.  null means "default"
       
    98     public static final String PARAM_SERVICE_HINT       = "serviceHint";
       
    99 
       
   100 
    96 
   101     // String Main application class.
    97     // String Main application class.
   102     // Not used directly but used to derive default values
    98     // Not used directly but used to derive default values
   103     public static final String PARAM_APPLICATION_CLASS  = "applicationClass";
    99     public static final String PARAM_APPLICATION_CLASS  = "applicationClass";
   104 
   100 
   231 
   227 
   232     public void setDescription(String s) {
   228     public void setDescription(String s) {
   233         putUnlessNull(PARAM_DESCRIPTION, s);
   229         putUnlessNull(PARAM_DESCRIPTION, s);
   234     }
   230     }
   235 
   231 
   236     //path is relative to the application root
       
   237     public void addLicenseFile(String path) {
       
   238         List<String> licenseFiles = fetchParam(LICENSE_FILE);
       
   239         if (licenseFiles == null || licenseFiles.isEmpty()) {
       
   240             licenseFiles = new ArrayList<>();
       
   241             params.put(PARAM_LICENSE_FILE, licenseFiles);
       
   242         }
       
   243         licenseFiles.add(path);
       
   244     }
       
   245 
       
   246     public void setServiceHint(Boolean b) {
       
   247         putUnlessNull(PARAM_SERVICE_HINT, b);
       
   248     }
       
   249 
       
   250     public void setInstalldirChooser(Boolean b) {
   232     public void setInstalldirChooser(Boolean b) {
   251         putUnlessNull(PARAM_INSTALLDIR_CHOOSER, b);
   233         putUnlessNull(PARAM_INSTALLDIR_CHOOSER, b);
   252     }
   234     }
   253 
   235 
   254     public void setSingleton(Boolean b) {
   236     public void setSingleton(Boolean b) {
   281         putUnlessNull(PARAM_BUNDLE_FORMAT, t);
   263         putUnlessNull(PARAM_BUNDLE_FORMAT, t);
   282     }
   264     }
   283 
   265 
   284     public boolean getVerbose() {
   266     public boolean getVerbose() {
   285         return fetchParam(VERBOSE);
   267         return fetchParam(VERBOSE);
   286     }
       
   287 
       
   288     public List<String> getLicenseFile() {
       
   289         return fetchParam(LICENSE_FILE);
       
   290     }
   268     }
   291 
   269 
   292     public List<String> getJvmargs() {
   270     public List<String> getJvmargs() {
   293         return JVM_OPTIONS.fetchFrom(params);
   271         return JVM_OPTIONS.fetchFrom(params);
   294     }
   272     }