it.eng.spagobi.engines.dossier.dao
Interface IDossierDAO

All Known Implementing Classes:
DossierDAOHibImpl

public interface IDossierDAO

Defines all the methods needed for access contents of dossier template.
Dossier template is a zip file containing the presentation template (.ppt),
the process definition file (.xml file) and dossier configuration file (.sbidossier file).
The first operation you must perform is to unzipped the template using the init method:
this method returns the path of the temporary folder where template was unzipped:
this path is built as BASE_TEMP_FOLDER + DOSSIER_ID + UUID where:
BASE_TEMP_FOLDER is the temporary base folder configured in dossier.xml;
DOSSIER_ID is the document id;
UUID is a time based random string.
You have to keep this path in order to invoke other methods (those methods work on this folder). The storeTemplate method builds the new zip template file and saves it into the database. Then you can invoke clean method in order to delete temporary folder.

Author:
Zerbetto (davide.zerbetto@eng.it)

Method Summary
 void addConfiguredDocument(ConfiguredBIDocument doc, java.lang.String pathTempFolder)
          Adds the configured document.
 void clean(java.lang.String pathTempFolder)
          Clean.
 void deleteConfiguredDocument(java.lang.String docLogicalName, java.lang.String pathTempFolder)
          Delete configured document.
 ConfiguredBIDocument getConfiguredDocument(java.lang.String docLogicalName, java.lang.String pathTempFolder)
          Gets the configured document.
 java.util.List getConfiguredDocumentList(java.lang.String pathTempFolder)
          Gets the configured document list.
 java.lang.Integer getDossierId(java.lang.String pathTempFolder)
          Gets the dossier id.
 java.io.InputStream getPresentationTemplateContent(java.lang.String pathTempFolder)
          Gets the presentation template content.
 java.lang.String getPresentationTemplateFileName(java.lang.String pathTempFolder)
          Gets the presentation template file name.
 java.io.InputStream getProcessDefinitionContent(java.lang.String pathTempFolder)
          Gets the process definition content.
 java.lang.String getProcessDefinitionFileName(java.lang.String pathTempFolder)
          Gets the process definition file name.
 java.lang.String init(BIObject dossier)
          Inits the.
 void storePresentationTemplateFile(java.lang.String templateFileName, byte[] templateContent, java.lang.String pathTempFolder)
          Store presentation template file.
 void storeProcessDefinitionFile(java.lang.String pdFileName, byte[] pdFileContent, java.lang.String pathTempFolder)
          Store process definition file.
 void storeTemplate(java.lang.Integer dossierId, java.lang.String pathTempFolder)
          Store template.
 

Method Detail

init

java.lang.String init(BIObject dossier)
Inits the.

Parameters:
dossier - the dossier
Returns:
the string

clean

void clean(java.lang.String pathTempFolder)
Clean.

Parameters:
pathTempFolder - the path temp folder

storeTemplate

void storeTemplate(java.lang.Integer dossierId,
                   java.lang.String pathTempFolder)
Store template.

Parameters:
dossierId - the dossier id
pathTempFolder - the path temp folder

getDossierId

java.lang.Integer getDossierId(java.lang.String pathTempFolder)
Gets the dossier id.

Parameters:
pathTempFolder - the path temp folder
Returns:
the dossier id

getConfiguredDocumentList

java.util.List getConfiguredDocumentList(java.lang.String pathTempFolder)
Gets the configured document list.

Parameters:
pathTempFolder - the path temp folder
Returns:
the configured document list

addConfiguredDocument

void addConfiguredDocument(ConfiguredBIDocument doc,
                           java.lang.String pathTempFolder)
Adds the configured document.

Parameters:
doc - the doc
pathTempFolder - the path temp folder

deleteConfiguredDocument

void deleteConfiguredDocument(java.lang.String docLogicalName,
                              java.lang.String pathTempFolder)
Delete configured document.

Parameters:
docLogicalName - the doc logical name
pathTempFolder - the path temp folder

getConfiguredDocument

ConfiguredBIDocument getConfiguredDocument(java.lang.String docLogicalName,
                                           java.lang.String pathTempFolder)
Gets the configured document.

Parameters:
docLogicalName - the doc logical name
pathTempFolder - the path temp folder
Returns:
the configured document

storePresentationTemplateFile

void storePresentationTemplateFile(java.lang.String templateFileName,
                                   byte[] templateContent,
                                   java.lang.String pathTempFolder)
Store presentation template file.

Parameters:
templateFileName - the template file name
templateContent - the template content
pathTempFolder - the path temp folder

getPresentationTemplateFileName

java.lang.String getPresentationTemplateFileName(java.lang.String pathTempFolder)
Gets the presentation template file name.

Parameters:
pathTempFolder - the path temp folder
Returns:
the presentation template file name

getPresentationTemplateContent

java.io.InputStream getPresentationTemplateContent(java.lang.String pathTempFolder)
Gets the presentation template content.

Parameters:
pathTempFolder - the path temp folder
Returns:
the presentation template content

storeProcessDefinitionFile

void storeProcessDefinitionFile(java.lang.String pdFileName,
                                byte[] pdFileContent,
                                java.lang.String pathTempFolder)
Store process definition file.

Parameters:
pdFileName - the pd file name
pdFileContent - the pd file content
pathTempFolder - the path temp folder

getProcessDefinitionFileName

java.lang.String getProcessDefinitionFileName(java.lang.String pathTempFolder)
Gets the process definition file name.

Parameters:
pathTempFolder - the path temp folder
Returns:
the process definition file name

getProcessDefinitionContent

java.io.InputStream getProcessDefinitionContent(java.lang.String pathTempFolder)
Gets the process definition content.

Parameters:
pathTempFolder - the path temp folder
Returns:
the process definition content