fr.paris.lutece.plugins.greetingscard.business
Class GreetingsCardTemplateHome

java.lang.Object
  extended by fr.paris.lutece.plugins.greetingscard.business.GreetingsCardTemplateHome

public final class GreetingsCardTemplateHome
extends java.lang.Object

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


Method Summary
static void addDirectory(java.lang.String strDirName)
          Add a new directory.
static void addGreetingsCardTemplate(org.apache.commons.fileupload.FileItem fFile, java.io.File fFileDest)
          Add a new Greetings card Template
static void copy(GreetingsCardTemplate gct, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Copy the Greetings Card Template
static GreetingsCardTemplate create(GreetingsCardTemplate greetingsCardTemplate, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Creation of an instance of an article GreetingsCardTemplate
static java.util.Collection<GreetingsCardTemplate> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns GreetingsCardTemplate list
static GreetingsCardTemplate findByPrimaryKey(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns an instance of the article GreetingsCardTemplate whose identifier is specified in parameter
static java.lang.String getPicture(java.lang.String pathDirectory, java.lang.String strPluginName)
          Get the picture of a greetings card template
static void remove(int nIdGCT, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Deletes the GreetingsCardTemplate instance whose identifier is specified in parameter
static void removeDirectory(java.lang.String strDirName)
          Remove a directory.
static void removeGreetingsCardTemplate(java.lang.String strFile)
          Remove a greetings card template
static GreetingsCardTemplate update(GreetingsCardTemplate greetingsCardTemplate, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Updates of the GreetingsCardTemplate instance specified in parameter
static void updateGreetingsCardTemplate(org.apache.commons.fileupload.FileItem fFileItem, java.io.File fFileDest)
          Update a greetings card template
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static GreetingsCardTemplate create(GreetingsCardTemplate greetingsCardTemplate,
                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Creation of an instance of an article GreetingsCardTemplate

Parameters:
greetingsCardTemplate - An instance of the GreetingsCardTemplate which contains the informations to store
plugin - The plugin
Returns:
The instance of the GreetingsCardTemplate which has been created

update

public static GreetingsCardTemplate update(GreetingsCardTemplate greetingsCardTemplate,
                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Updates of the GreetingsCardTemplate instance specified in parameter

Parameters:
greetingsCardTemplate - An instance of the GreetingsCardTemplate which contains the informations to store
plugin - The plugin
Returns:
The instance of the GreetingsCardTemplate which has been updated.

remove

public static void remove(int nIdGCT,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
Deletes the GreetingsCardTemplate instance whose identifier is specified in parameter

Parameters:
nIdGCT - The identifier of the article GreetingsCardTemplate to delete in the database
plugin - The plugin

findByPrimaryKey

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

Parameters:
nKey - The primary key of the article to find in the database
plugin - The plugin
Returns:
An instance of the GreetingsCardTemplate which corresponds to the key

findAll

public static java.util.Collection<GreetingsCardTemplate> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns GreetingsCardTemplate list

Parameters:
plugin - The plugin
Returns:
the list of the GreetingsCardTemplate of the database in form of a GreetingsCardTemplate Collection object

addGreetingsCardTemplate

public static void addGreetingsCardTemplate(org.apache.commons.fileupload.FileItem fFile,
                                            java.io.File fFileDest)
                                     throws java.io.IOException
Add a new Greetings card Template

Parameters:
fFile - The source file
fFileDest - The new file which will create
Throws:
java.io.IOException - For file access exception

updateGreetingsCardTemplate

public static void updateGreetingsCardTemplate(org.apache.commons.fileupload.FileItem fFileItem,
                                               java.io.File fFileDest)
                                        throws java.io.IOException
Update a greetings card template

Parameters:
fFileItem - The source file
fFileDest - The new file which will update
Throws:
java.io.IOException - For file access exception

removeGreetingsCardTemplate

public static void removeGreetingsCardTemplate(java.lang.String strFile)
Remove a greetings card template

Parameters:
strFile - The name of the deleted file

addDirectory

public static void addDirectory(java.lang.String strDirName)
Add a new directory.

Parameters:
strDirName - The name of the new directory.

removeDirectory

public static void removeDirectory(java.lang.String strDirName)
Remove a directory.

Parameters:
strDirName - The name of the directory.

getPicture

public static java.lang.String getPicture(java.lang.String pathDirectory,
                                          java.lang.String strPluginName)
                                   throws fr.paris.lutece.util.filesystem.DirectoryNotFoundException
Get the picture of a greetings card template

Parameters:
pathDirectory - The directory.
strPluginName - The name of the plugin.
Returns:
The requested images.
Throws:
fr.paris.lutece.util.filesystem.DirectoryNotFoundException - if the directory does not exist.

copy

public static void copy(GreetingsCardTemplate gct,
                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
Copy the Greetings Card Template

Parameters:
gct - The Greetings Card Template
plugin - The Plugin


Copyright © 2012 Mairie de Paris. All Rights Reserved.