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 ResponseTypeRESPONSE_TYPE
-
Constructor Summary
Constructors Constructor Description RedirectRule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddParameterItemRule(ItemRule parameterItemRule)Adds the parameter item rule.java.lang.StringgetContentType()Gets the content type.java.lang.BooleangetDefaultResponse()Returns whether the default response.java.lang.StringgetEncoding()Gets the character encoding.java.lang.BooleangetExcludeEmptyParameters()Gets whether to exclude parameters with empty values.java.lang.BooleangetExcludeNullParameters()Gets whether to exclude parameters with null values.ItemRuleMapgetParameterItemRuleMap()Gets the parameter item rule map.java.lang.StringgetPath()Gets the redirect path.java.lang.StringgetPath(Activity activity)Gets the redirect path.Token[]getPathTokens()Gets the tokens of the redirect path.booleanisDefaultResponse()Returns whether the default response.booleanisExcludeEmptyParameters()Returns whether to exclude parameters with empty values.booleanisExcludeNullParameters()Returns whether to exclude parameters with null values.static RedirectRulenewInstance(java.lang.String path)static RedirectRulenewInstance(java.lang.String contentType, java.lang.String path, java.lang.String encoding, java.lang.Boolean excludeNullParameters, java.lang.Boolean excludeEmptyParameters, java.lang.Boolean defaultResponse)ItemRulenewParameterItemRule(java.lang.String parameterName)Adds a new parameter rule with the specified name and returns it.RedirectRulereplicate()Creates and returns a new instance after replicating a rule or Object.static RedirectRulereplicate(RedirectRule redirectRule)voidsetContentType(java.lang.String contentType)Sets the content type.voidsetDefaultResponse(java.lang.Boolean defaultResponse)Sets whether the default response.voidsetEncoding(java.lang.String encoding)Sets the character encoding.voidsetExcludeEmptyParameters(java.lang.Boolean excludeEmptyParameters)Sets whether to exclude parameters with empty values.voidsetExcludeNullParameters(java.lang.Boolean excludeNullParameters)Sets whether to exclude parameters with null values.voidsetParameterItemRuleMap(ItemRuleMap parameterItemRuleMap)Sets the attribute item rule map.voidsetParameters(java.util.Map<java.lang.String,java.lang.String> parameters)Sets the parameter map.voidsetPath(java.lang.String path)Sets the redirect path.voidsetPath(java.lang.String path, Token[] pathTokens)java.lang.StringtoString()
-
-
-
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:ReplicableCreates and returns a new instance after replicating a rule or Object.- Specified by:
replicatein interfaceReplicable<RedirectRule>- Returns:
- replicated rule or new instance of Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin 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)
-
-