fr.paris.lutece.plugins.myportal.service
Class WidgetService

java.lang.Object
  extended by fr.paris.lutece.plugins.myportal.service.WidgetService

public class WidgetService
extends java.lang.Object

Widget Service class : retrieve Widget description from a cache


Constructor Summary
WidgetService()
          constructor
 
Method Summary
 void createWidget(Widget widget)
          Create a new widget.
 java.util.List<Widget> getEssentialWidgets()
          Get the list of essential widgets
 java.util.List<Widget> getNewWidgets()
          Get the list of new widgets
 java.util.List<Widget> getPublicMandatoryWidgets()
          Get the list of public or mandatory widgets
 java.util.List<java.lang.Integer> getUserWidgetIds(fr.paris.lutece.portal.service.security.LuteceUser user)
          Get the widget IDs from a given LuteceUser
 Widget getWidget(int nWidgetId)
          Returns widgets description from the cache
 java.util.List<Widget> getWidgetsByCategoryId(int nCategoryId)
          Get the list of widgets given an id category
 java.util.List<Widget> getWidgetsByName(java.lang.String strName)
          Get the list of widgets given a name
 java.util.Collection<Widget> getWidgetsList()
          Load the data of all the widget objects and returns them in form of a collection
 void removeWidget(int nWidgetId)
          Remove a widget.
 void setCategoryWidgetsCacheKeyService(fr.paris.lutece.portal.service.cache.ICacheKeyService cacheKeyService)
          Set the cache key service
 void setEssentialWidgetsCacheKeyService(fr.paris.lutece.portal.service.cache.ICacheKeyService cacheKeyService)
          Set the cache key service
 void setIconCacheKeyService(fr.paris.lutece.portal.service.cache.ICacheKeyService cacheKeyService)
          Set the cache key service
 void setNewWidgetsCacheKeyService(fr.paris.lutece.portal.service.cache.ICacheKeyService cacheKeyService)
          Set the cache key service
 void setWidgetCacheKeyService(fr.paris.lutece.portal.service.cache.ICacheKeyService cacheKeyService)
          Set the cache key service
 void setWidgetContentService(WidgetContentService widgetContentService)
          Set the widget content service
 void updateWidget(Widget widget)
          Update a widget.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WidgetService

public WidgetService()
constructor

Method Detail

getWidget

public Widget getWidget(int nWidgetId)
Returns widgets description from the cache

Parameters:
nWidgetId - The Widget ID
Returns:
The widget object

getWidgetsList

public java.util.Collection<Widget> getWidgetsList()
Load the data of all the widget objects and returns them in form of a collection

Returns:
the collection which contains the data of all the widget objects

getWidgetsByCategoryId

public java.util.List<Widget> getWidgetsByCategoryId(int nCategoryId)
Get the list of widgets given an id category

Parameters:
nCategoryId - the id category
Returns:
a list of Widget

getEssentialWidgets

public java.util.List<Widget> getEssentialWidgets()
Get the list of essential widgets

Returns:
a list of Widget

getNewWidgets

public java.util.List<Widget> getNewWidgets()
Get the list of new widgets

Returns:
a list of Widget

getWidgetsByName

public java.util.List<Widget> getWidgetsByName(java.lang.String strName)
Get the list of widgets given a name

Parameters:
strName - the name
Returns:
a list of Widget

createWidget

public void createWidget(Widget widget)
Create a new widget. If the cache is enable, it will reset the cache.

Parameters:
widget - The Widget

removeWidget

public void removeWidget(int nWidgetId)
Remove a widget. If the cache is enable, it will reset the cache.

Parameters:
nWidgetId - the widget ID

updateWidget

public void updateWidget(Widget widget)
Update a widget. If the cache is enable, it will reset the cache.

Parameters:
widget - The Widget

getUserWidgetIds

public java.util.List<java.lang.Integer> getUserWidgetIds(fr.paris.lutece.portal.service.security.LuteceUser user)
Get the widget IDs from a given LuteceUser

Parameters:
user - the LuteceUser
Returns:
a list of widget IDs

getPublicMandatoryWidgets

public java.util.List<Widget> getPublicMandatoryWidgets()
Get the list of public or mandatory widgets

Returns:
the list widgets

setWidgetCacheKeyService

public void setWidgetCacheKeyService(fr.paris.lutece.portal.service.cache.ICacheKeyService cacheKeyService)
Set the cache key service

Parameters:
cacheKeyService - the _cacheKeyService to set

setIconCacheKeyService

public void setIconCacheKeyService(fr.paris.lutece.portal.service.cache.ICacheKeyService cacheKeyService)
Set the cache key service

Parameters:
cacheKeyService - the _cacheKeyService to set

setEssentialWidgetsCacheKeyService

public void setEssentialWidgetsCacheKeyService(fr.paris.lutece.portal.service.cache.ICacheKeyService cacheKeyService)
Set the cache key service

Parameters:
cacheKeyService - the _cacheKeyService to set

setNewWidgetsCacheKeyService

public void setNewWidgetsCacheKeyService(fr.paris.lutece.portal.service.cache.ICacheKeyService cacheKeyService)
Set the cache key service

Parameters:
cacheKeyService - the _cacheKeyService to set

setCategoryWidgetsCacheKeyService

public void setCategoryWidgetsCacheKeyService(fr.paris.lutece.portal.service.cache.ICacheKeyService cacheKeyService)
Set the cache key service

Parameters:
cacheKeyService - the _cacheKeyService to set

setWidgetContentService

public void setWidgetContentService(WidgetContentService widgetContentService)
Set the widget content service

Parameters:
widgetContentService - the widget content service


Copyright © 2011 Mairie de Paris. All Rights Reserved.