Class ViewDAO

    • Constructor Summary

      Constructors 
      Constructor Description
      ViewDAO()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean checkExistView​(String strViewKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Check if a view already exists or not
      void delete​(String strViewKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a view from the table
      void deleteDashboard​(String strViewKey, String strDashboardName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a dashboard of a view
      void deleteDashboards​(String strViewKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete all dashboards of a view
      void deleteProfileFromView​(String strViewKey, String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove profile from a view
      void deleteProfiles​(String strViewKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove a profile from a view
      fr.paris.lutece.util.ReferenceList getViewsList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the list of views
      boolean hasView​(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Check if the given profile has a view or not
      void insert​(View view, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a new record in the table.
      void insertDashboard​(String strViewKey, fr.paris.lutece.portal.service.dashboard.IDashboardComponent dashboard, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert a dashboard for a view
      void insertProfileForView​(String strViewKey, String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Add a profile for a view
      View load​(String strViewKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of view from the table
      List<Integer> selectColumns​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns the columns list
      fr.paris.lutece.portal.service.dashboard.IDashboardComponent selectDashboard​(String strDashboardName, String strViewKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the dashboard
      List<fr.paris.lutece.portal.service.dashboard.IDashboardComponent> selectDashboards​(String strViewKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the list of dashboards from a given view key
      List<fr.paris.lutece.portal.service.dashboard.IDashboardComponent> selectDashboardsByFilter​(fr.paris.lutece.portal.business.dashboard.DashboardFilter filter, String strViewKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Finds all dashboard components matching filter
      int selectMaxOrder​(int nColumn, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns the max order value, for the given column
      int selectMaxOrder​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns the max order value, for all columns
      List<Profile> selectProfilesListForView​(String strViewKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the list of profiles associated to the view
      View selectViewForProfile​(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the view from a profile
      List<View> selectViewsByFilter​(ViewFilter vFilter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Find view by filter
      List<View> selectViewsList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the list of views
      void store​(View view, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update the record identified by the given view key with the given view in the table
      void storeDashboard​(String strViewKey, fr.paris.lutece.portal.service.dashboard.IDashboardComponent dashboard, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update a dashboard
    • Constructor Detail

      • ViewDAO

        public ViewDAO()
    • Method Detail

      • insert

        public void insert​(View view,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Insert a new record in the table.
        Specified by:
        insert in interface IViewDAO
        Parameters:
        view - The view object
        plugin - Plugin
      • load

        public View load​(String strViewKey,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of view from the table
        Specified by:
        load in interface IViewDAO
        Parameters:
        strViewKey - The view key
        plugin - Plugin
        Returns:
        the instance of the view
      • delete

        public void delete​(String strViewKey,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Delete a view from the table
        Specified by:
        delete in interface IViewDAO
        Parameters:
        strViewKey - The view key
        plugin - Plugin
      • store

        public void store​(View view,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Update the record identified by the given view key with the given view in the table
        Specified by:
        store in interface IViewDAO
        Parameters:
        view - The reference of view to be the new one
        plugin - Plugin
      • selectViewsList

        public List<View> selectViewsList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the list of views
        Specified by:
        selectViewsList in interface IViewDAO
        Parameters:
        plugin - Plugin
        Returns:
        The List of the views
      • selectViewsByFilter

        public List<View> selectViewsByFilter​(ViewFilter vFilter,
                                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Find view by filter
        Specified by:
        selectViewsByFilter in interface IViewDAO
        Parameters:
        vFilter - the Filter
        plugin - Plugin
        Returns:
        List of views
      • checkExistView

        public boolean checkExistView​(String strViewKey,
                                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Check if a view already exists or not
        Specified by:
        checkExistView in interface IViewDAO
        Parameters:
        strViewKey - The view key
        plugin - Plugin
        Returns:
        true if it already exists, false otherwise
      • getViewsList

        public fr.paris.lutece.util.ReferenceList getViewsList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Get the list of views
        Specified by:
        getViewsList in interface IViewDAO
        Parameters:
        plugin - Plugin
        Returns:
        the list of views
      • selectProfilesListForView

        public List<Profile> selectProfilesListForView​(String strViewKey,
                                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Get the list of profiles associated to the view
        Specified by:
        selectProfilesListForView in interface IViewDAO
        Parameters:
        strViewKey - The view Key
        plugin - Plugin
        Returns:
        The list of users
      • selectViewForProfile

        public View selectViewForProfile​(String strProfileKey,
                                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Get the view from a profile
        Specified by:
        selectViewForProfile in interface IViewDAO
        Parameters:
        strProfileKey - the profile key
        plugin - Plugin
        Returns:
        the view associated to the profile
      • hasView

        public boolean hasView​(String strProfileKey,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Check if the given profile has a view or not
        Specified by:
        hasView in interface IViewDAO
        Parameters:
        strProfileKey - the profile key
        plugin - Plugin
        Returns:
        true if the profile has the view, false otherwise
      • insertProfileForView

        public void insertProfileForView​(String strViewKey,
                                         String strProfileKey,
                                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Add a profile for a view
        Specified by:
        insertProfileForView in interface IViewDAO
        Parameters:
        strViewKey - The view Key
        strProfileKey - The profile Key
        plugin - Plugin
      • deleteProfiles

        public void deleteProfiles​(String strViewKey,
                                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Remove a profile from a view
        Specified by:
        deleteProfiles in interface IViewDAO
        Parameters:
        strViewKey - The view Key
        plugin - Plugin
      • deleteProfileFromView

        public void deleteProfileFromView​(String strViewKey,
                                          String strProfileKey,
                                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Remove profile from a view
        Specified by:
        deleteProfileFromView in interface IViewDAO
        Parameters:
        strViewKey - the view key
        strProfileKey - the profile key
        plugin - Plugin
      • selectDashboards

        public List<fr.paris.lutece.portal.service.dashboard.IDashboardComponent> selectDashboards​(String strViewKey,
                                                                                                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the list of dashboards from a given view key
        Specified by:
        selectDashboards in interface IViewDAO
        Parameters:
        strViewKey - the view key
        plugin - Plugin
        Returns:
        a list of IDashboardComponent
      • selectDashboard

        public fr.paris.lutece.portal.service.dashboard.IDashboardComponent selectDashboard​(String strDashboardName,
                                                                                            String strViewKey,
                                                                                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the dashboard
        Specified by:
        selectDashboard in interface IViewDAO
        Parameters:
        strDashboardName - the dashboard name
        strViewKey - the view key
        plugin - Plugin
        Returns:
        the dashboard
      • deleteDashboard

        public void deleteDashboard​(String strViewKey,
                                    String strDashboardName,
                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Delete a dashboard of a view
        Specified by:
        deleteDashboard in interface IViewDAO
        Parameters:
        strViewKey - the view key
        strDashboardName - the dashboard name
        plugin - Plugin
      • deleteDashboards

        public void deleteDashboards​(String strViewKey,
                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Delete all dashboards of a view
        Specified by:
        deleteDashboards in interface IViewDAO
        Parameters:
        strViewKey - the view key
        plugin - Plugin
      • insertDashboard

        public void insertDashboard​(String strViewKey,
                                    fr.paris.lutece.portal.service.dashboard.IDashboardComponent dashboard,
                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Insert a dashboard for a view
        Specified by:
        insertDashboard in interface IViewDAO
        Parameters:
        strViewKey - the view key
        dashboard - the dashboard
        plugin - Plugin
      • storeDashboard

        public void storeDashboard​(String strViewKey,
                                   fr.paris.lutece.portal.service.dashboard.IDashboardComponent dashboard,
                                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Update a dashboard
        Specified by:
        storeDashboard in interface IViewDAO
        Parameters:
        strViewKey - the view key
        dashboard - the dashboard
        plugin - Plugin
      • selectMaxOrder

        public int selectMaxOrder​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Returns the max order value, for all columns
        Specified by:
        selectMaxOrder in interface IViewDAO
        Parameters:
        plugin - Plugin
        Returns:
        the max order
      • selectMaxOrder

        public int selectMaxOrder​(int nColumn,
                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Returns the max order value, for the given column
        Specified by:
        selectMaxOrder in interface IViewDAO
        Parameters:
        nColumn - the column
        plugin - Plugin
        Returns:
        the max order
      • selectColumns

        public List<Integer> selectColumns​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Returns the columns list
        Specified by:
        selectColumns in interface IViewDAO
        Parameters:
        plugin - Plugin
        Returns:
        the columns list
      • selectDashboardsByFilter

        public List<fr.paris.lutece.portal.service.dashboard.IDashboardComponent> selectDashboardsByFilter​(fr.paris.lutece.portal.business.dashboard.DashboardFilter filter,
                                                                                                           String strViewKey,
                                                                                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Finds all dashboard components matching filter
        Specified by:
        selectDashboardsByFilter in interface IViewDAO
        Parameters:
        filter - the filter
        strViewKey - the view key
        plugin - Plugin
        Returns:
        all dashboard components matching filter