Class PublicLink

    • Field Detail

      • CONCEALED_ACCESSID_FIELD

        public static final java.lang.String CONCEALED_ACCESSID_FIELD
        See Also:
        Constant Field Values
      • EXPIRY_DATE_FIELD

        public static final java.lang.String EXPIRY_DATE_FIELD
        See Also:
        Constant Field Values
      • docList

        protected transient java.util.List<FileDocument> docList
      • docFileList

        protected java.util.List<java.lang.String> docFileList
      • docVersionList

        protected java.util.List<java.lang.String> docVersionList
    • Constructor Detail

      • PublicLink

        public PublicLink()
      • PublicLink

        public PublicLink​(PublicLink other)
    • Method Detail

      • hasAccessCode

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

        public java.lang.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 java.util.List<PublicDownload> getDownloadList()
        Returns:
        the list of all PublicDownload for this PublicLink
        Since:
        jcms-10.0.5
      • getExpiryDateAsString

        public java.lang.String getExpiryDateAsString​(java.util.Locale locale)
      • checkAccessCode

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

        public java.lang.String getName()
      • setName

        public void setName​(java.lang.String name)
      • getExpiryDate

        public java.util.Date getExpiryDate()
      • setExpiryDate

        public void setExpiryDate​(java.util.Date expiryDate)
      • getConcealedAccessId

        public java.lang.String getConcealedAccessId()
      • setConcealedAccessId

        public void setConcealedAccessId​(java.lang.String concealedAccessId)
      • getAccessId

        public java.lang.String getAccessId()
      • setAccessId

        public void setAccessId​(java.lang.String accessId)
      • getConcealedAccessCode

        public java.lang.String getConcealedAccessCode()
      • setConcealedAccessCode

        public void setConcealedAccessCode​(java.lang.String concealedAccessCode)
      • getAccessCode

        public java.lang.String getAccessCode()
      • setAccessCode

        public void setAccessCode​(java.lang.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​(java.lang.Boolean v)
      • getDocFileList

        public java.util.List<java.lang.String> getDocFileList()
      • setDocFileList

        public void setDocFileList​(java.util.List<java.lang.String> docFileList)
      • getDocVersionList

        public java.util.List<java.lang.String> getDocVersionList()
      • setDocVersionList

        public void setDocVersionList​(java.util.List<java.lang.String> docVersionList)
      • getDocList

        public java.util.List<FileDocument> getDocList()
      • getDocList

        public java.util.List<FileDocument> getDocList​(boolean modifiable)
      • setDocList

        public void setDocList​(java.util.List<FileDocument> v)
      • getDocListId

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

        public void setDocListId​(java.util.List<java.lang.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,
                                           java.util.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,
                                          java.util.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,
                                         java.util.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 java.lang.String getRemainingDuration​(java.util.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 java.lang.String getMailSubject​(java.lang.String lang)
        Parameters:
        lang - the language to use
        Returns:
        the subject of the mail
        Since:
        jcms-10.0.5
      • getMailBody

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

        public java.lang.String getLinkName​(java.lang.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