Class InfoLetterPublication

java.lang.Object
org.silverpeas.core.persistence.jdbc.bean.SilverpeasBean
org.silverpeas.components.infoletter.model.InfoLetterPublication
All Implemented Interfaces:
Serializable, Comparable<InfoLetter>, org.silverpeas.core.contribution.model.WithPermanentLink, org.silverpeas.core.persistence.jdbc.bean.SilverpeasEntityBean
Direct Known Subclasses:
InfoLetterPublicationPdC

public class InfoLetterPublication extends org.silverpeas.core.persistence.jdbc.bean.SilverpeasBean implements org.silverpeas.core.contribution.model.WithPermanentLink, Comparable<InfoLetter>
Author:
frageade
See Also:
  • Field Details

  • Constructor Details

    • InfoLetterPublication

      public InfoLetterPublication()
      Default constructor
    • InfoLetterPublication

      public InfoLetterPublication(org.silverpeas.core.ResourceReference pk, String title, String description, String parutionDate, int publicationState, int letterId)
  • Method Details

    • getIdentifier

      public org.silverpeas.core.contribution.model.ContributionIdentifier getIdentifier()
    • getInstanceId

      public String getInstanceId()
    • setInstanceId

      public void setInstanceId(String instanceId)
    • getTitle

      public String getTitle()
    • setTitle

      public void setTitle(String title)
    • getDescription

      public String getDescription()
    • setDescription

      public void setDescription(String description)
    • getParutionDate

      public String getParutionDate()
    • setParutionDate

      public void setParutionDate(String parutionDate)
    • getPublicationState

      public int getPublicationState()
    • setPublicationState

      public void setPublicationState(int publicationState)
    • getLetterId

      public int getLetterId()
    • setLetterId

      public void setLetterId(int letterId)
    • setLetterId

      public void setLetterId(String letterId)
    • getPermalink

      public String getPermalink()
      Specified by:
      getPermalink in interface org.silverpeas.core.contribution.model.WithPermanentLink
    • 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
    • isValid

      public boolean isValid()
    • initFrom

      public void initFrom(InfoLetter infoLetter)
      Initializing the content from the given template.

      The initialization is using WYSIWYG services and InfoLetterPublication storing in order to handle properly document copying.

      Parameters:
      infoLetter - the template.
    • getWysiwygContent

      public Optional<org.silverpeas.core.contribution.model.WysiwygContent> getWysiwygContent()
    • saveContent

      public void saveContent(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.
    • deleteContent

      public void deleteContent()
      Deletes contents linked to the publication (WYSIWYG and DDWE ones).