fr.paris.lutece.plugins.profiles.business.views
Class ViewDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.profiles.business.views.ViewDAO
All Implemented Interfaces:
IViewDAO

public class ViewDAO
extends java.lang.Object
implements IViewDAO

ViewDAO


Constructor Summary
ViewDAO()
           
 
Method Summary
 boolean checkExistView(java.lang.String strViewKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Check if a view already exists or not
 void delete(java.lang.String strViewKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a view from the table
 void deleteDashboard(java.lang.String strViewKey, java.lang.String strDashboardName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a dashboard of a view
 void deleteDashboards(java.lang.String strViewKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete all dashboards of a view
 void deleteProfileFromView(java.lang.String strViewKey, java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove profile from a view
 void deleteProfiles(java.lang.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(java.lang.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(java.lang.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(java.lang.String strViewKey, java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Add a profile for a view
 View load(java.lang.String strViewKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of view from the table
 java.util.List<java.lang.Integer> selectColumns(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns the columns list
 fr.paris.lutece.portal.service.dashboard.IDashboardComponent selectDashboard(java.lang.String strDashboardName, java.lang.String strViewKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the dashboard
 java.util.List<fr.paris.lutece.portal.service.dashboard.IDashboardComponent> selectDashboards(java.lang.String strViewKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the list of dashboards from a given view key
 java.util.List<fr.paris.lutece.portal.service.dashboard.IDashboardComponent> selectDashboardsByFilter(fr.paris.lutece.portal.business.dashboard.DashboardFilter filter, java.lang.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
 java.util.Collection<Profile> selectProfilesListForView(java.lang.String strViewKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the list of profiles associated to the view
 View selectViewForProfile(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the view from a profile
 java.util.Collection<View> selectViewsByFilter(ViewFilter vFilter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find view by filter
 java.util.Collection<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(java.lang.String strViewKey, fr.paris.lutece.portal.service.dashboard.IDashboardComponent dashboard, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update a dashboard
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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(java.lang.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(java.lang.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 java.util.Collection<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 Collection of the views

selectViewsByFilter

public java.util.Collection<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(java.lang.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 java.util.Collection<Profile> selectProfilesListForView(java.lang.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(java.lang.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(java.lang.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(java.lang.String strViewKey,
                                 java.lang.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(java.lang.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(java.lang.String strViewKey,
                                  java.lang.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 java.util.List<fr.paris.lutece.portal.service.dashboard.IDashboardComponent> selectDashboards(java.lang.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(java.lang.String strDashboardName,
                                                                                    java.lang.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(java.lang.String strViewKey,
                            java.lang.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(java.lang.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(java.lang.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(java.lang.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 java.util.List<java.lang.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 java.util.List<fr.paris.lutece.portal.service.dashboard.IDashboardComponent> selectDashboardsByFilter(fr.paris.lutece.portal.business.dashboard.DashboardFilter filter,
                                                                                                             java.lang.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


Copyright © 2011 Mairie de Paris. All Rights Reserved.