it.eng.spagobi.engines.dossier.dao
Class DossierDAOHibImpl

java.lang.Object
  extended by it.eng.spagobi.commons.dao.AbstractHibernateDAO
      extended by it.eng.spagobi.engines.dossier.dao.DossierDAOHibImpl
All Implemented Interfaces:
ISpagoBIDao, IDossierDAO

public class DossierDAOHibImpl
extends AbstractHibernateDAO
implements IDossierDAO

IDossierDAO implementation using database and hibernate mapping

Author:
Zerbetto (davide.zerbetto@eng.it)
See Also:
it.eng.spagobi.engines.dossier.dao.IDossierDAO

Field Summary
static java.lang.String DOSSIER_CONF_FILE_NAME
           
static java.io.File tempBaseFolder
           
static java.lang.String TEMPLATE_FILE_NAME
           
 
Fields inherited from class it.eng.spagobi.commons.dao.AbstractHibernateDAO
TENANT_FILTER_NAME
 
Constructor Summary
DossierDAOHibImpl()
           
 
Method Summary
 void addConfiguredDocument(ConfiguredBIDocument doc, java.lang.String pathTempFolder)
          Adds the configured document.
 void clean(java.lang.String pathTempFolder)
          Clean.
static void copyInputStream(java.io.InputStream in, java.io.OutputStream out)
          Copy input stream.
 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.
 
Methods inherited from class it.eng.spagobi.commons.dao.AbstractHibernateDAO
commitIfActiveAndClose, disableTenantFilter, enableTenantFilter, getSession, getTenant, getUserProfile, logException, rollbackIfActiveAndClose, setTenant, setUserID, setUserProfile, updateSbiCommonInfo4Insert, updateSbiCommonInfo4Update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.eng.spagobi.commons.dao.ISpagoBIDao
getUserProfile, setTenant, setUserID, setUserProfile
 

Field Detail

TEMPLATE_FILE_NAME

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

DOSSIER_CONF_FILE_NAME

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

tempBaseFolder

public static java.io.File tempBaseFolder
Constructor Detail

DossierDAOHibImpl

public DossierDAOHibImpl()
Method Detail

init

public java.lang.String init(BIObject dossier)
Description copied from interface: IDossierDAO
Inits the.

Specified by:
init in interface IDossierDAO
Parameters:
dossier - the dossier
Returns:
the string

storeTemplate

public void storeTemplate(java.lang.Integer dossierId,
                          java.lang.String pathTempFolder)
Description copied from interface: IDossierDAO
Store template.

Specified by:
storeTemplate in interface IDossierDAO
Parameters:
dossierId - the dossier id
pathTempFolder - the path temp folder

copyInputStream

public static final void copyInputStream(java.io.InputStream in,
                                         java.io.OutputStream out)
                                  throws java.io.IOException
Copy input stream.

Parameters:
in - the in
out - the out
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

addConfiguredDocument

public void addConfiguredDocument(ConfiguredBIDocument doc,
                                  java.lang.String pathTempFolder)
Description copied from interface: IDossierDAO
Adds the configured document.

Specified by:
addConfiguredDocument in interface IDossierDAO
Parameters:
doc - the doc
pathTempFolder - the path temp folder

deleteConfiguredDocument

public void deleteConfiguredDocument(java.lang.String docLogicalName,
                                     java.lang.String pathTempFolder)
Description copied from interface: IDossierDAO
Delete configured document.

Specified by:
deleteConfiguredDocument in interface IDossierDAO
Parameters:
docLogicalName - the doc logical name
pathTempFolder - the path temp folder

getProcessDefinitionContent

public java.io.InputStream getProcessDefinitionContent(java.lang.String pathTempFolder)
Description copied from interface: IDossierDAO
Gets the process definition content.

Specified by:
getProcessDefinitionContent in interface IDossierDAO
Parameters:
pathTempFolder - the path temp folder
Returns:
the process definition content

getProcessDefinitionFileName

public java.lang.String getProcessDefinitionFileName(java.lang.String pathTempFolder)
Description copied from interface: IDossierDAO
Gets the process definition file name.

Specified by:
getProcessDefinitionFileName in interface IDossierDAO
Parameters:
pathTempFolder - the path temp folder
Returns:
the process definition file name

getPresentationTemplateContent

public java.io.InputStream getPresentationTemplateContent(java.lang.String pathTempFolder)
Description copied from interface: IDossierDAO
Gets the presentation template content.

Specified by:
getPresentationTemplateContent in interface IDossierDAO
Parameters:
pathTempFolder - the path temp folder
Returns:
the presentation template content

getPresentationTemplateFileName

public java.lang.String getPresentationTemplateFileName(java.lang.String pathTempFolder)
Description copied from interface: IDossierDAO
Gets the presentation template file name.

Specified by:
getPresentationTemplateFileName in interface IDossierDAO
Parameters:
pathTempFolder - the path temp folder
Returns:
the presentation template file name

getConfiguredDocument

public ConfiguredBIDocument getConfiguredDocument(java.lang.String docLogicalName,
                                                  java.lang.String pathTempFolder)
Description copied from interface: IDossierDAO
Gets the configured document.

Specified by:
getConfiguredDocument in interface IDossierDAO
Parameters:
docLogicalName - the doc logical name
pathTempFolder - the path temp folder
Returns:
the configured document

getConfiguredDocumentList

public java.util.List getConfiguredDocumentList(java.lang.String pathTempFolder)
Description copied from interface: IDossierDAO
Gets the configured document list.

Specified by:
getConfiguredDocumentList in interface IDossierDAO
Parameters:
pathTempFolder - the path temp folder
Returns:
the configured document list

storeProcessDefinitionFile

public void storeProcessDefinitionFile(java.lang.String pdFileName,
                                       byte[] pdFileContent,
                                       java.lang.String pathTempFolder)
Description copied from interface: IDossierDAO
Store process definition file.

Specified by:
storeProcessDefinitionFile in interface IDossierDAO
Parameters:
pdFileName - the pd file name
pdFileContent - the pd file content
pathTempFolder - the path temp folder

storePresentationTemplateFile

public void storePresentationTemplateFile(java.lang.String templateFileName,
                                          byte[] templateContent,
                                          java.lang.String pathTempFolder)
Description copied from interface: IDossierDAO
Store presentation template file.

Specified by:
storePresentationTemplateFile in interface IDossierDAO
Parameters:
templateFileName - the template file name
templateContent - the template content
pathTempFolder - the path temp folder

getDossierId

public java.lang.Integer getDossierId(java.lang.String pathTempFolder)
Description copied from interface: IDossierDAO
Gets the dossier id.

Specified by:
getDossierId in interface IDossierDAO
Parameters:
pathTempFolder - the path temp folder
Returns:
the dossier id

clean

public void clean(java.lang.String pathTempFolder)
Description copied from interface: IDossierDAO
Clean.

Specified by:
clean in interface IDossierDAO
Parameters:
pathTempFolder - the path temp folder