Package com.aspectran.core.context.rule
Class TransformRule
- java.lang.Object
-
- com.aspectran.core.context.rule.TransformRule
-
- All Implemented Interfaces:
Replicable<TransformRule>
public class TransformRule extends java.lang.Object implements Replicable<TransformRule>
The Class TransformRule.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 TransformRule()
Instantiates a new TransformRule.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
getPretty()
Returns whether to format the content of the response to make it easier to read by adding spaces or tabs.java.lang.String
getTemplateId()
Gets the template id.TemplateRule
getTemplateRule()
Gets the template rule.TransformType
getTransformType()
Gets the transform type.boolean
isDefaultResponse()
Returns whether the default response.boolean
isPretty()
Returns whether to format the content of the response to make it easier to read by adding spaces or tabs.static TransformRule
newInstance(TransformType transformType, java.lang.String contentType, java.lang.String encoding, java.lang.Boolean pretty)
static TransformRule
newInstance(TransformType transformType, java.lang.String contentType, java.lang.String encoding, java.lang.Boolean defaultResponse, java.lang.Boolean pretty)
static TransformRule
newInstance(java.lang.String type, java.lang.String contentType, java.lang.String encoding, java.lang.Boolean defaultResponse, java.lang.Boolean pretty)
TransformRule
replicate()
Creates and returns a new instance after replicating a rule or Object.static TransformRule
replicate(TransformRule transformRule)
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
setPretty(java.lang.Boolean pretty)
Set whether to format the content of the response to make it easier to read by adding spaces or tabs.void
setTemplateId(java.lang.String templateId)
Sets the template id.void
setTemplateRule(TemplateRule templateRule)
Sets the template rule.void
setTransformType(TransformType transformType)
Sets the transform type.java.lang.String
toString()
-
-
-
Field Detail
-
RESPONSE_TYPE
public static final ResponseType RESPONSE_TYPE
-
-
Method Detail
-
getTransformType
public TransformType getTransformType()
Gets the transform type.- Returns:
- the transform type
-
setTransformType
public void setTransformType(TransformType transformType)
Sets the transform type.- Parameters:
transformType
- the transformType to set
-
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
-
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 character encoding to set
-
getPretty
public java.lang.Boolean getPretty()
Returns whether to format the content of the response to make it easier to read by adding spaces or tabs.- Returns:
- true, if the content of the response should be formatted to make it easier to read
-
isPretty
public boolean isPretty()
Returns whether to format the content of the response to make it easier to read by adding spaces or tabs.- Returns:
- true, if the content of the response should be formatted to make it easier to read
-
setPretty
public void setPretty(java.lang.Boolean pretty)
Set whether to format the content of the response to make it easier to read by adding spaces or tabs.- Parameters:
pretty
- if true, format the content of the response by adding spaces or tabs
-
getTemplateId
public java.lang.String getTemplateId()
Gets the template id.- Returns:
- the template id
-
setTemplateId
public void setTemplateId(java.lang.String templateId)
Sets the template id.- Parameters:
templateId
- the template id
-
getTemplateRule
public TemplateRule getTemplateRule()
Gets the template rule.- Returns:
- the template rule
-
setTemplateRule
public void setTemplateRule(TemplateRule templateRule)
Sets the template rule.- Parameters:
templateRule
- the template 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 TransformRule replicate()
Description copied from interface:Replicable
Creates and returns a new instance after replicating a rule or Object.- Specified by:
replicate
in interfaceReplicable<TransformRule>
- Returns:
- replicated rule or new instance of Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
newInstance
public static TransformRule newInstance(java.lang.String type, java.lang.String contentType, java.lang.String encoding, java.lang.Boolean defaultResponse, java.lang.Boolean pretty)
-
newInstance
public static TransformRule newInstance(TransformType transformType, java.lang.String contentType, java.lang.String encoding, java.lang.Boolean pretty)
-
newInstance
public static TransformRule newInstance(TransformType transformType, java.lang.String contentType, java.lang.String encoding, java.lang.Boolean defaultResponse, java.lang.Boolean pretty)
-
replicate
public static TransformRule replicate(TransformRule transformRule)
-
-