Package com.jogamp.common.util
Class PropertyAccess
java.lang.Object
com.jogamp.common.util.PropertyAccess
Helper routines for accessing properties.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static final voidaddTrustedPrefix(String prefix) static final booleangetBooleanProperty(String property, boolean jnlpAlias) static final booleangetBooleanProperty(String property, boolean jnlpAlias, boolean defaultValue) static final intgetIntProperty(String property, boolean jnlpAlias, int defaultValue) static final longgetLongProperty(String property, boolean jnlpAlias, long defaultValue) static final StringgetProperty(String propertyKey, boolean jnlpAlias) Query the property with the namepropertyKey.static final StringgetProperty(String propertyKey, boolean jnlpAlias, String defaultValue) static final booleanisPropertyDefined(String property, boolean jnlpAlias) static final boolean
-
Field Details
-
jnlp_prefix
trusted build-in property prefix 'jnlp.'- See Also:
-
javaws_prefix
trusted build-in property prefix 'javaws.'- See Also:
-
-
Constructor Details
-
PropertyAccess
public PropertyAccess()
-
-
Method Details
-
addTrustedPrefix
- Parameters:
prefix- New prefix to be registered as trusted.- Throws:
AccessControlException- as thrown bySecurityUtil.checkAllPermissions().
-
isTrusted
-
getIntProperty
- See Also:
-
getLongProperty
- See Also:
-
getBooleanProperty
- See Also:
-
getBooleanProperty
public static final boolean getBooleanProperty(String property, boolean jnlpAlias, boolean defaultValue) - See Also:
-
isPropertyDefined
- See Also:
-
getProperty
public static final String getProperty(String propertyKey, boolean jnlpAlias) throws SecurityException, NullPointerException, IllegalArgumentException Query the property with the namepropertyKey.If
jnlpAliasistrueand the plainpropertyKeycould not be resolved, an attempt to resolve the JNLP aliased trusted property is made.
Example: For the propertyNameOneTwo, the jnlp alias name isjnlp.OneTwo, which is considered trusted.
- Parameters:
propertyKey- the property name to query.jnlpAlias- true if a fallback attempt to query the JNLP aliased trusted property shall be made, otherwise false.- Returns:
- the property value if exists, or null
- Throws:
NullPointerException- if the property name is nullIllegalArgumentException- if the property name is of length 0SecurityException- if access is not allowed to the givenpropertyKey- See Also:
-
getProperty
public static final String getProperty(String propertyKey, boolean jnlpAlias, String defaultValue) throws SecurityException, NullPointerException, IllegalArgumentException
-