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 ResponseTypeRESPONSE_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.StringgetContentType()Gets the content type.java.lang.BooleangetDefaultResponse()Returns whether the default response.java.lang.StringgetEncoding()Gets the character encoding.FormatTypegetFormatType()Gets the format type.java.lang.BooleangetPretty()Returns whether to format the content of the response to make it easier to read by adding spaces or tabs.java.lang.StringgetTemplateId()Gets the template id.TemplateRulegetTemplateRule()Gets the template rule.booleanisDefaultResponse()Returns whether the default response.booleanisPretty()Returns whether to format the content of the response to make it easier to read by adding spaces or tabs.static TransformRulenewInstance(FormatType formatType, java.lang.String contentType, java.lang.String encoding, java.lang.Boolean pretty)static TransformRulenewInstance(FormatType formatType, java.lang.String contentType, java.lang.String encoding, java.lang.Boolean defaultResponse, java.lang.Boolean pretty)static TransformRulenewInstance(java.lang.String format, java.lang.String contentType, java.lang.String encoding, java.lang.Boolean defaultResponse, java.lang.Boolean pretty)TransformRulereplicate()Creates and returns a new instance after replicating a rule or Object.static TransformRulereplicate(TransformRule transformRule)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.voidsetFormatType(FormatType formatType)Sets the format type.voidsetPretty(java.lang.Boolean pretty)Set whether to format the content of the response to make it easier to read by adding spaces or tabs.voidsetTemplateId(java.lang.String templateId)Sets the template id.voidsetTemplateRule(TemplateRule templateRule)Sets the template rule.java.lang.StringtoString()
-
-
-
Field Detail
-
RESPONSE_TYPE
public static final ResponseType RESPONSE_TYPE
-
-
Method Detail
-
getFormatType
public FormatType getFormatType()
Gets the format type.- Returns:
- the format type
-
setFormatType
public void setFormatType(FormatType formatType)
Sets the format type.- Parameters:
formatType- the format type 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:ReplicableCreates and returns a new instance after replicating a rule or Object.- Specified by:
replicatein interfaceReplicable<TransformRule>- Returns:
- replicated rule or new instance of Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
newInstance
public static TransformRule newInstance(java.lang.String format, java.lang.String contentType, java.lang.String encoding, java.lang.Boolean defaultResponse, java.lang.Boolean pretty)
-
newInstance
public static TransformRule newInstance(FormatType formatType, java.lang.String contentType, java.lang.String encoding, java.lang.Boolean pretty)
-
newInstance
public static TransformRule newInstance(FormatType formatType, java.lang.String contentType, java.lang.String encoding, java.lang.Boolean defaultResponse, java.lang.Boolean pretty)
-
replicate
public static TransformRule replicate(TransformRule transformRule)
-
-