Enum UpdatePolicy
- java.lang.Object
-
- java.lang.Enum<UpdatePolicy>
-
- net.adoptopenjdk.icedteaweb.jnlp.element.update.UpdatePolicy
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<UpdatePolicy>
public enum UpdatePolicy extends java.lang.Enum<UpdatePolicy>
The policy attribute indicates the preference for how the JNLP Client should handle an application update when it is known an update is available before the application is launched, and can have one of the following three values: "always", "prompt-update", and "prompt-run".
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALWAYSA value of "always" (default) means to always download updates without any prompt.PROMPT_RUNA value of "prompt-run" means to ask the user if he/she wants to download and run the updated version, or cancel and abort running the application.PROMPT_UPDATEA value of "prompt-update" means to ask the user if he/she wants to download and run the updated version, or launch the cached version.
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringvalue
-
Constructor Summary
Constructors Modifier Constructor Description privateUpdatePolicy(java.lang.String value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetValue()The attribute value name as used in the JSR-56 specification or theParser.static UpdatePolicyvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static UpdatePolicy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ALWAYS
public static final UpdatePolicy ALWAYS
A value of "always" (default) means to always download updates without any prompt.
-
PROMPT_UPDATE
public static final UpdatePolicy PROMPT_UPDATE
A value of "prompt-update" means to ask the user if he/she wants to download and run the updated version, or launch the cached version.
-
PROMPT_RUN
public static final UpdatePolicy PROMPT_RUN
A value of "prompt-run" means to ask the user if he/she wants to download and run the updated version, or cancel and abort running the application.
-
-
Method Detail
-
values
public static UpdatePolicy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (UpdatePolicy c : UpdatePolicy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static UpdatePolicy valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getValue
public java.lang.String getValue()
The attribute value name as used in the JSR-56 specification or theParser.- Returns:
- the attribute value name
-
-