Class PageHome


  • public final class PageHome
    extends java.lang.Object
    This class provides instances management methods (create, find, ...) for Page objects
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean checkPageExist​(int nPageId)
      Check if the page exists
      static Page create​(Page page)
      Creates an instance of page
      static Page findByPrimaryKey​(int nKey)
      Returns an instance of un page whose identifier is specified in parameter
      static java.util.List<Page> getAllPages()
      Return the list of all the pages from a portal identifier
      static java.util.Collection<Page> getChildPages​(int nParentPageId)
      Returns the list of the child pages from the current parent page identifier
      static java.util.Collection<Page> getChildPagesMinimalData​(int nParentPageId)
      Returns the list of the child pages from the current parent page identifier
      static ImageResource getImageResource​(int nPageId)
      Gets an image resource
      static Page getLastModifiedPage()
      Get the last modified page
      static int getNewChildPageOrder​(int nParentPageId)
      Select the max child page order and create the new order for new child page
      static Page getPage​(int nPageId)
      Loads a page without portlets from its identifier
      static Page getPageByIdPortlet​(int nPorletId)
      Loads a page associated to a portlet
      static java.util.Collection<Page> getPagesByRoleKey​(java.lang.String strRoleKey)
      Return the list of all the pages filtered by Lutece Role specified in parameter
      static ReferenceList getPagesList()
      Returns the list of page
      static java.util.List<java.lang.Integer> getPagesWhichMustChangeAuthorizationNode​(int nIdParentPage)
      get list of children Pages Which Must Change their authorization node
      static Page getPageWithoutImageContent​(int nPageId)
      Loads a page without portlets from its identifier without image content
      static void remove​(int nPageId)
      Removes a page and all its contents (the portlets and theirs contents)
      static void update​(Page page)
      update of the page which is specified in parameter
      static void updateAuthorizationNode​(int nIdPage, java.lang.Integer nIdAuthorizationNode)
      Update the authorization node of the page
      • Methods inherited from class java.lang.Object

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

      • create

        public static Page create​(Page page)
        Creates an instance of page
        Parameters:
        page - An instance of page which contains the informations to store
        Returns:
        The instance of page which has been created with its primary key.
      • remove

        public static void remove​(int nPageId)
        Removes a page and all its contents (the portlets and theirs contents)
        Parameters:
        nPageId - The page identifier
      • update

        public static void update​(Page page)
        update of the page which is specified in parameter
        Parameters:
        page - the instance of the page which contains the data to store
      • findByPrimaryKey

        public static Page findByPrimaryKey​(int nKey)
        Returns an instance of un page whose identifier is specified in parameter
        Parameters:
        nKey - the primary key of the page
        Returns:
        an instance of the class
      • getPage

        public static Page getPage​(int nPageId)
        Loads a page without portlets from its identifier
        Parameters:
        nPageId - the page identifier
        Returns:
        an instance a the class Page
      • getPageWithoutImageContent

        public static Page getPageWithoutImageContent​(int nPageId)
        Loads a page without portlets from its identifier without image content
        Parameters:
        nPageId - the page identifier
        Returns:
        an instance a the class Page
      • getPageByIdPortlet

        public static Page getPageByIdPortlet​(int nPorletId)
        Loads a page associated to a portlet
        Parameters:
        nPorletId - The indentifier of the object portlet associate to the page
        Returns:
        The Instance of the object Page
      • getChildPages

        public static java.util.Collection<Page> getChildPages​(int nParentPageId)
        Returns the list of the child pages from the current parent page identifier
        Parameters:
        nParentPageId - the current page identifier, parent of childs pages
        Returns:
        a collection of pages
      • getChildPagesMinimalData

        public static java.util.Collection<Page> getChildPagesMinimalData​(int nParentPageId)
        Returns the list of the child pages from the current parent page identifier
        Parameters:
        nParentPageId - the ParentPageId identifier
        Returns:
        page collection
      • getAllPages

        public static java.util.List<Page> getAllPages()
        Return the list of all the pages from a portal identifier
        Returns:
        a collection of pages
      • getPagesList

        public static ReferenceList getPagesList()
        Returns the list of page
        Returns:
        the list of pages
      • getPagesByRoleKey

        public static java.util.Collection<Page> getPagesByRoleKey​(java.lang.String strRoleKey)
        Return the list of all the pages filtered by Lutece Role specified in parameter
        Parameters:
        strRoleKey - The Lutece Role key
        Returns:
        a collection of pages
      • getImageResource

        public static ImageResource getImageResource​(int nPageId)
        Gets an image resource
        Parameters:
        nPageId - The page ID
        Returns:
        ImageResource
      • getNewChildPageOrder

        public static int getNewChildPageOrder​(int nParentPageId)
        Select the max child page order and create the new order for new child page
        Parameters:
        nParentPageId - The parent page Id
        Returns:
        the new child page order
      • checkPageExist

        public static boolean checkPageExist​(int nPageId)
        Check if the page exists
        Parameters:
        nPageId - The Page ID
        Returns:
        True if the page exists, otherwise false
      • getLastModifiedPage

        public static Page getLastModifiedPage()
        Get the last modified page
        Returns:
        the last modified Page
      • getPagesWhichMustChangeAuthorizationNode

        public static java.util.List<java.lang.Integer> getPagesWhichMustChangeAuthorizationNode​(int nIdParentPage)
        get list of children Pages Which Must Change their authorization node
        Parameters:
        nIdParentPage - the id of the parent page
        Returns:
        an id list
      • updateAuthorizationNode

        public static void updateAuthorizationNode​(int nIdPage,
                                                   java.lang.Integer nIdAuthorizationNode)
        Update the authorization node of the page
        Parameters:
        nIdPage - the page id
        nIdAuthorizationNode - the authorization node id