Class TransformRule

java.lang.Object
com.aspectran.core.context.rule.TransformRule
All Implemented Interfaces:
Replicable<TransformRule>

public class TransformRule extends Object implements Replicable<TransformRule>
The Class TransformRule.

Created: 2008. 03. 22 PM 5:51:58

  • Field Details

    • RESPONSE_TYPE

      public static final ResponseType RESPONSE_TYPE
  • Constructor Details

    • TransformRule

      public TransformRule()
      Instantiates a new TransformRule.
  • Method Details

    • 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 String getContentType()
      Gets the content type.
      Returns:
      the content type
    • setContentType

      public void setContentType(String contentType)
      Sets the content type.
      Parameters:
      contentType - the new content type
    • getEncoding

      public String getEncoding()
      Gets the character encoding.
      Returns:
      the character encoding
    • setEncoding

      public void setEncoding(String encoding)
      Sets the character encoding.
      Parameters:
      encoding - the character encoding to set
    • getPretty

      public 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(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 String getTemplateId()
      Gets the template id.
      Returns:
      the template id
    • setTemplateId

      public void setTemplateId(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 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(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 interface Replicable<TransformRule>
      Returns:
      replicated rule or new instance of Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • newInstance

      @NonNull public static TransformRule newInstance(String format, String contentType, String encoding, Boolean defaultResponse, Boolean pretty)
    • 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

      @NonNull public static TransformRule replicate(@NonNull TransformRule transformRule)