Class PublicDocumentLinkStorage

java.lang.Object
org.exoplatform.documents.storage.PublicDocumentLinkStorage

@Component public class PublicDocumentLinkStorage extends Object
Reads the platform's public links page by page, by keyset on their identifier, so that a link deleted meanwhile never shifts a later one out of the walk, and deletes them one by one
  • Constructor Details

    • PublicDocumentLinkStorage

      public PublicDocumentLinkStorage()
  • Method Details

    • getLinksAfter

      public List<org.exoplatform.documents.model.PublicDocumentLink> getLinksAfter(long lastId, int limit)
      Parameters:
      lastId - the identifier of the last link already read, 0 to start
      limit - the maximum count of links to read, positive
      Returns:
      the next links, in ascending identifier order; fewer than limit only at the end of the walk
    • linkExists

      public boolean linkExists(long id)
      Parameters:
      id - a link's identifier
      Returns:
      true when the link has not been deleted
    • deleteLink

      public boolean deleteLink(long id)
      Parameters:
      id - a link's identifier
      Returns:
      true when this call deleted the link, false when no link had this identifier any more