Package com.aspectran.core.context.rule
Class ForwardRule
java.lang.Object
com.aspectran.core.context.rule.ForwardRule
- All Implemented Interfaces:
Replicable<ForwardRule>
The Class ForwardRule.
Created: 2008. 03. 22 PM 5:51:58
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttributeItemRule
(ItemRule itemRule) Adds the attribute item rule.Gets the attribute item rule map.Gets the content type.Returns whether the default response.Gets the translet name.boolean
Returns whether the default response.newAttributeItemRule
(String attributeName) Adds a new attribute rule with the specified name and returns it.static ForwardRule
newInstance
(String transletName) Returns a new instance of ForwardRule.static ForwardRule
newInstance
(String contentType, String transletName, String method, Boolean defaultResponse) Returns a new instance of ForwardRule.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
(String contentType) Sets the content type.void
setDefaultResponse
(Boolean defaultResponse) Sets whether the default response.void
setRequestMethod
(MethodType requestMethod) void
setTransletName
(String transletName) Sets the translet name.toString()
-
Field Details
-
RESPONSE_TYPE
-
-
Constructor Details
-
ForwardRule
public ForwardRule()
-
-
Method Details
-
getContentType
Gets the content type.- Returns:
- the content type
-
setContentType
Sets the content type.- Parameters:
contentType
- the new content type
-
getTransletName
Gets the translet name.- Returns:
- the translet name
-
setTransletName
Sets the translet name.- Parameters:
transletName
- the new translet name
-
getRequestMethod
-
setRequestMethod
-
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 attribute name- Returns:
- the attribute item rule
-
addAttributeItemRule
Adds the attribute item rule.- Parameters:
itemRule
- the attribute item rule
-
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
Sets whether the default response.- Parameters:
defaultResponse
- whether the default response
-
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
-
newInstance
@NonNull public static ForwardRule newInstance(String contentType, String transletName, String method, 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
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
-