Package org.silverpeas.components.infoletter.model

## Class InfoLetter

- java.lang.Object
- - org.silverpeas.core.persistence.jdbc.bean.SilverpeasBean
  - - org.silverpeas.components.infoletter.model.InfoLetter

- All Implemented Interfaces:
    `Serializable`, `Comparable<InfoLetter>`, `org.silverpeas.core.persistence.jdbc.bean.SilverpeasEntityBean`

      public class InfoLetter
      extends org.silverpeas.core.persistence.jdbc.bean.SilverpeasBean
      implements Comparable<InfoLetter>

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static String` | `TEMPLATE_ID` |
    `static String` | `TYPE` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `InfoLetter()` | Default constructor
    `InfoLetter​(org.silverpeas.core.WAPrimaryKey pk, String instanceId, String name, String description, String periode)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `compareTo​(InfoLetter obj)` |
    `boolean` | `equals​(Object o)` |
    `boolean` | `existsTemplateContent()` |
    `String` | `getDescription()` |
    `org.silverpeas.core.contribution.model.ContributionIdentifier` | `getId()` |
    `String` | `getInstanceId()` |
    `String` | `getName()` |
    `String` | `getPeriode()` |
    `protected String` | `getTableName()` |
    `org.silverpeas.core.contribution.model.ContributionIdentifier` | `getTemplateIdentifier()` |
    `Optional<org.silverpeas.core.contribution.model.WysiwygContent>` | `getTemplateWysiwygContent()` |
    `int` | `hashCode()` |
    `void` | `saveTemplateContent​(String manualContent)` | Saves given content.
    `void` | `setDescription​(String description)` |
    `void` | `setInstanceId​(String instanceId)` |
    `void` | `setName​(String n)` |
    `void` | `setPeriode​(String periode)` |

    - ### Methods inherited from class org.silverpeas.core.persistence.jdbc.bean.SilverpeasBean

      `getNonNullString, getPK, setPK`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### TYPE

          public static final String TYPE

      See Also:
        Constant Field Values

    - #### TEMPLATE_ID

          public static final String TEMPLATE_ID

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### InfoLetter

          public InfoLetter()

      Default constructor

    - #### InfoLetter

          public InfoLetter​(org.silverpeas.core.WAPrimaryKey pk,
                            String instanceId,
                            String name,
                            String description,
                            String periode)

      Parameters:
        `pk` - the info letter identifier
        `name` - the name
        `instanceId` - the component instance identifier
        `description` - the description
        `periode` - the frequency

  - ### Method Detail

    - #### getId

          public org.silverpeas.core.contribution.model.ContributionIdentifier getId()

    - #### getInstanceId

          public String getInstanceId()

    - #### setInstanceId

          public void setInstanceId​(String instanceId)

    - #### getName

          public String getName()

    - #### setName

          public void setName​(String n)

    - #### getDescription

          public String getDescription()

    - #### setDescription

          public void setDescription​(String description)

    - #### getPeriode

          public String getPeriode()

    - #### setPeriode

          public void setPeriode​(String periode)

    - #### compareTo

          public int compareTo​(@NonNull
                               InfoLetter obj)

      Specified by:
        `compareTo` in interface `Comparable<InfoLetter>`

    - #### equals

          public boolean equals​(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getTableName

          @NonNull
          protected String getTableName()

      Specified by:
        `getTableName` in class `org.silverpeas.core.persistence.jdbc.bean.SilverpeasBean`

    - #### existsTemplateContent

          public boolean existsTemplateContent()

    - #### getTemplateWysiwygContent

          public Optional<org.silverpeas.core.contribution.model.WysiwygContent> getTemplateWysiwygContent()

    - #### saveTemplateContent

          public void saveTemplateContent​(String manualContent)

      Saves given content.

      The given content MAY be directly a WYSIWYG content, in a such case the content has been edited by a WYSIWYG editor.

      The given content is not defined, in a such case the content has been MAYBE edited by a Drag And Drop Web Editor. Then the temporary content is saved into final one and the Inlined HTML is saved into WYSIWYG repository.

      Parameters:
        `manualContent` - a manual content. The content is specified when it comes directly from a WYSIWYG editing.

    - #### getTemplateIdentifier

          public org.silverpeas.core.contribution.model.ContributionIdentifier getTemplateIdentifier()