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 java.lang.Object

ZipUtils


Field Summary
static java.lang.String ARCHIVE_STATE_ERROR
           
static java.lang.String ARCHIVE_STATE_FINAL
           
static java.lang.String ARCHIVE_STATE_INITIAL
           
static java.lang.String ARCHIVE_STATE_USED
           
static java.lang.String EXTENSION_FILE_PDF
           
static java.lang.String EXTENSION_FILE_ZIP
           
static java.lang.String PROPERTY_ZIP_NAME_REPOSITORY
           
 
Method Summary
 int doBasicZip(java.lang.String strFolderToArchive, java.lang.String strArchiveDestination, java.lang.String strArchiveName, java.lang.String strArchiveType)
          Method to do zip
 boolean doDeleteZip(java.lang.String strIdRecord, int nArchiveItemKey, int nIdKeyUser, int nIdDirectory, java.lang.String zipName)
          Method to delete zip
 int doGeneratePDFAndZip(javax.servlet.http.HttpServletRequest request, java.lang.String strName, int nIdKeyUser, int nIdDirectory, java.util.List<java.lang.Integer> listIdEntryConfig, int nIdRecord)
          Method to generate zip
 java.lang.String getStatutZip(int nArchiveItemKey)
          Method to get the zip status
 java.lang.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 java.lang.String ARCHIVE_STATE_INITIAL
See Also:
Constant Field Values

ARCHIVE_STATE_USED

public static final java.lang.String ARCHIVE_STATE_USED
See Also:
Constant Field Values

ARCHIVE_STATE_ERROR

public static final java.lang.String ARCHIVE_STATE_ERROR
See Also:
Constant Field Values

ARCHIVE_STATE_FINAL

public static final java.lang.String ARCHIVE_STATE_FINAL
See Also:
Constant Field Values

PROPERTY_ZIP_NAME_REPOSITORY

public static final java.lang.String PROPERTY_ZIP_NAME_REPOSITORY
See Also:
Constant Field Values

EXTENSION_FILE_ZIP

public static final java.lang.String EXTENSION_FILE_ZIP
See Also:
Constant Field Values

EXTENSION_FILE_PDF

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

doGeneratePDFAndZip

public int doGeneratePDFAndZip(javax.servlet.http.HttpServletRequest request,
                               java.lang.String strName,
                               int nIdKeyUser,
                               int nIdDirectory,
                               java.util.List<java.lang.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

doDeleteZip

public boolean doDeleteZip(java.lang.String strIdRecord,
                           int nArchiveItemKey,
                           int nIdKeyUser,
                           int nIdDirectory,
                           java.lang.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(java.lang.String strFolderToArchive,
                      java.lang.String strArchiveDestination,
                      java.lang.String strArchiveName,
                      java.lang.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 java.lang.String getStatutZip(int nArchiveItemKey)
Method to get the zip status

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

getUrlZip

public java.lang.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 © 2011 Mairie de Paris. All Rights Reserved.