Package com.aspectran.core.context.rule
Class ForwardRule
- java.lang.Object
-
- com.aspectran.core.context.rule.ForwardRule
-
- All Implemented Interfaces:
Replicable<ForwardRule>
public class ForwardRule extends java.lang.Object implements Replicable<ForwardRule>
The Class ForwardRule.Created: 2008. 03. 22 PM 5:51:58
-
-
Field Summary
Fields Modifier and Type Field Description static ResponseType
RESPONSE_TYPE
-
Constructor Summary
Constructors Constructor Description ForwardRule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAttributeItemRule(ItemRule itemRule)
Adds the attribute item rule.ItemRuleMap
getAttributeItemRuleMap()
Gets the attribute item rule map.java.lang.String
getContentType()
Gets the content type.java.lang.Boolean
getDefaultResponse()
Returns whether the default response.MethodType
getRequestMethod()
java.lang.String
getTransletName()
Gets the translet name.boolean
isDefaultResponse()
Returns whether the default response.ItemRule
newAttributeItemRule(java.lang.String attributeName)
Adds a new attribute rule with the specified name and returns it.static ForwardRule
newInstance(java.lang.String transletName)
Returns a new instance of ForwardRule.static ForwardRule
newInstance(java.lang.String contentType, java.lang.String transletName, java.lang.String method, java.lang.Boolean defaultResponse)
Returns a new instance of ForwardRule.ForwardRule
replicate()
Creates and returns a new instance after replicating a rule or Object.static ForwardRule
replicate(ForwardRule forwardRule)
void
setAttributeItemRuleMap(ItemRuleMap attributeItemRuleMap)
Sets the attribute item rule map.void
setContentType(java.lang.String contentType)
Sets the content type.void
setDefaultResponse(java.lang.Boolean defaultResponse)
Sets whether the default response.void
setRequestMethod(MethodType requestMethod)
void
setTransletName(java.lang.String transletName)
Sets the translet name.java.lang.String
toString()
-
-
-
Field Detail
-
RESPONSE_TYPE
public static final ResponseType RESPONSE_TYPE
-
-
Method Detail
-
getContentType
public java.lang.String getContentType()
Gets the content type.- Returns:
- the content type
-
setContentType
public void setContentType(java.lang.String contentType)
Sets the content type.- Parameters:
contentType
- the new content type
-
getTransletName
public java.lang.String getTransletName()
Gets the translet name.- Returns:
- the translet name
-
setTransletName
public void setTransletName(java.lang.String transletName)
Sets the translet name.- Parameters:
transletName
- the new translet name
-
getRequestMethod
public MethodType getRequestMethod()
-
setRequestMethod
public void setRequestMethod(MethodType requestMethod)
-
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 attribute name- Returns:
- the attribute item rule
-
addAttributeItemRule
public void addAttributeItemRule(ItemRule itemRule)
Adds the attribute item rule.- Parameters:
itemRule
- the attribute item rule
-
getDefaultResponse
public java.lang.Boolean getDefaultResponse()
Returns whether the default response.- Returns:
- whether the default response
-
isDefaultResponse
public boolean isDefaultResponse()
Returns whether the default response.- Returns:
- true, if is default response
-
setDefaultResponse
public void setDefaultResponse(java.lang.Boolean defaultResponse)
Sets whether the default response.- Parameters:
defaultResponse
- whether the default response
-
replicate
public ForwardRule replicate()
Description copied from interface:Replicable
Creates and returns a new instance after replicating a rule or Object.- Specified by:
replicate
in interfaceReplicable<ForwardRule>
- Returns:
- replicated rule or new instance of Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
newInstance
public static ForwardRule newInstance(java.lang.String contentType, java.lang.String transletName, java.lang.String method, java.lang.Boolean defaultResponse) throws IllegalRuleException
Returns a new instance of ForwardRule.- Parameters:
contentType
- the content typetransletName
- the translet namemethod
- the request methoddefaultResponse
- whether the default response- Returns:
- an instance of ForwardRule
- Throws:
IllegalRuleException
- if an illegal rule is found
-
newInstance
public static ForwardRule newInstance(java.lang.String transletName) throws IllegalRuleException
Returns a new instance of ForwardRule.- Parameters:
transletName
- the translet name- Returns:
- an instance of ForwardRule
- Throws:
IllegalRuleException
- if an illegal rule is found
-
replicate
public static ForwardRule replicate(ForwardRule forwardRule)
-
-