fr.paris.lutece.plugins.extend.modules.actionbar.business
Class ActionButtonHome

java.lang.Object
  extended by fr.paris.lutece.plugins.extend.modules.actionbar.business.ActionButtonHome

public final class ActionButtonHome
extends Object

Home for ActionButton management


Method Summary
static void create(ActionButton actionButton, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Create an action button
static void delete(ActionButton actionButton, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete an action button
static List<ActionButton> findActionButtons(List<Integer> listIdActions, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get a list of actions buttons from a list of ids
static List<ActionButton> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find every action button
static List<ActionButton> findAllByResourceType(String strResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the list of action buttons associated with a resource type.
static ActionButton findById(int nIdActionButton, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get an action button from its id
static ActionButton findByName(String strName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find an action button from its name
static int getNewOrder(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the next available order
static void update(ActionButton actionButton, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update an action button
static void updateActionButtonOrder(ActionButton action, int nNewOrder, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the order of an action button.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static void create(ActionButton actionButton,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Create an action button

Parameters:
actionButton - Action button to save
plugin - The plugin

findById

public static ActionButton findById(int nIdActionButton,
                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get an action button from its id

Parameters:
nIdActionButton - The id of the action button
plugin - The plugin
Returns:
The action button, or null if no action button has the given id

update

public static void update(ActionButton actionButton,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update an action button

Parameters:
actionButton - The action button to update
plugin - The plugin

delete

public static void delete(ActionButton actionButton,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete an action button

Parameters:
actionButton - The action button to delete
plugin - The plugin

findAll

public static List<ActionButton> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find every action button

Parameters:
plugin - The plugin
Returns:
The list of action buttons

findAllByResourceType

public static List<ActionButton> findAllByResourceType(String strResourceType,
                                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of action buttons associated with a resource type. Action buttons associated with every resource types are also returned.

Parameters:
strResourceType - The resource type of buttons
plugin - The plugin
Returns:
The list of action buttons

findByName

public static ActionButton findByName(String strName,
                                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find an action button from its name

Parameters:
strName - The name of the action button
plugin - The plugin
Returns:
The action button, or null if no action button is associated with the given name

findActionButtons

public static List<ActionButton> findActionButtons(List<Integer> listIdActions,
                                                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get a list of actions buttons from a list of ids

Parameters:
listIdActions - The list of ids of action buttons to get
plugin - The plugin
Returns:
The list of action button, or an empty list if the specified list is null or empty, or if no action buttons was found

updateActionButtonOrder

public static void updateActionButtonOrder(ActionButton action,
                                           int nNewOrder,
                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the order of an action button. The order of the given action button is set to the new value, and the action button that had this order gets the old order of the updated one.

Parameters:
action - The action button to move. The order attribute of the action button MUST be its old order.
nNewOrder - The new order of the topic
plugin - The plugin

getNewOrder

public static int getNewOrder(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the next available order

Parameters:
plugin - The plugin
Returns:
The next available order


Copyright © 2013 Mairie de Paris. All Rights Reserved.