Class ArchivedPublication

java.lang.Object
com.jalios.jcms.archive.ArchivedPublication
All Implemented Interfaces:
DBData, JcmsConstants, JaliosConstants, Serializable, Comparable<ArchivedPublication>

@Deprecated(since="11.0 / JCMS-8887", forRemoval=true) public class ArchivedPublication extends Object implements Comparable<ArchivedPublication>, DBData, JcmsConstants
Deprecated, for removal: This API element is subject to removal in a future version.
This class represents an archived Publication in memory, used to keep track of authors, rights, category, workspace of archived publication
Since:
jcms-4.1.1
Author:
Olivier Jaquemet
See Also:
  • Field Details

    • TYPE_CONTENT

      public static final short TYPE_CONTENT
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • TYPE_FORM

      public static final short TYPE_FORM
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • rowId

      protected Long rowId
      Deprecated, for removal: This API element is subject to removal in a future version.
    • cdate

      protected Date cdate
      Deprecated, for removal: This API element is subject to removal in a future version.
    • workspace

      protected Workspace workspace
      Deprecated, for removal: This API element is subject to removal in a future version.
    • author

      protected Member author
      Deprecated, for removal: This API element is subject to removal in a future version.
    • mainLanguage

      protected String mainLanguage
      Deprecated, for removal: This API element is subject to removal in a future version.
    • title

      protected String title
      Deprecated, for removal: This API element is subject to removal in a future version.
    • titleML

      protected HashMap<String,String> titleML
      Deprecated, for removal: This API element is subject to removal in a future version.
    • description

      protected String description
      Deprecated, for removal: This API element is subject to removal in a future version.
    • descriptionML

      protected HashMap<String,String> descriptionML
      Deprecated, for removal: This API element is subject to removal in a future version.
    • originalId

      protected String originalId
      Deprecated, for removal: This API element is subject to removal in a future version.
    • originalType

      protected short originalType
      Deprecated, for removal: This API element is subject to removal in a future version.
    • originalTypeLabel

      protected String originalTypeLabel
      Deprecated, for removal: This API element is subject to removal in a future version.
    • authorizedMemberSet

      protected TreeSet<Member> authorizedMemberSet
      Deprecated, for removal: This API element is subject to removal in a future version.
    • authorizedGroupSet

      protected TreeSet<Group> authorizedGroupSet
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Constructor Details

    • ArchivedPublication

      public ArchivedPublication()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • ArchivedPublication

      public ArchivedPublication(Publication pub)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a new ArchivedPublication from a publication.

      Should only be called by the ArchiveManager which performs the whole archiving process.

      Parameters:
      pub - the Publication from which we create this Archive
      Since:
      jcms-4.1.1
  • Method Details

    • save

      public void save()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates or updates this archive in the DB.
    • delete

      public void delete()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Delete this archive (from the DB and all associated files on disk).
    • canBeReadBy

      public boolean canBeReadBy(Member member)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Check if this archive can be ready by specified member.
      Parameters:
      member - the member to check (can be null)
      Returns:
      true is Member can read archive, false otherwise
    • canBeUpdatedBy

      public boolean canBeUpdatedBy(Member member)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Check if this archive can be updated by specified member.
      Parameters:
      member - the member to check (can be null)
      Returns:
      true is Member can delete archive, false otherwise
    • canBeDeletedBy

      public boolean canBeDeletedBy(Member member)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Check if this archive can be deleted by specified member.
      Parameters:
      member - the member to check (can be null)
      Returns:
      true is Member can delete archive, false otherwise
    • getSavedHtmlPath

      public String getSavedHtmlPath(String userLang)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return the path (webapp relative, for jsp inclusion) of the file in which the original publication was saved
      Parameters:
      userLang - the lang in which the Publication is wanted, if available
      Returns:
      the path of the html file were the Publication was saved, or null if no file was found
      Since:
      jcms-4.1.1
    • getSavedXmlPath

      public String getSavedXmlPath()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return the path (webapp relative) of the XML file in which the original publication's data was saved
      Returns:
      the path of the XML file were the Publication was saved
      Since:
      jcms-4.1.1
    • getAssociatedFilesMap

      public HashMap<String,String> getAssociatedFilesMap()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieve files associated with the given archive.
      Returns:
      an hashmap, filename ==> filepath (webapp relative)
    • setRowId

      public void setRowId(Long rowId)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      setRowId in interface DBData
    • getRowId

      public Long getRowId()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getRowId in interface DBData
    • getCdate

      public Date getCdate()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the archive creation date.
      Returns:
      a date.
    • setCdate

      public void setCdate(Date cdate)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the creation date of this ArchivedPublication.
      Parameters:
      cdate - Value to assign to cdate.
    • getWorkspace

      public Workspace getWorkspace()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setWorkspace

      public void setWorkspace(Workspace workspace)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getWorkspaceId

      public String getWorkspaceId()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setWorkspaceId

      public void setWorkspaceId(String workspaceId)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getAuthor

      public Member getAuthor()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the author of this Archive.
      Returns:
      the Member author of this archive.
      Since:
      jcms-6.0
    • setAuthor

      public void setAuthor(Member mbr)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the author of this Archive.
      Parameters:
      mbr - Value to assign to author.
      Since:
      jcms-6.0
    • getAuthorId

      public String getAuthorId()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the JStore ID of the author
      Returns:
      the JStore ID of the author
      Since:
      jcms-6.0
    • setAuthorId

      public void setAuthorId(String authordId)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the JStore ID of the author
      Parameters:
      authordId - the JStore author id
      Since:
      jcms-6.0
    • getMainLanguage

      public String getMainLanguage()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the value of main language.
      Returns:
      Value of main language.
    • setMainLanguage

      public void setMainLanguage(String v)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the value of main language.
      Parameters:
      v - Value to assign to main language.
    • getTitle

      public String getTitle(String lang)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the value of title bound to the given language.
      Parameters:
      lang - the language to get the title
      Returns:
      title in the given language.
      Since:
      jcms-6.0
    • getTitle

      public String getTitle(String lang, boolean useDefault)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the value of title bound to the given language.
      Parameters:
      lang - the language to get the title
      useDefault - should main language used as default language if title does not exist in the given language
      Returns:
      title in the given language.
      Since:
      jcms-6.0
    • getTitle

      public String getTitle()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieve the title of this publication in the main site language.
      Returns:
      Value of title.
      Since:
      jcms-6.0
    • setTitle

      public void setTitle(String v)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the title of this publication in the main site language.
      Parameters:
      v - value to assign to title.
      Since:
      jcms-6.0
    • getTitleML

      public HashMap<String,String> getTitleML()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieve the HashMap containing the titles of this publication in language other than the main site language.
      Returns:
      an HashMap of String.
      Since:
      jcms-6.0
    • setTitleML

      public void setTitleML(HashMap<String,String> v)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the HashMap containing the titles of this publication in language other than the main site language.
      Parameters:
      v - an HashMap of String.
      Since:
      jcms-6.0
    • getTitleXml

      public String getTitleXml()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieves an xml serialization of the titles of this Publication in all the languages.
      Returns:
      a valid XML document, as returned by JcmsUtil.convertMultilingualFieldToXml(String, Map)
      Since:
      jcms-6.0
    • setTitleXml

      public void setTitleXml(String xml)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the titles of this Publication in all the languages using the specified XML string.
      Parameters:
      xml - an xml string as returned by getTitleXml()
      Since:
      jcms-6.0
    • getDescription

      public String getDescription()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setDescription

      public void setDescription(String value)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getDescription

      public String getDescription(String lang)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getDescription

      public String getDescription(String lang, boolean useDefault)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getDescriptionML

      public HashMap<String,String> getDescriptionML()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setDescriptionML

      public void setDescriptionML(HashMap<String,String> map)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getDescriptionXml

      public String getDescriptionXml()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Retrieves an xml serialization of the descriptions of this Publication in all the languages.
      Returns:
      a valid XML document, as returned by JcmsUtil.convertMultilingualFieldToXml(String, Map)
      Since:
      jcms-6.0
    • setDescriptionXml

      public void setDescriptionXml(String xml)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the descriptions of this Publication in all the languages using the specified XML string.
      Parameters:
      xml - an xml string as returned by getDescriptionXml()
      Since:
      jcms-6.0
    • getAuthorizedMemberSet

      public Set<Member> getAuthorizedMemberSet()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the set of Member authorized to read this archive.
      Returns:
      a set of Member.
      Since:
      jcms-6.0
    • setAuthorizedMemberSet

      public void setAuthorizedMemberSet(TreeSet<Member> memberSet)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the set of Member authorized to read this archive.
      Parameters:
      memberSet - a set of Member.
      Since:
      jcms-6.0
    • getAuthorizedMemberIds

      public String getAuthorizedMemberIds()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setAuthorizedMemberIds

      public void setAuthorizedMemberIds(String authorizedMemberIds)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getAuthorizedGroupSet

      public Set<Group> getAuthorizedGroupSet()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the set of Group authorized to read this archive.
      Returns:
      a set of Group.
      Since:
      jcms-6.0
    • setAuthorizedGroupSet

      public void setAuthorizedGroupSet(TreeSet<Group> groupSet)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set the set of Group authorized to read this archive.
      Parameters:
      groupSet - a set of Group.
      Since:
      jcms-6.0
    • getAuthorizedGroupIds

      public String getAuthorizedGroupIds()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setAuthorizedGroupIds

      public void setAuthorizedGroupIds(String authorizedGroupIds)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • hasAnyReadRights

      public boolean hasAnyReadRights()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Tests if this archive has member or group read rights.
      Returns:
      true if there are member or group read rights.
      Since:
      jcms-6.0
    • getReadRightsString

      public String getReadRightsString(int max)
      Deprecated, for removal: This API element is subject to removal in a future version.
      This convenient method returns a String displaying group/member read rights (eg if this publication is restricted to g1, g2, m1, m2 and m3, getReadRightsString(3) will return "g1, g2, m1, ...")
      Parameters:
      max - how many group/member to display
      Returns:
      a String
      Since:
      jcms-6.0
    • getOriginalId

      public String getOriginalId()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setOriginalId

      public void setOriginalId(String originalId)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getOriginalType

      public short getOriginalType()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setOriginalType

      public void setOriginalType(short originalType)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getOriginalTypeLabel

      public String getOriginalTypeLabel()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setOriginalTypeLabel

      public void setOriginalTypeLabel(String originalTypeLabel)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • compareTo

      public int compareTo(ArchivedPublication other)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      compareTo in interface Comparable<ArchivedPublication>