Package com.aspectran.core.context.rule
Class RequestRule
java.lang.Object
com.aspectran.core.context.rule.RequestRule
The Class RequestRule.
Created: 2008. 03. 22 PM 5:48:09
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttributeItemRule
(ItemRule attributeItemRule) Adds the attribute item rule.void
addParameterItemRule
(ItemRule parameterItemRule) Adds the parameter item rule.Returns the method allowed on the requested resource.Gets the attribute item rule map.Gets the request encoding.Gets the parameter item rule map.boolean
Gets whether the request rule is explicitly generated.newAttributeItemRule
(String attributeName) Adds a new attribute rule with the specified name and returns it.static RequestRule
newInstance
(boolean explicit) static RequestRule
newInstance
(String allowedMethod, String encoding) newParameterItemRule
(String parameterName) Adds a new parameter rule with the specified name and returns it.void
setAllowedMethod
(MethodType allowedMethod) Sets the method allowed on the requested resource.void
setAttributeItemRuleMap
(ItemRuleMap attributeItemRuleMap) Sets the attribute item rule map.void
setEncoding
(String encoding) Sets the request encoding.void
setParameterItemRuleMap
(ItemRuleMap parameterItemRuleMap) Sets the attribute item rule map.toString()
-
Field Details
-
CHARACTER_ENCODING_SETTING_NAME
- See Also:
-
LOCALE_RESOLVER_SETTING_NAME
- See Also:
-
LOCALE_CHANGE_INTERCEPTOR_SETTING_NAME
- See Also:
-
-
Constructor Details
-
RequestRule
public RequestRule(boolean explicit) Instantiates a new RequestRule.- Parameters:
explicit
- whether this request rule is explicit
-
-
Method Details
-
isExplicit
public boolean isExplicit()Gets whether the request rule is explicitly generated.- Returns:
- true if this request rule is explicit; false otherwise
-
getAllowedMethod
Returns the method allowed on the requested resource.- Returns:
- the allowed method
-
setAllowedMethod
Sets the method allowed on the requested resource.- Parameters:
allowedMethod
- the new allowed method
-
getEncoding
Gets the request encoding.- Returns:
- the request encoding
-
setEncoding
Sets the request encoding.- Parameters:
encoding
- the new request encoding
-
getParameterItemRuleMap
Gets the parameter item rule map.- Returns:
- the parameter item rule map
-
setParameterItemRuleMap
Sets the attribute item rule map.- Parameters:
parameterItemRuleMap
- the new attribute item rule map
-
newParameterItemRule
Adds a new parameter rule with the specified name and returns it.- Parameters:
parameterName
- the parameter name- Returns:
- the parameter item rule
-
addParameterItemRule
Adds the parameter item rule.- Parameters:
parameterItemRule
- the parameter item rule
-
getAttributeItemRuleMap
Gets the attribute item rule map.- Returns:
- the attribute item rule map
-
setAttributeItemRuleMap
Sets the attribute item rule map.- Parameters:
attributeItemRuleMap
- the new attribute item rule map
-
newAttributeItemRule
Adds a new attribute rule with the specified name and returns it.- Parameters:
attributeName
- the parameter name- Returns:
- the attribute item rule
-
addAttributeItemRule
Adds the attribute item rule.- Parameters:
attributeItemRule
- the attribute item rule
-
toString
-
newInstance
-
newInstance
@NonNull public static RequestRule newInstance(String allowedMethod, String encoding) throws IllegalRuleException - Throws:
IllegalRuleException
-