fr.paris.lutece.plugins.form.business
Class FormHome

java.lang.Object
  extended by fr.paris.lutece.plugins.form.business.FormHome

public final class FormHome
extends Object

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


Method Summary
static void copy(Form form, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Copy of an instance of Form
static int create(Form form, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Creation of an instance of Form
static Form findByPrimaryKey(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns an instance of a Form whose identifier is specified in parameter
static List<Integer> getAnonymizeEntryList(int nIdForm, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the list of entries of a form to anonymize
static List<Form> getFormList(FormFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the form who verify the filter and returns them in a list
static fr.paris.lutece.util.ReferenceList getFormList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all enable form returns them in a reference list
static List<Form> getFormListForAutomaticCleaning(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the list of forms that must be cleaned automatically.
static Map<Integer,fr.paris.lutece.portal.business.style.Theme> getXPageThemes(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the xpage themes for all forms
static void insertAnonymizeEntry(int nIdForm, int nIdEntry, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert an entry in the anonymize entries table
static void remove(int nIdForm, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove the form whose identifier is specified in parameter
static void removeAnonymizeEntry(int nIdForm, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove entries in the anonymize entries table
static void update(Form form, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update of the form 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

create

public static int create(Form form,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Creation of an instance of Form

Parameters:
form - The instance of the Form which contains the informations to store
plugin - the Plugin
Returns:
The primary key of the new form.

copy

public static void copy(Form form,
                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
Copy of an instance of Form

Parameters:
form - The instance of the Form who must copy
plugin - the Plugin

update

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

Parameters:
form - The instance of the Form which contains the informations to update
plugin - the Plugin

remove

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

Parameters:
nIdForm - The form Id
plugin - the Plugin

findByPrimaryKey

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

Parameters:
nKey - The entry primary key
plugin - the Plugin
Returns:
an instance of Form

getFormList

public static List<Form> getFormList(FormFilter filter,
                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the form who verify the filter and returns them in a list

Parameters:
filter - the filter
plugin - the plugin
Returns:
the list of form

getFormListForAutomaticCleaning

public static List<Form> getFormListForAutomaticCleaning(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of forms that must be cleaned automatically. Only id, automatic cleaning and cleaning by removal attributes or form are fetched.

Parameters:
plugin - The plugin
Returns:
the list of form, or an empty list if no form was found. Only id, automatic cleaning and cleaning by removal attributes or form are fetched.

getFormList

public static fr.paris.lutece.util.ReferenceList getFormList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all enable form returns them in a reference list

Parameters:
plugin - the plugin
Returns:
a reference list of enable form

getXPageThemes

public static Map<Integer,fr.paris.lutece.portal.business.style.Theme> getXPageThemes(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the xpage themes for all forms

Parameters:
plugin - The plugin
Returns:
A map of themes associated with form ids

getAnonymizeEntryList

public static List<Integer> getAnonymizeEntryList(int nIdForm,
                                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of entries of a form to anonymize

Parameters:
nIdForm - The id of the form
plugin - The plugin
Returns:
The list of ids of entries to anonymize, or an empty list if the form was not fount or if no entries of this form should be anonymized

insertAnonymizeEntry

public static void insertAnonymizeEntry(int nIdForm,
                                        int nIdEntry,
                                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert an entry in the anonymize entries table

Parameters:
nIdForm - The id of the form the entry is associated with
nIdEntry - The id of the entry to anonymize
plugin - The plugin

removeAnonymizeEntry

public static void removeAnonymizeEntry(int nIdForm,
                                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove entries in the anonymize entries table

Parameters:
nIdForm - The id of the form
plugin - The plugin


Copyright © 2014 Mairie de Paris. All Rights Reserved.