Interface PublicDocumentAccessService


public interface PublicDocumentAccessService
  • Method Details

    • createPublicDocumentAccess

      PublicDocumentAccess createPublicDocumentAccess(long docOwnerId, String nodeId, String password, Long expirationDate, boolean hasPassword)
      Creates a public access for a document
      Parameters:
      docOwnerId - document owner
      nodeId - document node id
      password - password of the public access
      expirationDate - public access expiration date
      hasPassword - document has already old password
      Returns:
      PublicDocumentAccess
    • getPublicDocumentAccess

      PublicDocumentAccess getPublicDocumentAccess(String documentId)
      Gets a document public access by its node id
      Parameters:
      documentId - node id
      Returns:
      PublicDocumentAccess
    • isPublicDocumentAccessExpired

      boolean isPublicDocumentAccessExpired(String documentId)
      Checks if public access expired
      Parameters:
      documentId - node id
      Returns:
      true or false
    • isDocumentPublicAccessValid

      boolean isDocumentPublicAccessValid(String documentId, String password)
      Checks the validity of a public access
      Parameters:
      documentId - node id
      password - password of the document public access
      Returns:
      true if access is valid or false else
    • hasDocumentPublicAccess

      boolean hasDocumentPublicAccess(String documentId)
      Checks if a document has public access
      Parameters:
      documentId - document id
      Returns:
      true or false
    • getPublicDocumentInfo

      PublicDocumentInfo getPublicDocumentInfo(String documentId) throws org.exoplatform.commons.exception.ObjectNotFoundException
      Gets what the public link page shows of a document that has a public access link: whether the link asks for a password or has expired, and the document's name and mime type, without reading its content. The link is read once and its password is never decoded. Nothing of the document is read when it has no public access link.
      Parameters:
      documentId - document id
      Returns:
      PublicDocumentInfo
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException - when the document has no public access link, no longer exists or cannot be read
    • revokeDocumentPublicAccess

      void revokeDocumentPublicAccess(String documentId)
      Revokes a document public access
      Parameters:
      documentId - document id