Package com.aspectran.core.context.rule
Class TransletRule
java.lang.Object
com.aspectran.core.context.rule.TransletRule
- All Implemented Interfaces:
ActionRuleApplicable
,Replicable<TransletRule>
,ResponseRuleApplicable
public class TransletRule
extends Object
implements ActionRuleApplicable, ResponseRuleApplicable, Replicable<TransletRule>
The Class TransletRule.
Created: 2008. 03. 22 PM 5:48:09
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addResponseRule
(ResponseRule responseRule) void
applyActionRule
(Executable action) Adds an executable action instance.applyActionRule
(AnnotatedActionRule annotatedActionRule) Adds the annotated method action rule.applyActionRule
(ChooseRule chooseRule) Adds a list of action instances that can be executed.applyActionRule
(EchoActionRule echoActionRule) Adds the echo action rule.applyActionRule
(HeaderActionRule headerActionRule) Adds the header action rule.applyActionRule
(IncludeActionRule includeActionRule) Adds the include action rule.applyActionRule
(InvokeActionRule invokeActionRule) Adds the invoke action rule.applyResponseRule
(DispatchRule dispatchRule) Apply the dispatch rule to the response rule.applyResponseRule
(ForwardRule forwardRule) Apply the forward rule to the response rule.applyResponseRule
(RedirectRule redirectRule) Apply the redirect rule to the response rule.applyResponseRule
(TransformRule transformRule) Apply the transform rule to the response rule.void
Returns the array of methods allowed on the requested resource.Gets the content list.Gets the filter parameters.Gets the mask pattern.getName()
Gets the translet name.Gets the name pattern.Token[]
Gets the name tokens.Gets the request rule.Gets the response rule.Gets the scan path.boolean
Returns whether the translet name has tokens for extracting parameters or attributes.boolean
isAsync()
static TransletRule
newInstance
(String name, MethodType[] allowedMethods, Boolean async, Long timeout) static TransletRule
newInstance
(String name, String scanPath, String maskPattern, MethodType[] allowedMethods, Boolean async, String timeout) static TransletRule
newInstance
(String name, String scanPath, String maskPattern, String method, Boolean async, Long timeout) static TransletRule
newInstance
(String name, String scanPath, String maskPattern, String method, Boolean async, String timeout) Creates and returns a new instance after replicating a rule or Object.static TransletRule
replicate
(TransletRule transletRule) static TransletRule
replicate
(TransletRule transletRule, String newDispatchName) void
setAllowedMethods
(MethodType[] allowedMethods) Sets the array of methods allowed on the requested resource.void
setAspectAdviceRuleRegistry
(AspectAdviceRuleRegistry aspectAdviceRuleRegistry) void
void
setContentList
(ContentList contentList) Sets the content list.void
setDescriptionRule
(DescriptionRule descriptionRule) void
setExceptionRule
(ExceptionRule exceptionRule) void
setFilterParameters
(FilterParameters filterParameters) Sets the filter parameters.void
setMaskPattern
(String maskPattern) Sets the mask pattern.void
Sets the name.void
setNamePattern
(WildcardPattern namePattern) Sets the name pattern.void
setNameTokens
(Token[] nameTokens) Sets the name tokens.void
setRequestRule
(RequestRule requestRule) Sets the request rule.void
setResponseRule
(ResponseRule responseRule) Sets the response rule.void
setResponseRuleList
(List<ResponseRule> responseRuleList) void
setScanPath
(String scanPath) Sets the scan path.void
setTimeout
(Long timeout) toString()
touchRequestRule
(boolean explicit)
-
Constructor Details
-
TransletRule
public TransletRule()Instantiates a new TransletRule.
-
-
Method Details
-
getName
Gets the translet name.- Returns:
- the translet name
-
setName
Sets the name.- Parameters:
name
- the new name
-
getAllowedMethods
Returns the array of methods allowed on the requested resource.- Returns:
- the allowed methods
-
setAllowedMethods
Sets the array of methods allowed on the requested resource.- Parameters:
allowedMethods
- the allowed methods
-
getNamePattern
Gets the name pattern.- Returns:
- the name pattern
-
setNamePattern
Sets the name pattern.- Parameters:
namePattern
- the new name pattern
-
getNameTokens
Gets the name tokens.- Returns:
- the name tokens
-
setNameTokens
Sets the name tokens.- Parameters:
nameTokens
- the new name tokens
-
getScanPath
Gets the scan path.- Returns:
- the scan path
-
setScanPath
Sets the scan path.- Parameters:
scanPath
- the new scan path
-
getMaskPattern
Gets the mask pattern.- Returns:
- the mask pattern
-
setMaskPattern
Sets the mask pattern.- Parameters:
maskPattern
- the new mask pattern
-
getFilterParameters
Gets the filter parameters.- Returns:
- the filter parameters
-
setFilterParameters
Sets the filter parameters.- Parameters:
filterParameters
- the new filter parameters
-
isAsync
public boolean isAsync() -
setAsync
-
getTimeout
-
setTimeout
-
getRequestRule
Gets the request rule.- Returns:
- the request rule
-
setRequestRule
Sets the request rule.- Parameters:
requestRule
- the new request rule
-
touchRequestRule
-
getContentList
Gets the content list.- Returns:
- the content list
-
setContentList
Sets the content list.- Parameters:
contentList
- the new content list
-
hasPathVariables
public boolean hasPathVariables()Returns whether the translet name has tokens for extracting parameters or attributes.- Returns:
- true if the translet name has tokens for extracting parameters or attributes
-
applyActionRule
Description copied from interface:ActionRuleApplicable
Adds the header action rule.- Specified by:
applyActionRule
in interfaceActionRuleApplicable
- Parameters:
headerActionRule
- the header action rule- Returns:
- an instance of the executable action
-
applyActionRule
Description copied from interface:ActionRuleApplicable
Adds the echo action rule.- Specified by:
applyActionRule
in interfaceActionRuleApplicable
- Parameters:
echoActionRule
- the echo action rule- Returns:
- an instance of the executable action
-
applyActionRule
Description copied from interface:ActionRuleApplicable
Adds the invoke action rule.- Specified by:
applyActionRule
in interfaceActionRuleApplicable
- Parameters:
invokeActionRule
- the invoke action rule- Returns:
- an instance of the executable action
-
applyActionRule
Description copied from interface:ActionRuleApplicable
Adds the annotated method action rule.- Specified by:
applyActionRule
in interfaceActionRuleApplicable
- Parameters:
annotatedActionRule
- the annotated method action rule- Returns:
- an instance of the executable action
-
applyActionRule
Description copied from interface:ActionRuleApplicable
Adds the include action rule.- Specified by:
applyActionRule
in interfaceActionRuleApplicable
- Parameters:
includeActionRule
- the include action rule- Returns:
- an instance of the executable action
-
applyActionRule
Description copied from interface:ActionRuleApplicable
Adds a list of action instances that can be executed.- Specified by:
applyActionRule
in interfaceActionRuleApplicable
- Parameters:
chooseRule
- the choose rule- Returns:
- an instance of the executable action
-
applyActionRule
Description copied from interface:ActionRuleApplicable
Adds an executable action instance.- Specified by:
applyActionRule
in interfaceActionRuleApplicable
- Parameters:
action
- an executable action instance
-
getResponseRule
Gets the response rule.- Returns:
- the response rule
-
setResponseRule
Sets the response rule.- Parameters:
responseRule
- the new response rule
-
getResponseRuleList
-
setResponseRuleList
-
addResponseRule
-
applyResponseRule
Description copied from interface:ResponseRuleApplicable
Apply the transform rule to the response rule.- Specified by:
applyResponseRule
in interfaceResponseRuleApplicable
- Parameters:
transformRule
- the transform rule- Returns:
- the response
-
applyResponseRule
Description copied from interface:ResponseRuleApplicable
Apply the dispatch rule to the response rule.- Specified by:
applyResponseRule
in interfaceResponseRuleApplicable
- Parameters:
dispatchRule
- the dispatch rule- Returns:
- the response
-
applyResponseRule
Description copied from interface:ResponseRuleApplicable
Apply the forward rule to the response rule.- Specified by:
applyResponseRule
in interfaceResponseRuleApplicable
- Parameters:
forwardRule
- the forward rule- Returns:
- the response
-
applyResponseRule
Description copied from interface:ResponseRuleApplicable
Apply the redirect rule to the response rule.- Specified by:
applyResponseRule
in interfaceResponseRuleApplicable
- Parameters:
redirectRule
- the redirect rule- Returns:
- the response
-
determineResponseRule
public void determineResponseRule() -
getExceptionRule
-
setExceptionRule
-
getAspectAdviceRuleRegistry
-
setAspectAdviceRuleRegistry
-
touchAspectAdviceRuleRegistry
-
replicateAspectAdviceRuleRegistry
-
getDescriptionRule
-
setDescriptionRule
-
replicate
Description copied from interface:Replicable
Creates and returns a new instance after replicating a rule or Object.- Specified by:
replicate
in interfaceReplicable<TransletRule>
- Returns:
- replicated rule or new instance of Object
-
toString
-
newInstance
@NonNull public static TransletRule newInstance(String name, String scanPath, String maskPattern, String method, Boolean async, String timeout) throws IllegalRuleException - Throws:
IllegalRuleException
-
newInstance
@NonNull public static TransletRule newInstance(String name, String scanPath, String maskPattern, String method, Boolean async, Long timeout) throws IllegalRuleException - Throws:
IllegalRuleException
-
newInstance
@NonNull public static TransletRule newInstance(String name, String scanPath, String maskPattern, MethodType[] allowedMethods, Boolean async, String timeout) throws IllegalRuleException - Throws:
IllegalRuleException
-
newInstance
@NonNull public static TransletRule newInstance(String name, MethodType[] allowedMethods, Boolean async, Long timeout) throws IllegalRuleException - Throws:
IllegalRuleException
-
replicate
-
replicate
@NonNull public static TransletRule replicate(@NonNull TransletRule transletRule, String newDispatchName)
-