< prev index next >

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

Print this page




  57 
  58     // String - email name and email, only used for debian */
  59     public static final String PARAM_EMAIL              = "email";
  60 
  61     /* String - Copyright. Used on Mac */
  62     public static final String PARAM_COPYRIGHT          = "copyright";
  63 
  64     // String - GUID on windows for MSI, CFBundleIdentifier on Mac
  65     // If not compatible with requirements then bundler either do not bundle
  66     // or autogenerate
  67     public static final String PARAM_IDENTIFIER         = "identifier";
  68 
  69     /* boolean - shortcut preferences */
  70     public static final String PARAM_SHORTCUT           = "shortcutHint";
  71     // boolean - menu shortcut preference
  72     public static final String PARAM_MENU               = "menuHint";
  73 
  74     // String - Application version. Format may differ for different bundlers
  75     public static final String PARAM_VERSION            = "appVersion";
  76 
  77     // String - Application category. Used at least on Mac/Linux.
  78     // Value is platform specific
  79     public static final String PARAM_CATEGORY       = "applicationCategory";
  80 
  81     // String - Optional short application
  82     public static final String PARAM_TITLE              = "title";
  83 
  84     // String - Optional application description. Used by MSI and on Linux
  85     public static final String PARAM_DESCRIPTION        = "description";
  86 
  87     // String - License type. Needed on Linux (rpm)
  88     public static final String PARAM_LICENSE_TYPE       = "licenseType";
  89 
  90     // String - File with license. Format is OS/bundler specific
  91     public static final String PARAM_LICENSE_FILE       = "licenseFile";
  92 
  93     // String Main application class.
  94     // Not used directly but used to derive default values
  95     public static final String PARAM_APPLICATION_CLASS  = "applicationClass";
  96 
  97     // boolean - Adds a dialog to let the user choose a directory
  98     // where the product will be installed.
  99     public static final String PARAM_INSTALLDIR_CHOOSER = "installdirChooser";
 100 


 148     public Map<String, ? super Object> getBundleParamsAsMap() {
 149         return new HashMap<>(params);
 150     }
 151 
 152     public void setJvmargs(List<String> jvmargs) {
 153         putUnlessNullOrEmpty(JVM_OPTIONS.getID(), jvmargs);
 154     }
 155 
 156     public void setArguments(List<String> arguments) {
 157         putUnlessNullOrEmpty(ARGUMENTS.getID(), arguments);
 158     }
 159 
 160     public void setAddModules(String value) {
 161         putUnlessNull(StandardBundlerParam.ADD_MODULES.getID(), value);
 162     }
 163 
 164     public void setLimitModules(String value)  {
 165         putUnlessNull(StandardBundlerParam.LIMIT_MODULES.getID(), value);
 166     }
 167 
 168     public void setStripNativeCommands(boolean value) {
 169         putUnlessNull(StandardBundlerParam.STRIP_NATIVE_COMMANDS.getID(),
 170                 value);
 171     }
 172 
 173     public void setModulePath(String value) {
 174         putUnlessNull(StandardBundlerParam.MODULE_PATH.getID(), value);
 175     }
 176 
 177     public void setMainModule(String value) {
 178         putUnlessNull(StandardBundlerParam.MODULE.getID(), value);
 179     }
 180 
 181     public void setDebug(String value) {
 182         putUnlessNull(JLinkBundlerHelper.DEBUG.getID(), value);
 183     }
 184 
 185     public String getApplicationID() {
 186         return fetchParam(IDENTIFIER);
 187     }
 188 
 189     public String getPreferencesID() {
 190         return fetchParam(PREFERENCES_ID);
 191     }
 192 


 258 
 259     public List<String> getJvmargs() {
 260         return JVM_OPTIONS.fetchFrom(params);
 261     }
 262 
 263     public List<String> getArguments() {
 264         return ARGUMENTS.fetchFrom(params);
 265     }
 266 
 267     public jdk.jpackage.internal.RelativeFileSet getAppResource() {
 268         return fetchParam(APP_RESOURCES);
 269     }
 270 
 271     public void setAppResource(jdk.jpackage.internal.RelativeFileSet fs) {
 272         putUnlessNull(PARAM_APP_RESOURCES, fs);
 273     }
 274 
 275     public void setAppResourcesList(
 276             List<jdk.jpackage.internal.RelativeFileSet> rfs) {
 277         putUnlessNull(APP_RESOURCES_LIST.getID(), rfs);
 278     }
 279 
 280     public String getApplicationCategory() {
 281         return fetchParam(CATEGORY);
 282     }
 283 
 284     public void setApplicationCategory(String category) {
 285         putUnlessNull(PARAM_CATEGORY, category);
 286     }
 287 
 288     public String getMainClassName() {
 289         String applicationClass = getApplicationClass();
 290 
 291         if (applicationClass == null) {
 292             return null;
 293         }
 294 
 295         int idx = applicationClass.lastIndexOf(".");
 296         if (idx >= 0) {
 297             return applicationClass.substring(idx+1);
 298         }
 299         return applicationClass;
 300     }
 301 
 302     public String getCopyright() {
 303         return fetchParam(COPYRIGHT);
 304     }
 305 




  57 
  58     // String - email name and email, only used for debian */
  59     public static final String PARAM_EMAIL              = "email";
  60 
  61     /* String - Copyright. Used on Mac */
  62     public static final String PARAM_COPYRIGHT          = "copyright";
  63 
  64     // String - GUID on windows for MSI, CFBundleIdentifier on Mac
  65     // If not compatible with requirements then bundler either do not bundle
  66     // or autogenerate
  67     public static final String PARAM_IDENTIFIER         = "identifier";
  68 
  69     /* boolean - shortcut preferences */
  70     public static final String PARAM_SHORTCUT           = "shortcutHint";
  71     // boolean - menu shortcut preference
  72     public static final String PARAM_MENU               = "menuHint";
  73 
  74     // String - Application version. Format may differ for different bundlers
  75     public static final String PARAM_VERSION            = "appVersion";
  76 




  77     // String - Optional short application
  78     public static final String PARAM_TITLE              = "title";
  79 
  80     // String - Optional application description. Used by MSI and on Linux
  81     public static final String PARAM_DESCRIPTION        = "description";
  82 
  83     // String - License type. Needed on Linux (rpm)
  84     public static final String PARAM_LICENSE_TYPE       = "licenseType";
  85 
  86     // String - File with license. Format is OS/bundler specific
  87     public static final String PARAM_LICENSE_FILE       = "licenseFile";
  88 
  89     // String Main application class.
  90     // Not used directly but used to derive default values
  91     public static final String PARAM_APPLICATION_CLASS  = "applicationClass";
  92 
  93     // boolean - Adds a dialog to let the user choose a directory
  94     // where the product will be installed.
  95     public static final String PARAM_INSTALLDIR_CHOOSER = "installdirChooser";
  96 


 144     public Map<String, ? super Object> getBundleParamsAsMap() {
 145         return new HashMap<>(params);
 146     }
 147 
 148     public void setJvmargs(List<String> jvmargs) {
 149         putUnlessNullOrEmpty(JVM_OPTIONS.getID(), jvmargs);
 150     }
 151 
 152     public void setArguments(List<String> arguments) {
 153         putUnlessNullOrEmpty(ARGUMENTS.getID(), arguments);
 154     }
 155 
 156     public void setAddModules(String value) {
 157         putUnlessNull(StandardBundlerParam.ADD_MODULES.getID(), value);
 158     }
 159 
 160     public void setLimitModules(String value)  {
 161         putUnlessNull(StandardBundlerParam.LIMIT_MODULES.getID(), value);
 162     }
 163 





 164     public void setModulePath(String value) {
 165         putUnlessNull(StandardBundlerParam.MODULE_PATH.getID(), value);
 166     }
 167 
 168     public void setMainModule(String value) {
 169         putUnlessNull(StandardBundlerParam.MODULE.getID(), value);
 170     }
 171 
 172     public void setDebug(String value) {
 173         putUnlessNull(JLinkBundlerHelper.DEBUG.getID(), value);
 174     }
 175 
 176     public String getApplicationID() {
 177         return fetchParam(IDENTIFIER);
 178     }
 179 
 180     public String getPreferencesID() {
 181         return fetchParam(PREFERENCES_ID);
 182     }
 183 


 249 
 250     public List<String> getJvmargs() {
 251         return JVM_OPTIONS.fetchFrom(params);
 252     }
 253 
 254     public List<String> getArguments() {
 255         return ARGUMENTS.fetchFrom(params);
 256     }
 257 
 258     public jdk.jpackage.internal.RelativeFileSet getAppResource() {
 259         return fetchParam(APP_RESOURCES);
 260     }
 261 
 262     public void setAppResource(jdk.jpackage.internal.RelativeFileSet fs) {
 263         putUnlessNull(PARAM_APP_RESOURCES, fs);
 264     }
 265 
 266     public void setAppResourcesList(
 267             List<jdk.jpackage.internal.RelativeFileSet> rfs) {
 268         putUnlessNull(APP_RESOURCES_LIST.getID(), rfs);








 269     }
 270 
 271     public String getMainClassName() {
 272         String applicationClass = getApplicationClass();
 273 
 274         if (applicationClass == null) {
 275             return null;
 276         }
 277 
 278         int idx = applicationClass.lastIndexOf(".");
 279         if (idx >= 0) {
 280             return applicationClass.substring(idx+1);
 281         }
 282         return applicationClass;
 283     }
 284 
 285     public String getCopyright() {
 286         return fetchParam(COPYRIGHT);
 287     }
 288 


< prev index next >