Package com.aspectran.core.context.rule
Class RequestRule
- java.lang.Object
-
- com.aspectran.core.context.rule.RequestRule
-
public class RequestRule extends java.lang.ObjectThe Class RequestRule.Created: 2008. 03. 22 PM 5:48:09
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCHARACTER_ENCODING_SETTING_NAMEstatic java.lang.StringLOCALE_CHANGE_INTERCEPTOR_SETTING_NAMEstatic java.lang.StringLOCALE_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 voidaddAttributeItemRule(ItemRule attributeItemRule)Adds the attribute item rule.voidaddParameterItemRule(ItemRule parameterItemRule)Adds the parameter item rule.MethodTypegetAllowedMethod()Returns the method allowed on the requested resource.ItemRuleMapgetAttributeItemRuleMap()Gets the attribute item rule map.java.lang.StringgetEncoding()Gets the request encoding.ItemRuleMapgetParameterItemRuleMap()Gets the parameter item rule map.booleanisExplicit()Gets whether the request rule is explicitly generated.ItemRulenewAttributeItemRule(java.lang.String attributeName)Adds a new attribute rule with the specified name and returns it.static RequestRulenewInstance(boolean explicit)static RequestRulenewInstance(java.lang.String allowedMethod, java.lang.String encoding)ItemRulenewParameterItemRule(java.lang.String parameterName)Adds a new parameter rule with the specified name and returns it.voidsetAllowedMethod(MethodType allowedMethod)Sets the method allowed on the requested resource.voidsetAttributeItemRuleMap(ItemRuleMap attributeItemRuleMap)Sets the attribute item rule map.voidsetEncoding(java.lang.String encoding)Sets the request encoding.voidsetParameterItemRuleMap(ItemRuleMap parameterItemRuleMap)Sets the attribute item rule map.java.lang.StringtoString()
-
-
-
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:
toStringin 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
-
-