fr.paris.lutece.plugins.directory.modules.pdfproducerarchive.service
Class ZipService

java.lang.Object
  extended by fr.paris.lutece.plugins.directory.modules.pdfproducerarchive.service.ZipService

public final class ZipService
extends Object

ZipUtils


Field Summary
static String ARCHIVE_STATE_ERROR
           
static String ARCHIVE_STATE_FINAL
           
static String ARCHIVE_STATE_INITIAL
           
static String ARCHIVE_STATE_USED
           
static String EXTENSION_FILE_PDF
           
static String EXTENSION_FILE_ZIP
           
static String PROPERTY_ZIP_NAME_REPOSITORY
           
 
Method Summary
 int doBasicZip(String strFolderToArchive, String strArchiveDestination, String strArchiveName, String strArchiveType)
          Method to do zip
 boolean doDeleteZip(String strIdRecord, int nArchiveItemKey, int nIdKeyUser, int nIdDirectory, String zipName)
          Method to delete zip
 int doGeneratePDFAndZip(fr.paris.lutece.portal.business.user.AdminUser adminUser, Locale locale, String strName, int nIdKeyUser, int nIdDirectory, List<Integer> listIdEntryConfig, int nIdRecord)
          Method to generate zip
 int doGeneratePDFAndZip(javax.servlet.http.HttpServletRequest request, String strName, int nIdKeyUser, int nIdDirectory, List<Integer> listIdEntryConfig, int nIdRecord)
          Method to generate zip
 String getStatutZip(int nArchiveItemKey)
          Method to get the zip status
 String getUrlZip(int nArchiveItemKey)
          Method to get the url zip
 void setArchiveClientService(fr.paris.lutece.plugins.archiveclient.service.archive.IArchiveClientService archiveClientService)
          Method to set _archiveClientService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ARCHIVE_STATE_INITIAL

public static final String ARCHIVE_STATE_INITIAL
See Also:
Constant Field Values

ARCHIVE_STATE_USED

public static final String ARCHIVE_STATE_USED
See Also:
Constant Field Values

ARCHIVE_STATE_ERROR

public static final String ARCHIVE_STATE_ERROR
See Also:
Constant Field Values

ARCHIVE_STATE_FINAL

public static final String ARCHIVE_STATE_FINAL
See Also:
Constant Field Values

PROPERTY_ZIP_NAME_REPOSITORY

public static final String PROPERTY_ZIP_NAME_REPOSITORY
See Also:
Constant Field Values

EXTENSION_FILE_ZIP

public static final String EXTENSION_FILE_ZIP
See Also:
Constant Field Values

EXTENSION_FILE_PDF

public static final String EXTENSION_FILE_PDF
See Also:
Constant Field Values
Method Detail

doGeneratePDFAndZip

public int doGeneratePDFAndZip(javax.servlet.http.HttpServletRequest request,
                               String strName,
                               int nIdKeyUser,
                               int nIdDirectory,
                               List<Integer> listIdEntryConfig,
                               int nIdRecord)
Method to generate zip

Parameters:
request - request
strName - directory name
nIdKeyUser - id key user
nIdDirectory - id directory
listIdEntryConfig - config to build pdf
nIdRecord - the id record
Returns:
the archive id

doGeneratePDFAndZip

public int doGeneratePDFAndZip(fr.paris.lutece.portal.business.user.AdminUser adminUser,
                               Locale locale,
                               String strName,
                               int nIdKeyUser,
                               int nIdDirectory,
                               List<Integer> listIdEntryConfig,
                               int nIdRecord)
Method to generate zip

Parameters:
adminUser - The adminUser
locale - The locale
strName - directory name
nIdKeyUser - id key user
nIdDirectory - id directory
listIdEntryConfig - config to build pdf
nIdRecord - the id record
Returns:
the archive id

doDeleteZip

public boolean doDeleteZip(String strIdRecord,
                           int nArchiveItemKey,
                           int nIdKeyUser,
                           int nIdDirectory,
                           String zipName)
Method to delete zip

Parameters:
strIdRecord - id record
nArchiveItemKey - id archive item
nIdKeyUser - id user key
nIdDirectory - id directory
zipName - zip name
Returns:
true if the zip is deleted otherwise false

doBasicZip

public int doBasicZip(String strFolderToArchive,
                      String strArchiveDestination,
                      String strArchiveName,
                      String strArchiveType)
Method to do zip

Parameters:
strFolderToArchive - path to the folder to archive
strArchiveDestination - path to the destination folder which will store the archive
strArchiveName - the name of the archive
strArchiveType - the archive type(zip,..)
Returns:
the archive id

getStatutZip

public String getStatutZip(int nArchiveItemKey)
Method to get the zip status

Parameters:
nArchiveItemKey - id of archive item
Returns:
the zip status

getUrlZip

public String getUrlZip(int nArchiveItemKey)
Method to get the url zip

Parameters:
nArchiveItemKey - id of archive item
Returns:
the url zip

setArchiveClientService

public void setArchiveClientService(fr.paris.lutece.plugins.archiveclient.service.archive.IArchiveClientService archiveClientService)
Method to set _archiveClientService

Parameters:
archiveClientService - archiveClientService


Copyright © 2013 Mairie de Paris. All Rights Reserved.