Class PublicLink

All Implemented Interfaces:
DBData, JcmsConstants, ImportConstants, MashupConstants, Storable, JaliosConstants, LangPropertyArgument, Serializable, Cloneable, Comparable<BasicStorable>

public class PublicLink extends Data implements DBData
See Also:
  • Field Details

  • Constructor Details

    • PublicLink

      public PublicLink()
    • PublicLink

      public PublicLink(PublicLink other)
  • Method Details

    • hasAccessCode

      public boolean hasAccessCode()
      Returns:
      true if this public link requires an access code.
      Since:
      jcms-10.0.5
    • getAccessUrl

      public String getAccessUrl()
      Returns:
      the access URL for this public link
      Since:
      jcms-10.0.5
    • getDownloadCount

      public int getDownloadCount()
      Returns:
      the count of PublicDownload for this PublicLink
      Since:
      jcms-10.0.5
    • getDownloadList

      public List<PublicDownload> getDownloadList()
      Returns:
      the list of all PublicDownload for this PublicLink
      Since:
      jcms-10.0.5
    • getExpiryDateAsString

      public String getExpiryDateAsString(Locale locale)
    • checkAccessCode

      public boolean checkAccessCode(String code)
      Parameters:
      code - the code to check
      Returns:
      true if the given code is correct
      Since:
      jcms-10.0.5
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getExpiryDate

      public Date getExpiryDate()
    • setExpiryDate

      public void setExpiryDate(Date expiryDate)
    • getConcealedAccessId

      public String getConcealedAccessId()
    • setConcealedAccessId

      public void setConcealedAccessId(String concealedAccessId)
    • getAccessId

      public String getAccessId()
    • setAccessId

      public void setAccessId(String accessId)
    • getConcealedAccessCode

      public String getConcealedAccessCode()
    • setConcealedAccessCode

      public void setConcealedAccessCode(String concealedAccessCode)
    • getAccessCode

      public String getAccessCode()
    • setAccessCode

      public void setAccessCode(String accessCode)
    • getFileType

      public int getFileType()
    • setFileType

      public void setFileType(int fileType)
    • getVersion

      public int getVersion()
    • setVersion

      public void setVersion(int version)
    • getMaxDownload

      public int getMaxDownload()
    • setMaxDownload

      public void setMaxDownload(int maxDownload)
    • getSendDownloadAlert

      public boolean getSendDownloadAlert()
    • setSendDownloadAlert

      public void setSendDownloadAlert(Boolean v)
    • getDocFileList

      public List<String> getDocFileList()
    • setDocFileList

      public void setDocFileList(List<String> docFileList)
    • getDocVersionList

      public List<String> getDocVersionList()
    • setDocVersionList

      public void setDocVersionList(List<String> docVersionList)
    • getDocList

      public List<FileDocument> getDocList()
    • getDocList

      public List<FileDocument> getDocList(boolean modifiable)
    • setDocList

      public void setDocList(List<FileDocument> v)
    • getDocListId

      public List<String> getDocListId()
      Do not call this method. It is reserved for DBData mapping.
      Returns:
      the doc id set
    • setDocListId

      public void setDocListId(List<String> v)
      Do not call this method. It is reserved for DBData mapping.
      Parameters:
      v - the doc id set
    • initializeDBDataCollections

      public void initializeDBDataCollections()
      Description copied from class: Data
      This methods force the collections of the DBData to be initialized()
      Overrides:
      initializeDBDataCollections in class Data
    • checkWrite

      public ControllerStatus checkWrite(int op, Member mbr, boolean checkIntegrity, Map context)
      Description copied from class: Data
      Checks if the given write operation can be performed
      Overrides:
      checkWrite in class Data
      Parameters:
      op - the operation (OP_CREATE, OP_UPDATE, ...)
      mbr - the member which requests the write operation
      checkIntegrity - if true, requires the constraints integrity to be checked
      context - a map which contains context parameters (may be null)
      Returns:
      a ControllerStatus
    • performBeforeWrite

      protected void performBeforeWrite(int op, Member mbr, Map context)
      Description copied from class: Data
      Called to perform some action before the write.
      Overrides:
      performBeforeWrite in class Data
      Parameters:
      op - the operation (OP_CREATE, OP_UPDATE, ...)
      mbr - the member which requests the write operation
      context - a map which contains context parameters (may be null)
    • performAfterWrite

      protected void performAfterWrite(int op, Member mbr, Map context)
      Description copied from class: Data
      Called to perform some action after the write.
      Overrides:
      performAfterWrite in class Data
      Parameters:
      op - the operation (OP_CREATE, OP_UPDATE, ...)
      mbr - the member which requests the write operation
      context - a map which contains context parameters (may be null)
    • getRemainingDuration

      public String getRemainingDuration(Locale locale)
      Parameters:
      locale - the locale to use
      Returns:
      the durations (in days) to the expiry date.
      Since:
      jcms-10.0.5
    • isCurrentVersion

      public boolean isCurrentVersion()
      Returns:
      true if the version to download is the current version
      Since:
      jcms-10.0.5
    • isFrozenVersion

      public boolean isFrozenVersion()
      Returns:
      true if the version to download is the "frozen" version
      Since:
      jcms-10.0.5
    • isOriginalFileType

      public boolean isOriginalFileType()
      Returns:
      true if the fileType is Original Type
      Since:
      jcms-10.0.5
    • isPDFFileType

      public boolean isPDFFileType()
      Returns:
      true if the fileType is PDF
      Since:
      jcms-10.0.5
    • isZip

      public boolean isZip()
      Returns:
      true if this publicLink contains more than 1 document
      Since:
      jcms-10.0.5
    • getMailSubject

      public String getMailSubject(String lang)
      Parameters:
      lang - the language to use
      Returns:
      the subject of the mail
      Since:
      jcms-10.0.5
    • getMailBody

      public String getMailBody(String lang, Locale locale)
      Parameters:
      lang - the language to use
      locale - the locale
      Returns:
      the body of the mail
      Since:
      jcms-10.0.5
    • getLinkName

      public String getLinkName(String lang)
    • canBeReadBy

      public boolean canBeReadBy(Member member, boolean searchInGroups, RightInfo rightInfo)
      Description copied from class: Data
      Checks if the specified member is authorized to read this Data.
      Overrides:
      canBeReadBy in class Data
      Parameters:
      member - the member to check (may be null for anonymous user)
      searchInGroups - set to true to check for read right authorization using Member's group(s).
      rightInfo - a RightInfo instance in which explanation of read right authorization acceptance or refusal will be indicated. Value is required and cannot be null.
      Returns:
      true if the member can read this Data, false otherwise