Class PageAPIDelegate


  • public class PageAPIDelegate
    extends java.lang.Object
    Author:
    Emmanuel Duchastenier
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected SPage constructPage​(org.bonitasoft.engine.page.PageCreator pageCreator, long userId)  
      protected SPage constructPage​(org.bonitasoft.engine.page.PageUpdater pageUpdater, long userId)  
      protected org.bonitasoft.engine.page.Page convertToPage​(SPage addPage)  
      org.bonitasoft.engine.page.Page createPage​(java.lang.String contentName, byte[] content, long userIdFromSession)  
      org.bonitasoft.engine.page.Page createPage​(org.bonitasoft.engine.page.PageCreator pageCreator, byte[] content, long userIdFromSession)  
      void deletePage​(long pageId)  
      void deletePages​(java.util.List<java.lang.Long> pageIds)  
      static PageAPIDelegate getInstance()  
      org.bonitasoft.engine.page.Page getPage​(long pageId)  
      org.bonitasoft.engine.page.Page getPageByName​(java.lang.String name)  
      org.bonitasoft.engine.page.Page getPageByNameAndProcessDefinition​(java.lang.String name, long processDefinitionId)  
      byte[] getPageContent​(long pageId)  
      java.util.Properties getPageProperties​(byte[] content, boolean checkIfItAlreadyExists)  
      protected SPageUpdateBuilder getPageUpdateBuilder()  
      protected SearchPages getSearchPages​(org.bonitasoft.engine.search.SearchOptions searchOptions)  
      org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.page.Page> searchPages​(org.bonitasoft.engine.search.SearchOptions searchOptions)  
      org.bonitasoft.engine.page.Page updatePage​(long pageId, org.bonitasoft.engine.page.PageUpdater pageUpdater, long userIdFromSession)  
      void updatePageContent​(long pageId, byte[] content, long userIdFromSession)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getPage

        public org.bonitasoft.engine.page.Page getPage​(long pageId)
                                                throws org.bonitasoft.engine.page.PageNotFoundException
        Throws:
        org.bonitasoft.engine.page.PageNotFoundException
      • getPageContent

        public byte[] getPageContent​(long pageId)
                              throws org.bonitasoft.engine.page.PageNotFoundException
        Throws:
        org.bonitasoft.engine.page.PageNotFoundException
      • searchPages

        public org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.page.Page> searchPages​(org.bonitasoft.engine.search.SearchOptions searchOptions)
                                                                                               throws org.bonitasoft.engine.exception.SearchException
        Throws:
        org.bonitasoft.engine.exception.SearchException
      • getSearchPages

        protected SearchPages getSearchPages​(org.bonitasoft.engine.search.SearchOptions searchOptions)
      • createPage

        public org.bonitasoft.engine.page.Page createPage​(org.bonitasoft.engine.page.PageCreator pageCreator,
                                                          byte[] content,
                                                          long userIdFromSession)
                                                   throws org.bonitasoft.engine.exception.AlreadyExistsException,
                                                          org.bonitasoft.engine.exception.CreationException,
                                                          org.bonitasoft.engine.exception.InvalidPageTokenException,
                                                          org.bonitasoft.engine.exception.InvalidPageZipContentException
        Throws:
        org.bonitasoft.engine.exception.AlreadyExistsException
        org.bonitasoft.engine.exception.CreationException
        org.bonitasoft.engine.exception.InvalidPageTokenException
        org.bonitasoft.engine.exception.InvalidPageZipContentException
      • createPage

        public org.bonitasoft.engine.page.Page createPage​(java.lang.String contentName,
                                                          byte[] content,
                                                          long userIdFromSession)
                                                   throws org.bonitasoft.engine.exception.AlreadyExistsException,
                                                          org.bonitasoft.engine.exception.CreationException,
                                                          org.bonitasoft.engine.exception.InvalidPageTokenException,
                                                          org.bonitasoft.engine.exception.InvalidPageZipContentException
        Throws:
        org.bonitasoft.engine.exception.AlreadyExistsException
        org.bonitasoft.engine.exception.CreationException
        org.bonitasoft.engine.exception.InvalidPageTokenException
        org.bonitasoft.engine.exception.InvalidPageZipContentException
      • deletePage

        public void deletePage​(long pageId)
                        throws org.bonitasoft.engine.exception.DeletionException
        Throws:
        org.bonitasoft.engine.exception.DeletionException
      • deletePages

        public void deletePages​(java.util.List<java.lang.Long> pageIds)
                         throws org.bonitasoft.engine.exception.DeletionException
        Throws:
        org.bonitasoft.engine.exception.DeletionException
      • getPageByName

        public org.bonitasoft.engine.page.Page getPageByName​(java.lang.String name)
                                                      throws org.bonitasoft.engine.page.PageNotFoundException
        Throws:
        org.bonitasoft.engine.page.PageNotFoundException
      • updatePage

        public org.bonitasoft.engine.page.Page updatePage​(long pageId,
                                                          org.bonitasoft.engine.page.PageUpdater pageUpdater,
                                                          long userIdFromSession)
                                                   throws org.bonitasoft.engine.exception.UpdateException,
                                                          org.bonitasoft.engine.exception.AlreadyExistsException
        Throws:
        org.bonitasoft.engine.exception.UpdateException
        org.bonitasoft.engine.exception.AlreadyExistsException
      • updatePageContent

        public void updatePageContent​(long pageId,
                                      byte[] content,
                                      long userIdFromSession)
                               throws org.bonitasoft.engine.exception.UpdateException,
                                      org.bonitasoft.engine.exception.UpdatingWithInvalidPageTokenException,
                                      org.bonitasoft.engine.exception.UpdatingWithInvalidPageZipContentException
        Throws:
        org.bonitasoft.engine.exception.UpdateException
        org.bonitasoft.engine.exception.UpdatingWithInvalidPageTokenException
        org.bonitasoft.engine.exception.UpdatingWithInvalidPageZipContentException
      • getPageProperties

        public java.util.Properties getPageProperties​(byte[] content,
                                                      boolean checkIfItAlreadyExists)
                                               throws org.bonitasoft.engine.exception.InvalidPageTokenException,
                                                      org.bonitasoft.engine.exception.AlreadyExistsException,
                                                      org.bonitasoft.engine.exception.InvalidPageZipMissingPropertiesException,
                                                      org.bonitasoft.engine.exception.InvalidPageZipMissingIndexException,
                                                      org.bonitasoft.engine.exception.InvalidPageZipInconsistentException,
                                                      org.bonitasoft.engine.exception.InvalidPageZipMissingAPropertyException
        Throws:
        org.bonitasoft.engine.exception.InvalidPageTokenException
        org.bonitasoft.engine.exception.AlreadyExistsException
        org.bonitasoft.engine.exception.InvalidPageZipMissingPropertiesException
        org.bonitasoft.engine.exception.InvalidPageZipMissingIndexException
        org.bonitasoft.engine.exception.InvalidPageZipInconsistentException
        org.bonitasoft.engine.exception.InvalidPageZipMissingAPropertyException
      • convertToPage

        protected org.bonitasoft.engine.page.Page convertToPage​(SPage addPage)
      • constructPage

        protected SPage constructPage​(org.bonitasoft.engine.page.PageCreator pageCreator,
                                      long userId)
      • constructPage

        protected SPage constructPage​(org.bonitasoft.engine.page.PageUpdater pageUpdater,
                                      long userId)
      • getPageByNameAndProcessDefinition

        public org.bonitasoft.engine.page.Page getPageByNameAndProcessDefinition​(java.lang.String name,
                                                                                 long processDefinitionId)
                                                                          throws org.bonitasoft.engine.page.PageNotFoundException
        Throws:
        org.bonitasoft.engine.page.PageNotFoundException