|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.base.Adaptee
org.norther.tammi.spray.filter.DefaultFilter
org.norther.tammi.spray.filter.DefaultKeyFilter
org.norther.tammi.spray.filter.DefaultSecureKeyFilter
org.norther.tammi.spray.template.DefaultFormFilter
public class DefaultFormFilter
A default implementation of FormFilter.
| Field Summary | |
|---|---|
protected static String |
DEFAULT_FORM
The default form. |
protected static String |
DEFAULT_INFO
The default info. |
protected static String |
DEFAULT_INPUT
The default input. |
protected static String |
DEFAULT_OUTPUT
The default output. |
protected static String |
ENUMERATION
The enumeration type key. |
protected static String |
ENUMERATIONS
The enumeration array type key. |
static String |
FORM_KEY
The form key. |
| Fields inherited from class org.norther.tammi.spray.filter.DefaultKeyFilter |
|---|
DEFAULT_KEY |
| Fields inherited from class org.norther.tammi.core.base.Adaptee |
|---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
| Fields inherited from interface org.norther.tammi.spray.template.FormFilter |
|---|
FORM_ID_NAME, FORM_INDEX_NAME |
| Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate |
|---|
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE |
| Constructor Summary | |
|---|---|
DefaultFormFilter()
Constructs a new filter. |
|
DefaultFormFilter(String key)
Constructs a new filter with a key. |
|
| Method Summary | |
|---|---|
void |
clearCached()
Clears all cached entries without notifying. |
void |
clearControlAttributes()
Clears all control attributes. |
void |
clearFormProperties()
Clears all form properties. |
void |
clearFormTemplates()
Clears all form templates. |
void |
clearInfoTemplates()
Clears all info templates. |
void |
clearInputTemplates()
Clears all input templates. |
void |
clearOutputTemplates()
Clears all output templates. |
void |
clearParameterMap(ServletRequest request,
ServletResponse response,
FilterChain chain)
Clears the parameter map of the specified request. |
void |
clearParameterMap(String prefix,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Clears the prefixed parameter map of the specified request. |
Set |
controlAttributeSet()
Returns a read-only set of control attribute qualifiers. |
Variable |
createVariable(String type)
Creates a new variable instance of the specified type. |
void |
doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
|
void |
expireCached(long timestamp)
Expires all cached entries notifying them about expiration. |
void |
expireFraction(long timestamp,
float fraction)
Expires the specified fraction of cached entries notifying them about expiration. |
Set |
formPropertySet()
Returns a read-only set of form property qualifiers. |
Set |
formQualifierSet()
Returns a read-only set of form template qualifiers. |
ConcurrentMap |
getCache(boolean create)
Gets and optionally creates the cache. |
String |
getControlAttribute(String qualifier)
Gets the qualified control attribute. |
String |
getCurrentForm(ServletRequest request,
ServletResponse response,
FilterChain chain)
Gets the current form of the specified request. |
String |
getDefaultFormName()
Gets the theme of the default form. |
String |
getFormIdName()
Gets the name of the form id field. |
String |
getFormIndexName()
Gets the name of the form index field. |
String |
getFormProperty(String qualifier)
Gets the qualified form property. |
String |
getFormTemplate()
Gets the default form template. |
String |
getFormTemplate(String qualifier)
Gets the qualified form template. |
String |
getInfoTemplate()
Gets the default info template. |
String |
getInfoTemplate(String qualifier)
Gets the qualified info template. |
String |
getInputTemplate()
Gets the default input template. |
String |
getInputTemplate(String qualifier)
Gets the qualified input template. |
String |
getOutputTemplate()
Gets the default output template. |
String |
getOutputTemplate(String qualifier)
Gets the qualified output template. |
Map |
getParameterMap(ServletRequest request,
ServletResponse response,
FilterChain chain)
Gets the parameter map of the specified request. |
Map |
getParameterMap(String prefix,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Gets the prefixed parameter map of the specified request. |
Map |
getParameterMap(Variable variable,
String prefix,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Gets the parameter map of the specified variable. |
long |
getRefreshed()
Gets the last refresh timestamp. |
Map |
getValidationMap(Variable variable,
String prefix,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Gets the validation map of the specified variable. |
ObjectName |
getVariableRegistryName()
Gets the the variable registry of this filter. |
Set |
infoQualifierSet()
Returns a read-only set of info template qualifiers. |
Set |
inputQualifierSet()
Returns a read-only set of input template qualifiers. |
boolean |
isCachingDisabled()
Checks whether the caching is disabled. |
boolean |
isLocalizedForms()
Gets the localized forms flag. |
boolean |
isValidated(Variable variable,
String prefix,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Checks whether the specified variable is validated. |
Set |
outputQualifierSet()
Returns a read-only set of output template qualifiers. |
void |
postmanaged()
This method is called when the implementing adaptee has been managed either during post-registration of the corresponding adapter MBean or just after it is explicitly added to the adapter MBean during run-time. |
void |
refresh()
Refreshes the MBean. |
void |
removeCache()
Removes the cache. |
void |
removeControlAttribute(String qualifier)
Removes the qualified control attribute. |
void |
removeFormProperty(String qualifier)
Removes the qualified form property. |
void |
removeFormTemplate(String qualifier)
Removes the qualified form template. |
void |
removeInfoTemplate(String qualifier)
Removes the qualified info template. |
void |
removeInputTemplate(String qualifier)
Removes the qualified input template. |
void |
removeOutputTemplate(String qualifier)
Removes the qualified output template. |
void |
removeVariable(String prefix,
Variable variable,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Removes the specified form variable from a session. |
void |
render(String name,
Variable variable,
boolean readonly,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Renders a form as Variable. |
void |
render(String name,
Variable variable,
MBeanAttributeInfo attribute,
boolean readonly,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Renders a control as the specified attribute of Variable. |
void |
render(String template,
Variable variable,
MBeanAttributeInfo attribute,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Renders a control as the specified attribute of Variable using a fixed template. |
void |
render(String template,
Variable variable,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Renders a form as Variable using a fixed template. |
String |
resetCurrentForm(ServletRequest request,
ServletResponse response,
FilterChain chain)
Resets the current form of the specified request to the default form. |
String |
resetCurrentForm(String name,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Resets the current form of the specified request to the named form. |
void |
resetParameterMap(ServletRequest request,
ServletResponse response,
FilterChain chain)
Resets the parameter map of the specified request. |
void |
resetParameterMap(String prefix,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Resets the prefixed parameter map of the specified request. |
ConcurrentMap |
resolve(String name,
Variable variable,
MBeanAttributeInfo attribute)
Resolves form properties of the specified attribute of Variable. |
Variable |
restoreVariable(String prefix,
String type,
boolean create,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Restores a saved form variable from a session or optionally creates a missing one. |
void |
saveVariable(String prefix,
Variable variable,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Saves the specified form variable to a session. |
void |
setCachingDisabled(boolean flag)
Sets the caching disabled flag. |
void |
setControlAttribute(String qualifier,
String attribute)
Sets the qualified control property. |
void |
setDefaultFormName(String name)
Sets the theme of the default form. |
void |
setFormIdName(String name)
Sets the name of the form id field to post the unique name of the submitted form. |
void |
setFormIndexName(String name)
Sets the name of the form index field to post variable indeces of the submitted form. |
void |
setFormProperty(String qualifier,
String property)
Sets the qualified form property. |
void |
setFormTemplate(String template)
Sets the default form template. |
void |
setFormTemplate(String qualifier,
String template)
Sets the qualified form template. |
void |
setInfoTemplate(String template)
Sets the default info template. |
void |
setInfoTemplate(String qualifier,
String template)
Sets the qualified info template. |
void |
setInputTemplate(String template)
Sets the default input template. |
void |
setInputTemplate(String qualifier,
String template)
Sets the qualified input template. |
void |
setLocalizedForms(boolean flag)
Sets the localized forms flag. |
void |
setOutputTemplate(String template)
Sets the default output template. |
void |
setOutputTemplate(String qualifier,
String template)
Sets the qualified output template. |
void |
setVariableRegistryName(ObjectName registry)
Sets the variable registry of this filter. |
void |
unmanaged()
This method is called when the implementing adaptee is unmanaged either during pre-deregistration of the corresponding adapter MBean or just before it is explicitly removed from the adapter MBean during run-time. |
boolean |
updateForm(Variable variable,
String prefix,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Updates the specified variable with request parameters. |
boolean |
validateForm(Variable variable,
String prefix,
ServletRequest request,
ServletResponse response,
FilterChain chain)
Validates the specified variable with request parameters. |
| Methods inherited from class org.norther.tammi.spray.filter.DefaultKeyFilter |
|---|
getKey, getKeyValue, getKeyValues, isLinkedKey, setKey, setLinkedKey |
| Methods inherited from class org.norther.tammi.spray.filter.DefaultFilter |
|---|
destroy, getFilterConfig, getRequestMap, getSessionMap, init |
| Methods inherited from class org.norther.tammi.core.base.Adaptee |
|---|
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.norther.tammi.spray.filter.SecureFilter |
|---|
checkPermission, checkPermission, checkPermission |
| Methods inherited from interface org.norther.tammi.core.security.AccessController |
|---|
addAllowedPermission, addDeniedPermission, allowedPermissions, allowedRoleSet, checkPermission, checkPermission, checkPermission, clearAllowedPermissions, clearDeniedPermissions, deniedPermissions, deniedRoleSet, getPermissibleRoles, getPermissibleRoles, getPermissibleRoles, isProtected, removeAllowedPermissions, removeDeniedPermissions, setAllowedPermissions, setDeniedPermissions |
| Methods inherited from interface javax.servlet.Filter |
|---|
destroy, init |
| Methods inherited from interface org.norther.tammi.spray.filter.KeyFilter |
|---|
getKey, getKeyValue, getKeyValues, isLinkedKey, setKey, setLinkedKey |
| Methods inherited from interface javax.servlet.Filter |
|---|
destroy, init |
| Field Detail |
|---|
public static final String FORM_KEY
protected static final String DEFAULT_FORM
protected static final String DEFAULT_INFO
protected static final String DEFAULT_INPUT
protected static final String DEFAULT_OUTPUT
protected static final String ENUMERATION
protected static final String ENUMERATIONS
| Constructor Detail |
|---|
public DefaultFormFilter()
public DefaultFormFilter(String key)
key - the filter key.| Method Detail |
|---|
public void postmanaged()
Manageable
postmanaged in interface Manageablepostmanaged in class Adaptee
public void unmanaged()
throws Exception
Manageable
unmanaged in interface Manageableunmanaged in class AdapteeException - if the adaptee refused to be unmanaged.public boolean isCachingDisabled()
CacheClient
isCachingDisabled in interface CacheClientpublic void setCachingDisabled(boolean flag)
CacheClient
setCachingDisabled in interface CacheClientflag - the caching disabled flag.public void expireCached(long timestamp)
CacheClient
expireCached in interface CacheClienttimestamp - the timestamp of the expiration.
public void expireFraction(long timestamp,
float fraction)
CacheClient
expireFraction in interface CacheClienttimestamp - the timestamp of the expiration.fraction - the fraction of entries to expire (0.0..1.0).public void clearCached()
CacheClient
clearCached in interface CacheClientpublic ConcurrentMap getCache(boolean create)
CacheClient
getCache in interface CacheClientcreate - true to create a missing cache.
public void removeCache()
CacheClient
removeCache in interface CacheClientpublic void refresh()
Refreshable
refresh in interface Refreshablepublic long getRefreshed()
Refreshable
getRefreshed in interface Refreshablepublic boolean isLocalizedForms()
FormFilter
isLocalizedForms in interface FormFilterpublic void setLocalizedForms(boolean flag)
FormFilter
setLocalizedForms in interface FormFilterflag - the localized forms flag.public String getDefaultFormName()
FormFilter
getDefaultFormName in interface FormFilterpublic void setDefaultFormName(String name)
FormFilter
setDefaultFormName in interface FormFiltername - the default form.public String getFormIdName()
FormFilter
getFormIdName in interface FormFilterpublic void setFormIdName(String name)
FormFilter
setFormIdName in interface FormFiltername - the form id attribute name.public String getFormIndexName()
FormFilter
getFormIndexName in interface FormFilterpublic void setFormIndexName(String name)
FormFilter
setFormIndexName in interface FormFiltername - the form id attribute name.public String getFormTemplate()
FormFilter
getFormTemplate in interface FormFilterpublic void setFormTemplate(String template)
FormFilter
setFormTemplate in interface FormFiltertemplate - the default template.public String getInfoTemplate()
FormFilter
getInfoTemplate in interface FormFilterpublic void setInfoTemplate(String template)
FormFilter
setInfoTemplate in interface FormFiltertemplate - the default template.public String getInputTemplate()
FormFilter
getInputTemplate in interface FormFilterpublic void setInputTemplate(String template)
FormFilter
setInputTemplate in interface FormFiltertemplate - the default template.public String getOutputTemplate()
FormFilter
getOutputTemplate in interface FormFilterpublic void setOutputTemplate(String template)
FormFilter
setOutputTemplate in interface FormFiltertemplate - the default template.public String getFormTemplate(String qualifier)
FormFilter