|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.norther.tammi.core.rt.Introspector
org.norther.tammi.spray.engine.tool.BeanTool
org.norther.tammi.spray.template.tool.FormTool
public class FormTool
A request context tool for rendering forms.
Field Summary |
---|
Fields inherited from interface org.norther.tammi.spray.template.form.FormContext |
---|
FORM_INDEX_SEPARATOR, FORM_NAME_SEPARATOR, FORM_NAME_SPLITTER, FORM_PREFIX_SEPARATOR, PARAMETER_ELEMENT_SEPARATOR |
Constructor Summary | |
---|---|
FormTool()
Constructs a new form. |
Method Summary | ||
---|---|---|
boolean |
checkPermission(String actions)
Checks access permission for the current form. |
|
boolean |
checkPermission(Variable variable,
String actions)
Checks access permission for the specified variable. |
|
void |
clearContext()
Clears the context. |
|
void |
clearFormParameters()
Clears the request parameters of the current form. |
|
void |
clearPostFields()
Clears all post fields. |
|
boolean |
contains(String name)
Checks whether the current form variable contains the named attribute. |
|
boolean |
containsPostField(String name)
Checks a post fields. |
|
boolean |
containsTrait(String trait)
Checks whether the current form variable contains any attribute with the named trait. |
|
boolean |
containsTrait(VariableAttributeInfo.Trait trait)
Checks whether the current form variable contains any attribute with the specified trait. |
|
protected Variable |
createVariable(String type)
Creates a variable MBean instance. |
|
void |
dispose()
Disposes the object after use. |
|
VariableAttributeInfo |
firstInfo(String trait)
Returns the first attribute of the current form variable with the named trait set. |
|
VariableAttributeInfo |
firstInfo(Variable variable,
String trait)
Returns the first attribute of the specified form variable with the named trait set. |
|
|
getComparator()
Gets the comparator of the current form attribute. |
|
String |
getDescription()
Gets the current form attribute description. |
|
String |
getDescription(MBeanAttributeInfo attribute)
Gets the specified form attribute description. |
|
String |
getDetail()
Gets the current form attribute detail. |
|
String |
getDetail(MBeanAttributeInfo attribute)
Gets the specified form attribute detail. |
|
String |
getDetail(MBeanAttributeInfo attribute,
Object arg)
Gets the specified form attribute detail. |
|
String |
getDetail(Object arg)
Gets the current form attribute detail with an argument. |
|
int |
getElement()
Gets the array index of the current form attribute element. |
|
EnumeratedList |
getEnumeration()
Gets the current form attribute value enumeration as a list of localized enumeration entries. |
|
EnumeratedList |
getEnumeration(MBeanAttributeInfo attribute)
Gets the specified form attribute value enumeration as a list of localized enumeration attributes. |
|
EnumeratedList |
getEnumeration(Variable variable,
MBeanAttributeInfo attribute)
Gets the specified attribute value enumeration as a list of localized enumeration attributes. |
|
Exception |
getException()
Gets the current form attribute validation exception. |
|
Exception |
getException(MBeanAttributeInfo attribute,
int... element)
Gets the specified form attribute invalidation message. |
|
String |
getExtension()
Gets the extension of this request. |
|
FormContext |
getFormContext()
Gets the form context. |
|
protected FormFilter |
getFormFilter()
Gets the form filter from the filter stack. |
|
int |
getFormIndex()
Gets the index of the current form variable, if any. |
|
String |
getFormName()
Gets the name of the current form, if any. |
|
Map<String,Object> |
getFormParameters()
Gets request parameters of the current form. |
|
String |
getFormPrefix()
Gets the prefix of the current form variable and form, if any. |
|
String |
getFormPrefix(int index)
Gets the prefix of the indexed form variable and the current form. |
|
String |
getGroup()
Gets the current form attribute group. |
|
String |
getGroup(MBeanAttributeInfo attribute)
Gets the specified form attribute group. |
|
String |
getIndexField()
Gets the name of the form index field. |
|
MBeanAttributeInfo |
getInfo()
Gets the attribute info of the current form attribute. |
|
MBeanAttributeInfo |
getInfo(boolean unlocked)
Gets the optionally unlocked attribute info of the current form attribute. |
|
VariableAttributeInfo |
getInfo(String name)
Gets the named attribute info of the current form variable. |
|
VariableAttributeInfo |
getInfo(String name,
boolean unlocked)
Gets the named and optionally unlocked attribute info of the current form variable. |
|
List<VariableAttributeInfo> |
getInfos()
Gets the attribute info list of the current form variable. |
|
List<VariableAttributeInfo> |
getInfos(boolean unlocked)
Gets the optionally unlocked attribute info list of the current form variable. |
|
String |
getInvalidation()
Gets the current form attribute invalidation message. |
|
String |
getInvalidation(MBeanAttributeInfo attribute,
int... element)
Gets the specified form attribute invalidation message. |
|
Object |
getKeyValue()
Gets the current form key attribute value. |
|
Object |
getKeyValue(MBeanAttributeInfo attribute)
Gets the specified form key attribute value. |
|
Object |
getKeyValue(String name)
Gets the named key attribute value of the current form variable. |
|
Number |
getMax()
Gets the maximum value of the current form attribute. |
|
Number |
getMin()
Gets the minimum value of the current form attribute. |
|
String |
getName()
Gets the current form attribute or element name with the form prefix. |
|
String |
getName(int index)
Gets the current form element name with the form prefix. |
|
String |
getName(MBeanAttributeInfo attribute)
Gets the specified form attribute name with the form prefix. |
|
String |
getName(MBeanAttributeInfo attribute,
int index)
Gets the specified form attribute element name with the form prefix. |
|
String |
getName(String name)
Gets the form attribute name with the form prefix. |
|
String |
getName(String name,
int index)
Gets the form attribute element name with the form prefix. |
|
String |
getNameField()
Gets the name of the form name field. |
|
String |
getNestedPrefix()
Gets the nested form prefix. |
|
protected PageFilter |
getPageFilter()
Gets the page filter from the filter stack. |
|
String |
getParameter()
Gets the request parameter or element of the current form attribute. |
|
String |
getParameter(MBeanAttributeInfo attribute)
Gets the request parameter of the specified form attribute. |
|
String |
getParameter(MBeanAttributeInfo attribute,
int index)
Gets the request parameter of the specified form attribute element. |
|
String |
getParameter(String name)
Gets a named request parameter. |
|
String |
getParameter(String name,
String def)
Gets a named request parameter with a default value. |
|
String[] |
getParameters()
Gets the request parameters of the current form attribute. |
|
String[] |
getParameters(MBeanAttributeInfo attribute)
Gets the request parameters of the specified form attribute. |
|
String[] |
getParameters(String name)
Gets named request parameters. |
|
String[] |
getParameters(String name,
String[] defs)
Gets named request parameters with default values. |
|
FormContext |
getParentContext()
Gets the parent context, if any. |
|
String |
getPattern()
Gets the pattern of the current form attribute. |
|
Map<String,String> |
getPostFields()
Gets post fields. |
|
String |
getQualifier()
Gets the current form attribute qualifier. |
|
String |
getQualifier(MBeanAttributeInfo attribute)
Gets the specified form attribute qualifier. |
|
FormContext |
getRootContext()
Gets the root context. |
|
int |
getSelectedEnum()
Gets the index of the selected enumeration of the current form attribute. |
|
int |
getSelectedEnum(MBeanAttributeInfo attribute)
Gets the index of the selected enumeration of the specified form attribute. |
|
int |
getSelectedEnum(MBeanAttributeInfo attribute,
int index)
Gets the index of the element enumeration of the specified form attribute element. |
|
OrderedSet<Integer> |
getSelectedEnums()
Gets the indices of the selected enumerations of the current form attribute. |
|
OrderedSet<Integer> |
getSelectedEnums(MBeanAttributeInfo attribute)
Gets the indices of the selected enumerations of the specified form attribute. |
|
int |
getSelectedLine()
Gets the selected line number of the current form attribute. |
|
int |
getSelectedLine(MBeanAttributeInfo attribute)
Gets the selected line number of the specified form attribute. |
|
OrderedSet<Integer> |
getSelectedLines()
Gets the selected line numbers of the current form attribute. |
|
OrderedSet<Integer> |
getSelectedLines(MBeanAttributeInfo attribute)
Gets the selected line numbers of the specified form attribute. |
|
Object |
getSelectedValue()
Gets the current form attribute value or element selected by the user. |
|
Object |
getSelectedValue(MBeanAttributeInfo attribute)
Gets the specified form attribute value selected by the user. |
|
Object |
getSelectedValue(MBeanAttributeInfo attribute,
int index)
Gets the specified form attribute element selected by the user. |
|
Object[] |
getSelectedValues()
Gets the current form attribute values selected by the user. |
|
Object[] |
getSelectedValues(MBeanAttributeInfo attribute)
Gets the specified form attribute values selected by the user. |
|
String |
getTagId(String tag)
Gets a unique tag id for the current form attribute. |
|
String |
getTagId(String tag,
int index)
Gets a unique tag id for the indexed value of the current form attribute. |
|
String |
getTagId(String tag,
MBeanAttributeInfo attribute)
Gets a unique tag if for the specified form attribute. |
|
String |
getTagId(String tag,
MBeanAttributeInfo attribute,
int index)
Gets a unique tag id for the indexed value of the specified form attribute. |
|
String |
getTagId(String tag,
String name)
Gets a unique tag id for the named form attribute. |
|
String |
getTagId(String tag,
String name,
int index)
Gets a unique tag id for the indexed value of the named form attribute. |
|
String |
getTheme()
Gets the form theme of this request. |
|
String |
getType()
Gets the current form attribute type. |
|
String |
getType(MBeanAttributeInfo attribute)
Gets the specified form attribute type. |
|
SortedMap<String,Exception> |
getValidation()
Gets validation exceptions of the current form variable. |
|
SortedMap<String,Exception> |
getValidation(Variable variable,
int... index)
Gets validation exceptions of the indexed form variable. |
|
Object |
getValue()
Gets the current form attribute value or element without string conversion or localization. |
|
Object |
getValue(int index)
Gets the indexed element of the current form attribute value without string conversion or localization. |
|
Object |
getValue(MBeanAttributeInfo attribute)
Gets the specified form attribute value without string conversion or localization. |
|
Object |
getValue(MBeanAttributeInfo attribute,
int index)
Gets indexed element of the specified form attribute value without string conversion or localization. |
|
Object |
getValue(String name)
Gets the named attribute value of the current form variable. |
|
Object |
getValue(String name,
int index)
Gets indexed element of the named attribute value of the current form variable. |
|
Variable |
getVariable()
Gets the current form variable. |
|
boolean |
isArray()
Checks if the current form attribute is an array. |
|
boolean |
isEnumerated()
Checks if the current form attribute is an enumerated. |
|
boolean |
isEqualGroup(MBeanAttributeInfo attribute)
Checks whether the specified group equals with the current one. |
|
boolean |
isInvalid()
Checks whether the current form attribute is invalid. |
|
boolean |
isInvalid(MBeanAttributeInfo attribute,
int... element)
Checks whether the specified form attribute is invalid. |
|
boolean |
isLocalized()
Checks whether variables are localized. |
|
boolean |
isReadable()
Checks if the current form attribute is readable. |
|
boolean |
isReadOnly()
Checks whether the current form is read-only. |
|
boolean |
isSameGroup(MBeanAttributeInfo attribute)
Checks whether the current group should be applied to the specified attribute. |
|
boolean |
isTrait(String trait)
Checks the named trait of the current form attribute as a string. |
|
boolean |
isTrait(VariableAttributeInfo.Trait trait)
Checks the specified trait of the current form attribute. |
|
boolean |
isValidated()
Checks whether the current form variable is validated. |
|
boolean |
isValidated(Variable variable,
int... index)
Checks whether the indexed form variable is validated. |
|
boolean |
isVisible()
Checks if the current form attribute is visible. |
|
boolean |
isWritable()
Checks if the current form attribute is writable. |
|
VariableAttributeInfo |
lastInfo(String trait)
Returns the last attribute of the current form variable with the named trait set. |
|
VariableAttributeInfo |
lastInfo(Variable variable,
String trait)
Returns the last attribute of the specified form variable with the named trait set. |
|
int |
length()
Returns the length of the current form array attribute. |
|
int |
length(MBeanAttributeInfo attribute)
Returns the length of the specified form array attribute. |
|
String |
makePostField()
Makes a post field of the current attribute or element. |
|
String |
makePostField(int index)
Makes a post field of indexed element of the current attribute. |
|
String |
makePostField(String name)
Makes a post field of the named attribute. |
|
String |
makePostField(String name,
int index)
Makes a post field of the indexed element of the named attribute. |
|
String |
newTagId(String tag)
Creates a unique tag id (letters, digits, '_', '-', '.' and ':' are allowed, but keep it compatible with property names). |
|
VariableAttributeInfo |
nextInfo(int index,
String trait)
Returns the next attribute of the current form variable with the named trait set. |
|
VariableAttributeInfo |
nextInfo(Variable variable,
int index,
String trait)
Returns the next attribute of the specified form variable with the named trait set. |
|
void |
popContext()
Pops the current form context to after leaving a recursive form. |
|
int |
position()
Returns the position of the attribute of the current form variable. |
|
int |
position(VariableAttributeInfo attribute)
Returns the position of the attribute of the current form variable. |
|
int |
position(Variable variable,
VariableAttributeInfo attribute)
Returns the position of the attribute of the specified form variable. |
|
void |
pushContext()
Pushes the current form context before entering a recursive form. |
|
void |
remove()
Removes the current form variable. |
|
void |
remove(Variable var)
Removes the specified form variable. |
|
void |
remove(Variable var,
int index)
Removes the indexed form variable. |
|
void |
removePostField(String name)
Removes a post field. |
|
void |
render()
Renders the current form variable. |
|
void |
render(boolean readonly)
Renders the current form variable with a read-only option. |
|
void |
render(MBeanAttributeInfo attribute,
boolean readonly,
int... element)
Renders a form attribute element with a read-only option and marks it as the current one. |
|
void |
render(MBeanAttributeInfo attribute,
int... element)
Renders a form attribute element and marks it as the current one. |
|
void |
render(String template)
Renders the current form variable with a template. |
|
void |
render(String template,
boolean readonly)
Renders the current form variable with a template and read-only option. |
|
void |
render(String template,
MBeanAttributeInfo attribute,
boolean readonly,
int... element)
Renders a form attribute element with a specified template and read-only option and marks it as the current one. |
|
void |
render(String template,
MBeanAttributeInfo attribute,
int... element)
Renders a form attribute element with a specified template and marks it as the current one. |
|
void |
render(String template,
Variable var,
boolean readonly,
int... index)
Renders the indexed form variable with a template and read-only option and marks it as the current one. |
|
void |
render(String template,
Variable var,
int... index)
Renders the indexed form variable with a template and marks it as the current one. |
|
void |
render(Variable var,
boolean readonly,
int... index)
Renders the indexed form variable and read-only option and marks it as the current one. |
|
void |
render(Variable var,
int... index)
Renders the indexed form variable and marks it as the current one. |
|
void |
resetFormParameters()
Resets the request parameters of the current form. |
|
void |
resetTheme()
Resets the form theme of this request and session. |
|
ConcurrentMap<String,String> |
resolve()
Resolves form properties of the current form attribute. |
|
ConcurrentMap<String,String> |
resolve(MBeanAttributeInfo attribute)
Resolves form properties of the specified form attribute. |
|
ConcurrentMap<String,String> |
resolve(Variable variable,
MBeanAttributeInfo attribute)
Resolves form properties of the specified form variable and attribute. |
|
Variable |
restore(String type)
Restores a saved form variable or creates a new one. |
|
Variable |
restore(String type,
boolean create)
Restores a saved form variable. |
|
Variable |
restore(String type,
int index)
Restores a saved indexed form variable or creates a new one. |
|
Variable |
restore(String type,
int index,
boolean create)
Restores a saved indexed form variable. |
|
void |
save()
Saves the current form variable. |
|
void |
save(Variable var)
Saves the specified form variable. |
|
void |
save(Variable var,
int index)
Saves the indexed form variable. |
|
void |
setElement(int index)
Sets the array index of the current form attribute element. |
|
void |
setExtension(String type)
Sets the extension of this request. |
|
void |
setFormName(String name)
Sets the name of the current form and resets its variable index. |
|
void |
setInfo(MBeanAttributeInfo attribute)
Sets the attribute info of the current form attribute. |
|
void |
setInfo(String name)
Sets the named attribute info of the current form attribute. |
|
void |
setPostField(String value)
Sets a post field of the current attribute with the specified value. |
|
void |
setPostField(String name,
String value)
Sets a post field of the named attribute with the specified value. |
|
void |
setReadOnly(boolean readonly)
Sets whether the current form is read-only. |
|
void |
setTheme(String theme)
Sets the form theme of this request. |
|
void |
setTheme(String theme,
boolean perm)
Sets the form theme of this request and optionally of this session. |
|
void |
setTrait(String trait,
boolean flag)
Sets the named trait of the current form attribute as a string. |
|
void |
setTrait(VariableAttributeInfo.Trait trait,
boolean flag)
Sets the specified trait of the current form attribute. |
|
void |
setValue(int index,
Object value)
Sets the indexed element of the current form attribute value without localization. |
|
void |
setValue(MBeanAttributeInfo attribute,
int index,
Object value)
Sets indexed element of the specified form attribute value without localization. |
|
void |
setValue(MBeanAttributeInfo attribute,
Object value)
Sets the specified form attribute value without localization. |
|
void |
setValue(Object value)
Sets the current form attribute value or element without localization. |
|
void |
setValue(String name,
int index,
Object value)
Sets indexed element the named attribute value of the current form variable. |
|
void |
setValue(String name,
Object value)
Sets the named attribute value of the current form variable. |
|
void |
setVariable(Variable var,
boolean readonly,
int... index)
Sets the current form variable with a read-only option. |
|
void |
setVariable(Variable var,
int... index)
Sets the current form variable. |
|
String |
toString()
Returns the current form attribute value or element as a localized string. |
|
String |
toString(MBeanAttributeInfo attribute)
Returns the specified form attribute value as a localized string. |
|
String |
toString(MBeanAttributeInfo attribute,
int index)
Returns the specified form attribute element as a localized string. |
|
String |
toString(String name)
Returns the named form attribute value or element as a localized string. |
|
String |
toString(String name,
int index)
Returns the named form attribute element value as a localized string array. |
|
String[] |
toStrings()
Returns the current form attribute values as a localized string array. |
|
String[] |
toStrings(MBeanAttributeInfo attribute)
Returns the specified form attribute values as a localized string array. |
|
String[] |
toStrings(String name)
Returns the named form attribute values as a localized string array. |
|
boolean |
update()
Updates the current form variable with request parameters. |
|
boolean |
update(ObjectName name)
Updates the current form variable with request parameters and exports the result to the specified MBean, if the update was successful. |
|
boolean |
update(ObjectName name,
AttributeFilter filter)
Updates the current form variable with request parameters and exports the result to the specified MBean by applying a filter, if the update was successful. |
|
boolean |
update(Variable variable,
int... index)
Updates the indexed form variable with request parameters and marks it as the current one. |
|
boolean |
validate()
Validates request parameters of the current form variable. |
|
boolean |
validate(Variable variable,
int... index)
Validates request parameters of the indexed form variable and marks it as the current one. |
Methods inherited from class org.norther.tammi.spray.engine.tool.BeanTool |
---|
addValue, addValue, create, create, create, create, create, disposed, getCharacterEncoding, getContext, getContextToolFilter, getDefaultLocale, getDescription, getDetail, getDetail, getEncodingSize, getEnumeration, getFilter, getFilterChain, getFilterKey, getGroup, getInvalidation, getKeyValue, getKMLWriter, getLOBLinkPattern, getMBeanServer, getPrincipal, getQualifier, getRequest, getResourceMap, getResponse, getValue, getValue, getVarHandler, getVariableRegistry, getVarWriter, isBound, isDisposed, isFilterChanged, length, recycle, recycled, removeValue, removeValue, setValue, setValue, toString, toString, toStrings, toStrings, valueBound, valueUnbound |
Methods inherited from class org.norther.tammi.core.rt.Introspector |
---|
clearResourceCache, contains, containsTrait, containsTrait, cutValue, exportTo, exportTo, getComparator, getConverter, getException, getFormat, getInfo, getInfos, getLocale, getMax, getMessage, getMeta, getMin, getNodeValue, getNodeValue, getPattern, getResourceBundle, getResourceBundle, getResourceBundleName, getResourceBundleName, importFrom, importFrom, isArray, isEnumerated, isInvalid, isLOB, isReadable, isTrait, isTrait, isVisible, isWritable, resolve, resolve, setCharacterEncoding, setLOBLinkPattern, setLocale, setTrait, setTrait, toMediaFile, toSerializable, toSerializables |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FormTool()
Method Detail |
---|
public void dispose()
Recyclable
dispose
in interface Recyclable
dispose
in class BeanTool
public String getNameField()
public String getIndexField()
public String getFormName()
FormContext
getFormName
in interface FormContext
public void setFormName(String name)
FormContext
setFormName
in interface FormContext
name
- the form name.public int getFormIndex()
FormContext
getFormIndex
in interface FormContext
public String getFormPrefix()
FormContext
getFormPrefix
in interface FormContext
public String getFormPrefix(int index)
FormContext
getFormPrefix
in interface FormContext
index
- the index.
public String getNestedPrefix()
FormContext
getNestedPrefix
in interface FormContext
public boolean isReadOnly()
FormContext
isReadOnly
in interface FormContext
public void setReadOnly(boolean readonly)
FormContext
setReadOnly
in interface FormContext
readonly
- true if read-only, false otherwise.public Variable getVariable()
FormContext
getVariable
in interface FormContext
public void setVariable(Variable var, int... index)
FormContext
setVariable
in interface FormContext
var
- the form variable.index
- the form index.public void setVariable(Variable var, boolean readonly, int... index)
FormContext
setVariable
in interface FormContext
var
- the form variable.readonly
- a forced read-only option.index
- the form index.public MBeanAttributeInfo getInfo()
FormContext
getInfo
in interface FormContext
public MBeanAttributeInfo getInfo(boolean unlocked)
FormContext
getInfo
in interface FormContext
unlocked
- true if unlocked, false otherwise.
public VariableAttributeInfo getInfo(String name)
FormContext
getInfo
in interface FormContext
name
- the attribute name.
public VariableAttributeInfo getInfo(String name, boolean unlocked)
FormContext
getInfo
in interface FormContext
name
- the attribute name.unlocked
- true if unlocked, false otherwise.
public void setInfo(String name)
FormContext
setInfo
in interface FormContext
name
- the attribute name.public void setInfo(MBeanAttributeInfo attribute)
FormContext
setInfo
in interface FormContext
attribute
- the form attribute.public List<VariableAttributeInfo> getInfos()
FormContext
getInfos
in interface FormContext
public List<VariableAttributeInfo> getInfos(boolean unlocked)
FormContext
getInfos
in interface FormContext
unlocked
- true if unlocked, false otherwise.
public boolean contains(String name)
FormContext
contains
in interface FormContext
name
- the attribute name.
public int getElement()
FormContext
getElement
in interface FormContext
public void setElement(int index)
FormContext
setElement
in interface FormContext
index
- the element index.public FormContext getParentContext()
FormContext
getParentContext
in interface FormContext
public FormContext getRootContext()
FormContext
getRootContext
in interface FormContext
public void clearContext()
FormContext
clearContext
in interface FormContext
public FormContext getFormContext()
public void pushContext()
public void popContext()
public Variable restore(String type)
type
- the variable type.
public Variable restore(String type, boolean create)
type
- the variable type.create
- true to create a missing variable.
public Variable restore(String type, int index)
type
- the variable type.index
- the form index.
public Variable restore(String type, int index, boolean create)
type
- the variable type.index
- the form index.create
- true to create a missing variable.
public void save()
public void save(Variable var)
var
- the variable.public void save(Variable var, int index)
var
- the variable.index
- the form index.public void remove()
public void remove(Variable var)
var
- the variable.public void remove(Variable var, int index)
var
- the variable.index
- the form index.public String getTheme()
public void setTheme(String theme)
theme
- the name of the form theme.public void setTheme(String theme, boolean perm)
theme
- the name of the form theme.perm
- set permanently if true.public void resetTheme()
public String getExtension()
public void setExtension(String type)
type
- the content type specific extension or null.public boolean checkPermission(String actions)
actions
- the actions to access.
public boolean checkPermission(Variable variable, String actions)
variable
- the variable.actions
- the actions to access.
public Object getValue(String name)
name
- the attribute name.
public void setValue(String name, Object value)
name
- the attribute name.value
- the attribute value.public Object getValue(String name, int index)
name
- the attribute name.index
- the element index.
public void setValue(String name, int index, Object value)
name
- the attribute name.index
- the element index.value
- the attribute value.public Object getKeyValue(String name)
name
- the attribute name.
public String toString(String name)
name
- the attribute name.
public String[] toStrings(String name)
name
- the attribute name.
public String toString(String name, int index)
name
- the attribute name.index
- the element index.
public String getParameter(String name)
Note that only request parameters of the current form are considered when looking for the parameter.
name
- the name.
public String getParameter(String name, String def)
Note that only request parameters of the current form are considered when looking for the parameter.
name
- the name.def
- the default value.
public String[] getParameters(String name)
Note that only request parameters of the current form are considered when looking for the parameter.
name
- the name.
public String[] getParameters(String name, String[] defs)
Note that only request parameters of the current form are considered when looking for the parameter.
name
- the name.defs
- the default values.
public String getParameter()
public String getParameter(MBeanAttributeInfo attribute)
attribute
- the attribute.
public String getParameter(MBeanAttributeInfo attribute, int index)
attribute
- the attribute.index
- the element index.
public String[] getParameters()
public String[] getParameters(MBeanAttributeInfo attribute)
attribute
- the attribute.
public void clearFormParameters()
public void resetFormParameters()
public Map<String,Object> getFormParameters()
Note that parameter names are without the form prefix.
public String getName()
public String getName(MBeanAttributeInfo attribute)
attribute
- the form attribute.
public String getName(String name)
name
- the attribute name.
public String getName(int index)
index
- the element index.
public String getName(MBeanAttributeInfo attribute, int index)
attribute
- the form attribute.index
- the element index.
public String getName(String name, int index)
name
- the attribute name.index
- the element index.
public String getType()
public String getType(MBeanAttributeInfo attribute)
attribute
- the attribute.
public Object getValue()
public void setValue(Object value)
value
- the attribute value.public Object getValue(int index)
index
- the element index.
public void setValue(int index, Object value)
index
- the element index.value
- the attribute value.public Object getValue(MBeanAttributeInfo attribute)
attribute
- the attribute.
public void setValue(MBeanAttributeInfo attribute, Object value)
attribute
- the attribute.value
- the attribute value.public Object getValue(MBeanAttributeInfo attribute, int index)
attribute
- the attribute.index
- the element index.
public void setValue(MBeanAttributeInfo attribute, int index, Object value)
attribute
- the attribute.index
- the element index.value
- the attribute value.public Object getKeyValue()
public Object getKeyValue(MBeanAttributeInfo attribute)
attribute
- the attribute.
public String toString()
toString
in class Object
public String toString(MBeanAttributeInfo attribute)
attribute
- the attribute.
public String toString(MBeanAttributeInfo attribute, int index)
attribute
- the attribute.index
- the element index.
public String[] toStrings()
public String[] toStrings(MBeanAttributeInfo attribute)
attribute
- the attribute.
public int length()
public int length(MBeanAttributeInfo attribute)
attribute
- the attribute.
public String newTagId(String tag)
tag
- the tag.
public String getTagId(String tag)
tag
- the tag.
public String getTagId(String tag, MBeanAttributeInfo attribute)
tag
- the tag.attribute
- the attribute.
public String getTagId(String tag, int index)
tag
- the tag.index
- the value index.
public String getTagId(String tag, MBeanAttributeInfo attribute, int index)
tag
- the tag.attribute
- the attribute.index
- the value index.
public String getTagId(String tag, String name)
tag
- the tag.name
- the attribute name.
public String getTagId(String tag, String name, int index)
Note that the current implementation applies hash codes, which doesn't guarantee full uniqueness.
tag
- the tag.name
- the attribute name.index
- the value index.
public Object getSelectedValue()
public Object getSelectedValue(MBeanAttributeInfo attribute)
attribute
- the attribute.
public Object getSelectedValue(MBeanAttributeInfo attribute, int index)
attribute
- the attribute.index
- the element index.
public Object[] getSelectedValues()
public Object[] getSelectedValues(MBeanAttributeInfo attribute)
attribute
- the attribute.
public int getSelectedEnum()
public int getSelectedEnum(MBeanAttributeInfo attribute)
attribute
- the attribute.
public int getSelectedEnum(MBeanAttributeInfo attribute, int index)
attribute
- the attribute.index
- the element index.
public OrderedSet<Integer> getSelectedEnums()
public OrderedSet<Integer> getSelectedEnums(MBeanAttributeInfo attribute)
attribute
- the attribute.
public int getSelectedLine()
public int getSelectedLine(MBeanAttributeInfo attribute)
attribute
- the attribute.
public OrderedSet<Integer> getSelectedLines()
public OrderedSet<Integer> getSelectedLines(MBeanAttributeInfo attribute)
attribute
- the attribute.
public boolean isInvalid()
public boolean isInvalid(MBeanAttributeInfo attribute, int... element)
attribute
- the attribute.element
- the element index.
public Exception getException()
public Exception getException(MBeanAttributeInfo attribute, int... element)
attribute
- the attribute.element
- the element index.
public String getInvalidation()
public String getInvalidation(MBeanAttributeInfo attribute, int... element)
attribute
- the attribute.element
- the element index.
public String getDescription()
public String getDescription(MBeanAttributeInfo attribute)
attribute
- the attribute.
public String getGroup()
public String getGroup(MBeanAttributeInfo attribute)
attribute
- the attribute.
public boolean isEqualGroup(MBeanAttributeInfo attribute)
attribute
- the attribute.
public boolean isSameGroup(MBeanAttributeInfo attribute)
attribute
- the attribute.
public String getDetail()
public String getDetail(MBeanAttributeInfo attribute)
attribute
- the attribute.
public String getDetail(Object arg)
arg
- the argument.
public String getDetail(MBeanAttributeInfo attribute, Object arg)
attribute
- the attribute.arg
- the argument.
public String getQualifier()
public String getQualifier(MBeanAttributeInfo attribute)
attribute
- the attribute.
public EnumeratedList getEnumeration()
public EnumeratedList getEnumeration(MBeanAttributeInfo attribute)
attribute
- the attribute.
public EnumeratedList getEnumeration(Variable variable, MBeanAttributeInfo attribute)
Introspector
getEnumeration
in class BeanTool
variable
- the variable.attribute
- the attribute.
public boolean isReadable()
public boolean isWritable()
public boolean isVisible()
public boolean isArray()
public boolean isTrait(String trait)
trait
- the named trait.
public void setTrait(String trait, boolean flag)
trait
- the named trait.flag
- true to set the trait, otherwise false.public boolean containsTrait(String trait)
trait
- the attribute trait.
public boolean isTrait(VariableAttributeInfo.Trait trait)
trait
- the trait.
public void setTrait(VariableAttributeInfo.Trait trait, boolean flag)
trait
- the trait.flag
- true to set the trait, otherwise false.public boolean containsTrait(VariableAttributeInfo.Trait trait)
trait
- the attribute trait.
public <T> Comparator<T> getComparator()
T
- the comparator type.
public boolean isEnumerated()
public String getPattern()
public Number getMin()
public Number getMax()
public VariableAttributeInfo firstInfo(String trait)
trait
- the named trait.
public VariableAttributeInfo firstInfo(Variable variable, String trait)
variable
- the variable.trait
- the named trait.
public VariableAttributeInfo lastInfo(String trait)
trait
- the named trait.
public VariableAttributeInfo lastInfo(Variable variable, String trait)
variable
- the variable.trait
- the named trait.
public VariableAttributeInfo nextInfo(int index, String trait)
index
- the start index.trait
- the named trait.
public VariableAttributeInfo nextInfo(Variable variable, int index, String trait)
variable
- the variable.index
- the start index.trait
- the named trait.
public int position()
public int position(VariableAttributeInfo attribute)
attribute
- the attribute.
public int position(Variable variable, VariableAttributeInfo attribute)
variable
- the variable.attribute
- the attribute.
public boolean isValidated()
public boolean isValidated(Variable variable, int... index)
variable
- the variable.index
- the form index.
public SortedMap<String,Exception> getValidation()
public SortedMap<String,Exception> getValidation(Variable variable, int... index)
variable
- the variable.index
- the form index.
public boolean validate()
public boolean validate(Variable variable, int... index)
variable
- the variable.index
- the form index.
public boolean update()
public boolean update(Variable variable, int... index)
variable
- the variable.index
- the form index.
public boolean update(ObjectName name)
name
- the object of the MBean to export to.
public boolean update(ObjectName name, AttributeFilter filter)
name
- the object of the MBean to export to.filter
- the filter to apply.
public void render()
public void render(boolean readonly)
readonly
- a forced read-only option.public void render(String template)
template
- the template.public void render(String template, boolean readonly)
template
- the template.readonly
- a forced read-only option.public void render(Variable var, int... index)
var
- the variable.index
- the form index.public void render(Variable var, boolean readonly, int... index)
var
- the variable.index
- the form index.readonly
- a forced read-only option.public void render(String template, Variable var, int... index)
template
- the template.var
- the variable.index
- the form index.public void render(String template, Variable var, boolean readonly, int... index)
template
- the template.var
- the variable.index
- the form index.readonly
- a forced read-only option.public void render(MBeanAttributeInfo attribute, int... element)
attribute
- the attribute.element
- the element index.public void render(MBeanAttributeInfo attribute, boolean readonly, int... element)
attribute
- the attribute.element
- the element index.readonly
- a forced read-only option.public void render(String template, MBeanAttributeInfo attribute, int... element)
template
- the template.attribute
- the attribute.element
- the element index.public void render(String template, MBeanAttributeInfo attribute, boolean readonly, int... element)
template
- the template.attribute
- the attribute.element
- the element index.readonly
- a forced read-only option.public ConcurrentMap<String,String> resolve()
public ConcurrentMap<String,String> resolve(MBeanAttributeInfo attribute)
attribute
- the attribute.
public ConcurrentMap<String,String> resolve(Variable variable, MBeanAttributeInfo attribute)
variable
- the variable.attribute
- the attribute.
public boolean isLocalized()
Introspector
isLocalized
in class BeanTool
public String makePostField()
public String makePostField(int index)
index
- the element index.
public String makePostField(String name)
name
- the attribute name.
public String makePostField(String name, int index)
name
- the attribute name.index
- the element index.
public void setPostField(String value)
value
- the attribute value.public void setPostField(String name, String value)
name
- the attribute name.value
- the attribute value.public Map<String,String> getPostFields()
public boolean containsPostField(String name)
name
- the attribute name.
public void removePostField(String name)
name
- the attribute name.public void clearPostFields()
protected Variable createVariable(String type) throws ConstructionException
Introspector
createVariable
in class Introspector
type
- the variable type.
ConstructionException
- if construction fails.protected FormFilter getFormFilter()
protected PageFilter getPageFilter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |