fr.paris.lutece.plugins.pluginwizard.business.model
Class ResourceKeyHome

java.lang.Object
  extended by fr.paris.lutece.plugins.pluginwizard.business.model.ResourceKeyHome

public final class ResourceKeyHome
extends java.lang.Object

This class provides instances management methods (create, find, ...) for ResourceKey objects


Method Summary
static void addEmptyKeys(int nPluginId, java.util.ArrayList<java.lang.String> listKeys, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Persists the i18n keys
static ResourceKey create(ResourceKey resourceKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Create an instance of the resourceKey class
static void deleteKeysByPlugin(int nPluginId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Deletes all the resources for a generated plugin
static ResourceKey findByPrimaryKey(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns an instance of a resourceKey whose identifier is specified in parameter
static java.util.Collection<ResourceKey> getResourceKeysList(int nPluginId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the resourceKey objects and returns them in form of a collection
static java.util.Collection<ResourceKey> getResourceKeysList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the resourceKey objects and returns them in form of a collection
static boolean isEmpty(int nPluginId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Verifies if the keys have been generated for the plugin
static boolean isValid(int nPluginId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the resourceKey objects and returns them in form of a collection
static void remove(int nResourceKeyId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove the resourceKey whose identifier is specified in parameter
static void removeResourcesByPlugin(int nIdPlugin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Removes i18n ressources by plugin
static ResourceKey update(ResourceKey resourceKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update of the resourceKey which is specified in parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

removeResourcesByPlugin

public static void removeResourcesByPlugin(int nIdPlugin,
                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Removes i18n ressources by plugin

Parameters:
nIdPlugin - The id of the plugin
plugin - The plugin

create

public static ResourceKey create(ResourceKey resourceKey,
                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
Create an instance of the resourceKey class

Parameters:
resourceKey - The instance of the ResourceKey which contains the informations to store
plugin - the Plugin
Returns:
The instance of resourceKey which has been created with its primary key.

update

public static ResourceKey update(ResourceKey resourceKey,
                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update of the resourceKey which is specified in parameter

Parameters:
resourceKey - The instance of the ResourceKey which contains the data to store
plugin - the Plugin
Returns:
The instance of the resourceKey which has been updated

remove

public static void remove(int nResourceKeyId,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove the resourceKey whose identifier is specified in parameter

Parameters:
nResourceKeyId - The resourceKey Id
plugin - the Plugin

findByPrimaryKey

public static ResourceKey findByPrimaryKey(int nKey,
                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns an instance of a resourceKey whose identifier is specified in parameter

Parameters:
nKey - The resourceKey primary key
plugin - the Plugin
Returns:
an instance of ResourceKey

getResourceKeysList

public static java.util.Collection<ResourceKey> getResourceKeysList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the resourceKey objects and returns them in form of a collection

Parameters:
plugin - the Plugin
Returns:
the collection which contains the data of all the resourceKey objects

getResourceKeysList

public static java.util.Collection<ResourceKey> getResourceKeysList(int nPluginId,
                                                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the resourceKey objects and returns them in form of a collection

Parameters:
nPluginId - The identifier of the generated plugin
plugin - the Plugin
Returns:
the collection which contains the data of all the resourceKey objects

isValid

public static boolean isValid(int nPluginId,
                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the resourceKey objects and returns them in form of a collection

Parameters:
nPluginId - The identifier of the generated plugin
plugin - the Plugin
Returns:
the collection which contains the data of all the resourceKey objects

addEmptyKeys

public static void addEmptyKeys(int nPluginId,
                                java.util.ArrayList<java.lang.String> listKeys,
                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
Persists the i18n keys

Parameters:
nPluginId - The id of the plugin
listKeys - The i18n keys
plugin - The plugin

isEmpty

public static boolean isEmpty(int nPluginId,
                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
Verifies if the keys have been generated for the plugin

Parameters:
nPluginId - The id of the generated plugin
plugin - The plugin
Returns:
A boolean value

deleteKeysByPlugin

public static void deleteKeysByPlugin(int nPluginId,
                                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Deletes all the resources for a generated plugin

Parameters:
nPluginId - The Plugin Id
plugin - The Plugin


Copyright © 2012 Mairie de Paris. All Rights Reserved.