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