Class PageDAO

  • All Implemented Interfaces:
    IPageDAO

    public final class PageDAO
    extends Object
    implements IPageDAO
    This class porvides Data Access methods for Page objects
    • Constructor Detail

      • PageDAO

        public PageDAO()
    • Method Detail

      • insert

        public void insert​(Page page)
        Insert a new record in the table.
        Specified by:
        insert in interface IPageDAO
        Parameters:
        page - The Page object
      • load

        public Page load​(int nPageId,
                         boolean bPortlets)
        load the data of level from the table
        Specified by:
        load in interface IPageDAO
        Parameters:
        nPageId - The identifier of the object Page
        bPortlets - The boolean
        Returns:
        The Instance of the object Page
      • loadWithoutImageContent

        public Page loadWithoutImageContent​(int nPageId,
                                            boolean bPortlets)
        load the data of level from the table without image content
        Specified by:
        loadWithoutImageContent in interface IPageDAO
        Parameters:
        nPageId - The identifier of the object Page
        bPortlets - The boolean
        Returns:
        The Instance of the object Page
      • loadPageByIdPortlet

        public Page loadPageByIdPortlet​(int nPorletId)
        load a page associated to a portlet
        Specified by:
        loadPageByIdPortlet in interface IPageDAO
        Parameters:
        nPorletId - The identifier of the object portlet associate to the page
        Returns:
        The Instance of the object Page
      • delete

        public void delete​(int nPageId)
        Delete a record from the table
        Specified by:
        delete in interface IPageDAO
        Parameters:
        nPageId - The identifier of the object nPageId
      • store

        public void store​(Page page)
        Update the record in the table
        Specified by:
        store in interface IPageDAO
        Parameters:
        page - The instance of the page to update
      • selectChildPages

        public Collection<Page> selectChildPages​(int nParentPageId)
        Select all the child pages for a page which is specified in parameter
        Specified by:
        selectChildPages in interface IPageDAO
        Parameters:
        nParentPageId - The parent page identifier
        Returns:
        The list of objects Page (without portlets list)
      • selectChildPagesMinimalData

        public Collection<Page> selectChildPagesMinimalData​(int nParentPageId)
        Select all child pages for a page which is specified in parameter For each pages, only select : Id, pageParentId, name and description
        Specified by:
        selectChildPagesMinimalData in interface IPageDAO
        Parameters:
        nParentPageId - the ParentPageId identifier
        Returns:
        The list of objects Page
      • selectAllPages

        public List<Page> selectAllPages()
        Loads all the pages for a portal
        Specified by:
        selectAllPages in interface IPageDAO
        Returns:
        The pages of the current portal (without portlets list, of course !)
      • invalidatePage

        public void invalidatePage​(int nPageId)
        Invalidate the page after a modification
        Specified by:
        invalidatePage in interface IPageDAO
        Parameters:
        nPageId - the page identifier
      • getPagesList

        public ReferenceList getPagesList()
        Load the Referencelist of documentTypes
        Specified by:
        getPagesList in interface IPageDAO
        Returns:
        listDocumentTypes
      • getPagesByRoleKey

        public Collection<Page> getPagesByRoleKey​(String strRoleKey)
        Return the list of all the pages filtered by Lutece Role specified in parameter
        Specified by:
        getPagesByRoleKey in interface IPageDAO
        Parameters:
        strRoleKey - The Lutece Role key
        Returns:
        a collection of pages
      • selectNewChildPageOrder

        public int selectNewChildPageOrder​(int nParentPageId)
        Search the last order of child page list
        Specified by:
        selectNewChildPageOrder in interface IPageDAO
        Parameters:
        nParentPageId - The parent page Id
        Returns:
        The new page order
      • loadImageResource

        public ImageResource loadImageResource​(int nIdPage)
        Load a image corresponding to an Page
        Specified by:
        loadImageResource in interface IPageDAO
        Parameters:
        nIdPage - The Page Id
        Returns:
        the instance of the ImageContent
      • checkPageExist

        public boolean checkPageExist​(int nPageId)
        Tests if page exist
        Specified by:
        checkPageExist in interface IPageDAO
        Parameters:
        nPageId - The identifier of the document
        Returns:
        true if the page existed, false otherwise
      • updateAutorisationNode

        public void updateAutorisationNode​(int nIdPage,
                                           Integer nIdAutorisationNode)
        Update the authorization node of the page
        Specified by:
        updateAutorisationNode in interface IPageDAO
        Parameters:
        nIdPage - the page id
        nIdAutorisationNode - the authorization node id
      • selectPageForChangeAutorisationNode

        public List<Integer> selectPageForChangeAutorisationNode​(int nIdParentPage)
        select list of children Pages Which Must Change their authorization node
        Specified by:
        selectPageForChangeAutorisationNode in interface IPageDAO
        Parameters:
        nIdParentPage - the id of the parent page
        Returns:
        an id list