Package com.aspectran.core.context.rule
Class TransformRule
java.lang.Object
com.aspectran.core.context.rule.TransformRule
- All Implemented Interfaces:
Replicable<TransformRule>
The Class TransformRule.
Created: 2008. 03. 22 PM 5:51:58
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the content type.Returns whether the default response.Gets the character encoding.Gets the format type.Returns whether to format the content of the response to make it easier to read by adding spaces or tabs.Gets the template id.Gets the template rule.boolean
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
(FormatType formatType, String contentType, String encoding, Boolean pretty) static TransformRule
newInstance
(FormatType formatType, String contentType, String encoding, Boolean defaultResponse, Boolean pretty) static TransformRule
newInstance
(String format, String contentType, String encoding, Boolean defaultResponse, Boolean pretty) Creates and returns a new instance after replicating a rule or Object.static TransformRule
replicate
(TransformRule transformRule) void
setContentType
(String contentType) Sets the content type.void
setDefaultResponse
(Boolean defaultResponse) Sets whether the default response.void
setEncoding
(String encoding) Sets the character encoding.void
setFormatType
(FormatType formatType) Sets the format type.void
Set whether to format the content of the response to make it easier to read by adding spaces or tabs.void
setTemplateId
(String templateId) Sets the template id.void
setTemplateRule
(TemplateRule templateRule) Sets the template rule.toString()
-
Field Details
-
RESPONSE_TYPE
-
-
Constructor Details
-
TransformRule
public TransformRule()Instantiates a new TransformRule.
-
-
Method Details
-
getFormatType
Gets the format type.- Returns:
- the format type
-
setFormatType
Sets the format type.- Parameters:
formatType
- the format type to set
-
getContentType
Gets the content type.- Returns:
- the content type
-
setContentType
Sets the content type.- Parameters:
contentType
- the new content type
-
getEncoding
Gets the character encoding.- Returns:
- the character encoding
-
setEncoding
Sets the character encoding.- Parameters:
encoding
- the character encoding to set
-
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
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
Gets the template id.- Returns:
- the template id
-
setTemplateId
Sets the template id.- Parameters:
templateId
- the template id
-
getTemplateRule
Gets the template rule.- Returns:
- the template rule
-
setTemplateRule
Sets the template rule.- Parameters:
templateRule
- the template rule
-
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
Sets whether the default response.- Parameters:
defaultResponse
- whether the default response
-
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
-
newInstance
-
newInstance
@NonNull public static TransformRule newInstance(FormatType formatType, String contentType, String encoding, Boolean pretty) -
newInstance
@NonNull public static TransformRule newInstance(FormatType formatType, String contentType, String encoding, Boolean defaultResponse, Boolean pretty) -
replicate
-