public class ParameterRenderingInformation extends Object implements Serializable
This class uses resource bundles to support internationalization/localization of the information. You must
apply a resource bundle to this object in order to obtain the strings
that are to be used to render the parameter information.
| Constructor and Description |
|---|
ParameterRenderingInformation()
Create a new
ParameterRenderingInformation with all keys being null. |
ParameterRenderingInformation(String labelKey,
String descriptionKey)
Create a new
ParameterRenderingInformation. |
| Modifier and Type | Method and Description |
|---|---|
void |
applyResourceBundle(ResourceBundle resourceBundle)
Applies the given resource bundle to this object so this object can obtain the actual string values for the label
and description.
|
String |
getDescription()
Get the description string as found in the resource bundle.
|
String |
getDescriptionKey()
Returns the key that will be used to look up the description in a
resource bundle. |
String |
getLabel()
Get the label string as found in the resource bundle.
|
String |
getLabelKey()
Returns the key that will be used to look up the label in a
resource bundle. |
boolean |
isHidden()
Indicates if this parameter should be considered hidden (which usually means this parameter is hidden from view
in a user interface).
|
boolean |
isObfuscated()
Indicates if this parameter should be obfuscated (which usually means the value should be garbled in a user
interface, such as the typical "***" in a password field).
|
boolean |
isReadOnly()
Indicates if this parameter should be considered read-only (which usually means a user cannot alter the
parameter's value within a user interface).
|
void |
setDescription(String description)
Explicitly sets the description string.
|
void |
setHidden(boolean hidden)
Set the hidden flag.
|
void |
setLabel(String label)
Explicitly sets the label string.
|
void |
setObfuscated(boolean obfuscated)
Set the obfuscated flag.
|
void |
setReadOnly(boolean readOnly)
Sets the read-only flag.
|
public ParameterRenderingInformation(String labelKey, String descriptionKey)
ParameterRenderingInformation. This constructor takes keys to labels and descriptions,
rather than actual values. Those keys will later be used to look up the values from a
resource bundle.
A key can be null; for those keys that are null, they simply will not be looked up
in a resource bundle. In this case you need to explicitly call the setter to define the value. For example, if
labelKey is null, then the only way for getLabel() to return a
non-null label string would be if you explicitly call setLabel(String) since the label
string will not be found in any resource bundle.
By default, the parameter is defined as:
labelKey - the key into a resource bundle where the resource bundle string is the parameter label (may
be null)descriptionKey - the key into a resource bundle where the resource bundle string is the parameter
description (may be null)public ParameterRenderingInformation()
ParameterRenderingInformation with all keys being null. See
ParameterRenderingInformation(String, String) for more information.public String getLabelKey()
resource bundle.public String getDescriptionKey()
resource bundle.public String getDescription()
This will return null until
a resource bundle has been applied to this object. This description
string may also be explicitly set via setDescription(String).
nullpublic void setDescription(String description)
apply a resource bundle.description - The description to set.public String getLabel()
This will return null until
a resource bundle has been applied to this object. This label string
may also be explicitly set via setLabel(String).
nullpublic void setLabel(String label)
apply a resource bundle.label - The label to set.public void applyResourceBundle(ResourceBundle resourceBundle) throws MissingResourceException
label was explicitly set or a
description was explicitly set, those values will be overwritten by the values
found in the given resource bundle. If the given bundle is null, this method does nothing.
Note that if the resource bundle was null but one or more keys were not null, an
exception is thrown. In this case, you must either define a resource bundle or you must not define keys.
resourceBundle - the resource bundle where the key values are found (may be null)MissingResourceException - if a key was not found in the resource bundleInvalidParameterDefinitionException - key(s) were non-null but resourceBundle was
nullpublic boolean isReadOnly()
public void setReadOnly(boolean readOnly)
readOnly - public boolean isHidden()
public void setHidden(boolean hidden)
hidden - public boolean isObfuscated()
public void setObfuscated(boolean obfuscated)
obfuscated - Copyright © 2008-2013 Red Hat, Inc.. All Rights Reserved.