Class ResponseTemplate

java.lang.Object
org.deltava.beans.help.ResponseTemplate
All Implemented Interfaces:
Serializable, Comparable<ResponseTemplate>, Cacheable

public class ResponseTemplate extends Object implements Cacheable, Comparable<ResponseTemplate>
A bean to store Help Desk response templates.
Since:
3.2
Version:
7.0
Author:
Luke
See Also:
  • Constructor Details

    • ResponseTemplate

      public ResponseTemplate()
  • Method Details

    • getTitle

      public String getTitle()
      Returns the template title.
      Returns:
      the title
    • getBody

      public String getBody()
      Returns the response body.
      Returns:
      the body
    • setTitle

      public void setTitle(String title)
      Updates the template title.
      Parameters:
      title - the title
      Throws:
      NullPointerException - if title is null
    • setBody

      public void setBody(String body)
      Updates the response body.
      Parameters:
      body - the body
    • cacheKey

      public Object cacheKey()
      Description copied from interface: Cacheable
      Returns the cache key for this object. Caches call this method when adding the object.
      Specified by:
      cacheKey in interface Cacheable
      Returns:
      the cache key for the object
    • toString

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(ResponseTemplate rt2)
      Compares two templates by comparing their titles.
      Specified by:
      compareTo in interface Comparable<ResponseTemplate>