Package com.aspectran.core.context.rule
Class RedirectRule
- java.lang.Object
-
- com.aspectran.core.context.rule.RedirectRule
-
- All Implemented Interfaces:
Replicable<RedirectRule>
public class RedirectRule extends java.lang.Object implements Replicable<RedirectRule>
The Class RedirectRule.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 RedirectRule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addParameterItemRule(ItemRule parameterItemRule)
Adds the parameter item rule.java.lang.String
getContentType()
Gets the content type.java.lang.Boolean
getDefaultResponse()
Returns whether the default response.java.lang.String
getEncoding()
Gets the character encoding.java.lang.Boolean
getExcludeEmptyParameters()
Gets whether to exclude parameters with empty values.java.lang.Boolean
getExcludeNullParameters()
Gets whether to exclude parameters with null values.ItemRuleMap
getParameterItemRuleMap()
Gets the parameter item rule map.java.lang.String
getPath()
Gets the redirect path.java.lang.String
getPath(Activity activity)
Gets the redirect path.Token[]
getPathTokens()
Gets the tokens of the redirect path.boolean
isDefaultResponse()
Returns whether the default response.boolean
isExcludeEmptyParameters()
Returns whether to exclude parameters with empty values.boolean
isExcludeNullParameters()
Returns whether to exclude parameters with null values.static RedirectRule
newInstance(java.lang.String path)
static RedirectRule
newInstance(java.lang.String contentType, java.lang.String path, java.lang.String encoding, java.lang.Boolean excludeNullParameters, java.lang.Boolean excludeEmptyParameters, java.lang.Boolean defaultResponse)
ItemRule
newParameterItemRule(java.lang.String parameterName)
Adds a new parameter rule with the specified name and returns it.RedirectRule
replicate()
Creates and returns a new instance after replicating a rule or Object.static RedirectRule
replicate(RedirectRule redirectRule)
void
setContentType(java.lang.String contentType)
Sets the content type.void
setDefaultResponse(java.lang.Boolean defaultResponse)
Sets whether the default response.void
setEncoding(java.lang.String encoding)
Sets the character encoding.void
setExcludeEmptyParameters(java.lang.Boolean excludeEmptyParameters)
Sets whether to exclude parameters with empty values.void
setExcludeNullParameters(java.lang.Boolean excludeNullParameters)
Sets whether to exclude parameters with null values.void
setParameterItemRuleMap(ItemRuleMap parameterItemRuleMap)
Sets the attribute item rule map.void
setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Sets the parameter map.void
setPath(java.lang.String path)
Sets the redirect path.void
setPath(java.lang.String path, Token[] pathTokens)
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
-
getPath
public java.lang.String getPath()
Gets the redirect path.- Returns:
- the redirect path
-
getPath
public java.lang.String getPath(Activity activity)
Gets the redirect path.- Parameters:
activity
- the activity- Returns:
- the redirect path
-
setPath
public void setPath(java.lang.String path)
Sets the redirect path.- Parameters:
path
- the redirect path
-
setPath
public void setPath(java.lang.String path, Token[] pathTokens)
-
getPathTokens
public Token[] getPathTokens()
Gets the tokens of the redirect path.- Returns:
- the tokens of the redirect path
-
getEncoding
public java.lang.String getEncoding()
Gets the character encoding.- Returns:
- the character encoding
-
setEncoding
public void setEncoding(java.lang.String encoding)
Sets the character encoding.- Parameters:
encoding
- the new character encoding
-
getExcludeNullParameters
public java.lang.Boolean getExcludeNullParameters()
Gets whether to exclude parameters with null values.- Returns:
- whether to exclude parameters with null values
-
isExcludeNullParameters
public boolean isExcludeNullParameters()
Returns whether to exclude parameters with null values.- Returns:
- whether to exclude parameters with null values
-
setExcludeNullParameters
public void setExcludeNullParameters(java.lang.Boolean excludeNullParameters)
Sets whether to exclude parameters with null values.- Parameters:
excludeNullParameters
- whether to exclude parameters with null values
-
getExcludeEmptyParameters
public java.lang.Boolean getExcludeEmptyParameters()
Gets whether to exclude parameters with empty values.- Returns:
- whether to exclude parameters with empty values
-
isExcludeEmptyParameters
public boolean isExcludeEmptyParameters()
Returns whether to exclude parameters with empty values.- Returns:
- whether to exclude parameters with empty values
-
setExcludeEmptyParameters
public void setExcludeEmptyParameters(java.lang.Boolean excludeEmptyParameters)
Sets whether to exclude parameters with empty values.- Parameters:
excludeEmptyParameters
- whether to exclude parameters with empty values
-
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
-
setParameters
public void setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Sets the parameter map.- Parameters:
parameters
- the parameter map
-
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 RedirectRule replicate()
Description copied from interface:Replicable
Creates and returns a new instance after replicating a rule or Object.- Specified by:
replicate
in interfaceReplicable<RedirectRule>
- Returns:
- replicated rule or new instance of Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
newInstance
public static RedirectRule newInstance(java.lang.String contentType, java.lang.String path, java.lang.String encoding, java.lang.Boolean excludeNullParameters, java.lang.Boolean excludeEmptyParameters, java.lang.Boolean defaultResponse)
-
newInstance
public static RedirectRule newInstance(java.lang.String path) throws IllegalRuleException
- Throws:
IllegalRuleException
-
replicate
public static RedirectRule replicate(RedirectRule redirectRule)
-
-