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

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

public final class DefaultPageBuilderService
extends java.lang.Object

DefaultPageBuilderService


Method Summary
 void addNewPageBuilderParameter(fr.paris.lutece.util.ReferenceItem param)
          Add a new parameter
 void doMoveWidgetComponent(WidgetComponent widgetComponent, int nOldColumn, int nOldOrder, boolean bCreate)
          Moves the widgetComponent.
 void doRemoveByColumnMax(int nColumnMax)
          Remove widget Components that are in a column > to the given column max
 void doRemoveWidgetComponent(int nIdWidgetComponent)
          Remove widget Component
 void doReorderColumn(int nColumn)
          Reorders column's widgetComponent
 java.util.Map<java.lang.String,java.util.List<WidgetComponent>> getAllSetWidgetComponents()
          Finds all widgetComponent with column and order set.
 int getColumnCount()
          Returns the column count, with DefaultPageBuilderService#PROPERTY_COLUMN_COUNT.
static DefaultPageBuilderService getInstance()
          Return the unique instance
 java.util.Map<java.lang.String,java.lang.Object> getManageAdvancedParameters(fr.paris.lutece.portal.business.user.AdminUser user)
          Get the model to manage the advanced parameters
 java.util.Map<java.lang.String,java.lang.Boolean> getOrderedColumnsStatus()
          Builds the map to with column id as key, and true as value if column is well ordered, false otherwise.
 fr.paris.lutece.util.ReferenceList getPageBuilderParamDefaultValues()
          Get the list of widget parameter default values
 fr.paris.lutece.util.ReferenceItem getPageBuilderParameterDefaultValue(java.lang.String strParameterKey)
          Get the parameter
 java.util.List<WidgetComponent> getWidgetComponents(int nColumn)
           
 java.util.Collection<Widget> getWidgetsList()
          Get the list of widgets that are not currently put on the default page builder
 void removeAllColumnStyleFromPageBuilderParameter()
          Remove all column styles
 void updatePageBuilderParameterDefaultValue(fr.paris.lutece.util.ReferenceItem param)
          Update a widget parameter default value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static DefaultPageBuilderService getInstance()
Return the unique instance

Returns:
The instance

getColumnCount

public int getColumnCount()
Returns the column count, with DefaultPageBuilderService#PROPERTY_COLUMN_COUNT. Default is CONSTANTE_DEFAULT_COLUMN_COUNT

Returns:
the column count

getWidgetComponents

public java.util.List<WidgetComponent> getWidgetComponents(int nColumn)
Parameters:
nColumn - the column id
Returns:
all WidgetComponent for this column

doMoveWidgetComponent

public void doMoveWidgetComponent(WidgetComponent widgetComponent,
                                  int nOldColumn,
                                  int nOldOrder,
                                  boolean bCreate)
Moves the widgetComponent.

Parameters:
widgetComponent - to move, with new values
nOldColumn - previous column id
nOldOrder - previous order
bCreate - true if this is a new widgetComponent, false otherwise.

getAllSetWidgetComponents

public java.util.Map<java.lang.String,java.util.List<WidgetComponent>> getAllSetWidgetComponents()
Finds all widgetComponent with column and order set.

Returns:
a map where key is the column id, and value is the column's widgetComponent list.

doReorderColumn

public void doReorderColumn(int nColumn)
Reorders column's widgetComponent

Parameters:
nColumn - the column to reorder

doRemoveWidgetComponent

public void doRemoveWidgetComponent(int nIdWidgetComponent)
Remove widget Component

Parameters:
nIdWidgetComponent - the ID of the widget component

doRemoveByColumnMax

public void doRemoveByColumnMax(int nColumnMax)
Remove widget Components that are in a column > to the given column max

Parameters:
nColumnMax - the column max

getOrderedColumnsStatus

public java.util.Map<java.lang.String,java.lang.Boolean> getOrderedColumnsStatus()
Builds the map to with column id as key, and true as value if column is well ordered, false otherwise.

Returns:
the map

getManageAdvancedParameters

public java.util.Map<java.lang.String,java.lang.Object> getManageAdvancedParameters(fr.paris.lutece.portal.business.user.AdminUser user)
Get the model to manage the advanced parameters

Parameters:
user - the current AdminUser
Returns:
the model

getPageBuilderParamDefaultValues

public fr.paris.lutece.util.ReferenceList getPageBuilderParamDefaultValues()
Get the list of widget parameter default values

Returns:
a ReferenceList

getPageBuilderParameterDefaultValue

public fr.paris.lutece.util.ReferenceItem getPageBuilderParameterDefaultValue(java.lang.String strParameterKey)
Get the parameter

Parameters:
strParameterKey - the parameter key
Returns:
a ReferenceItem

getWidgetsList

public java.util.Collection<Widget> getWidgetsList()
Get the list of widgets that are not currently put on the default page builder

Returns:
the list of widgets

updatePageBuilderParameterDefaultValue

public void updatePageBuilderParameterDefaultValue(fr.paris.lutece.util.ReferenceItem param)
Update a widget parameter default value

Parameters:
param - the parameter

removeAllColumnStyleFromPageBuilderParameter

public void removeAllColumnStyleFromPageBuilderParameter()
Remove all column styles


addNewPageBuilderParameter

public void addNewPageBuilderParameter(fr.paris.lutece.util.ReferenceItem param)
Add a new parameter

Parameters:
param - the parameter


Copyright © 2012 Mairie de Paris. All Rights Reserved.