public abstract class PanelProviderParameter extends Object implements Cloneable
Modifier and Type | Field and Description |
---|---|
static int |
SCOPE_BOTH |
static int |
SCOPE_INSTANCE |
static int |
SCOPE_PANEL |
Constructor and Description |
---|
PanelProviderParameter(PanelProvider provider)
Create en empty parameter for given provider
|
PanelProviderParameter(PanelProvider provider,
String id,
boolean required,
boolean i18n)
Constructs a PanelProviderParameter
|
PanelProviderParameter(PanelProvider provider,
String id,
boolean required,
String defaultValue,
boolean i18n)
Constructs a PanelProviderParameter
|
PanelProviderParameter(PanelProvider provider,
String id,
boolean required,
String defaultValue,
boolean i18n,
int scope)
Deprecated.
scope is not implemented
|
Modifier and Type | Method and Description |
---|---|
protected Object |
clone() |
boolean |
equals(Object o) |
protected static String |
escapeParameterValue(String value)
Escapes given string for including in a JSP page
|
String |
getDefaultValue()
Parameter default value
|
String |
getDefaultValue(String lang)
Parameter default value in given lang
|
String |
getDescription()
Parameter description
|
String |
getDescription(Locale locale)
Parameter description in a given language
|
String |
getId()
Parameter identifier
|
PanelProvider |
getProvider()
Provider this parameter applies to
|
int |
getScope()
Deprecated.
scope is not implemented
|
static boolean |
isEmpty(String value)
Determines if a String value is null or blank
|
boolean |
isI18n()
True if this parameter is internationalizable
|
boolean |
isRequired()
Parameter is required
|
boolean |
isSystemParameter()
True if this parameter is system, that is, applies to all panel instances
|
abstract boolean |
isValid(String value)
Validates a string entered as a parameter value
|
abstract String |
readFromRequest(javax.servlet.http.HttpServletRequest req)
Reads the value from the request submitted
|
abstract String |
renderHTML(javax.servlet.http.HttpServletRequest req,
PanelInstance instance,
PanelProviderParameter param,
String value)
Renders a form field to enter this parameter's value
|
void |
setDefaultValue(String defaultValue)
Parameter default value
|
void |
setDefaultValue(String defaultValue,
String lang)
Parameter default value
|
void |
setI18n(boolean i18n)
True if this parameter is internationalizable
|
void |
setId(String id)
Parameter identifier
|
void |
setRequired(boolean required)
Parameter is required
|
void |
setScope(int scope)
Deprecated.
scope is not implemented
|
void |
setSystemParameter(boolean systemParameter)
True if this parameter is system, that is, applies to all panel instances
|
public static int SCOPE_INSTANCE
public static int SCOPE_PANEL
public static int SCOPE_BOTH
public PanelProviderParameter(PanelProvider provider)
provider
- public PanelProviderParameter(PanelProvider provider, String id, boolean required, boolean i18n)
provider
- Panel provider where the parameter applies.id
- Parameter identifiear. Panels can obtain the parameter value using this id.required
- Indicates if the parameter is required, that is, the panel will not be properly configured is this parameter is not set.i18n
- Indicates if parameter supports internationalization, that is, different values for different languagespublic PanelProviderParameter(PanelProvider provider, String id, boolean required, String defaultValue, boolean i18n)
provider
- Panel provider where the parameter applies.id
- Parameter identifiear. Panels can obtain the parameter value using this id.required
- Indicates if the parameter is required, that is, the panel will not be properly configured is this parameter is not set.i18n
- Indicates if parameter supports internationalization, that is, different values for different languagesdefaultValue
- Default value for the parameterpublic PanelProviderParameter(PanelProvider provider, String id, boolean required, String defaultValue, boolean i18n, int scope)
public boolean isRequired()
public void setRequired(boolean required)
required
- Parameter is requiredpublic String getId()
public void setId(String id)
id
- Parameter identifierpublic String getDescription()
public String getDescription(Locale locale)
locale
- Language to get the description in.public String getDefaultValue()
public void setDefaultValue(String defaultValue)
defaultValue
- Parameter default valuepublic String getDefaultValue(String lang)
lang
- language for the parameterpublic void setDefaultValue(String defaultValue, String lang)
defaultValue
- Parameter default valuelang
- language for the parameterpublic boolean isSystemParameter()
public void setSystemParameter(boolean systemParameter)
systemParameter
- True if this parameter is system, that is, applies to all panel instancespublic boolean isI18n()
public void setI18n(boolean i18n)
i18n
- True if this parameter is internationalizablepublic int getScope()
public void setScope(int scope)
public static boolean isEmpty(String value)
value
- value to checkprotected static String escapeParameterValue(String value)
value
- value to scapepublic PanelProvider getProvider()
public abstract boolean isValid(String value)
value
- value to validatepublic abstract String renderHTML(javax.servlet.http.HttpServletRequest req, PanelInstance instance, PanelProviderParameter param, String value)
req
- Http request in useinstance
- panel instanceparam
- this same parametervalue
- parameter valuepublic abstract String readFromRequest(javax.servlet.http.HttpServletRequest req)
req
- protected Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright © 2012–2016 JBoss by Red Hat. All rights reserved.