it.eng.spagobi.importexport
Interface IImportManager

All Known Implementing Classes:
ImportManager

public interface IImportManager


Method Summary
 void checkExistingMetadata()
          Check the existance of the exported metadata into the current system metadata and insert their associations into the association object MeatadataAssociation
 void checkRoleReferences(java.util.Map roleAssociations)
          checks if two or more exported roles are associate to the same current role
 ImportResultInfo commitAllChanges()
          Commits all changes made on exported and current databases
 java.lang.String getCurrentVersion()
          Gets the current SpagobI version
 java.lang.Object getExistingObject(java.lang.Integer id, java.lang.Class objClass)
          Get an existing object identified by the id and the class
 java.util.List getExportedConnections()
          Gets the list of exported connections
 java.util.List getExportedEngines()
          Gets the list of all exported engines
 java.lang.Object getExportedObject(java.lang.Integer id, java.lang.Class objClass)
          Get an exported object identified by the id and the class
 java.util.List getExportedRoles()
          Gets the list of all exported roles
 java.lang.String getExportVersion()
          Gets the SpagoBI version of the exported file
 MetadataAssociations getMetadataAssociation()
          Gets the object which contains the association between exported metadata and the current system metadata
 UserAssociationsKeeper getUserAssociation()
          Gets the object which contains only the association set by user between exported metadata and the current system metadata
 void importObjects()
          Imports the exported objects
 void prepareImport(java.lang.String pathImportTmpFold, java.lang.String archiveName, byte[] archiveContent)
          Prepare the environment for the import procedure
 void stopImport()
          Ends the import procedure
 

Method Detail

prepareImport

void prepareImport(java.lang.String pathImportTmpFold,
                   java.lang.String archiveName,
                   byte[] archiveContent)
                   throws it.eng.spago.error.EMFUserError
Prepare the environment for the import procedure

Parameters:
pathImpTmpFold - The path of the temporary import folder
archiveName - the name of the compress exported file
archiveContent - the bytes of the compress exported file
Throws:
it.eng.spago.error.EMFUserError

getExportVersion

java.lang.String getExportVersion()
Gets the SpagoBI version of the exported file

Returns:
The SpagoBI version of the exported file

getCurrentVersion

java.lang.String getCurrentVersion()
Gets the current SpagobI version

Returns:
The current SpagoBI version

importObjects

void importObjects()
                   throws it.eng.spago.error.EMFUserError
Imports the exported objects

Throws:
it.eng.spago.error.EMFUserError

getExportedRoles

java.util.List getExportedRoles()
                                throws it.eng.spago.error.EMFUserError
Gets the list of all exported roles

Returns:
The list of exported roles
Throws:
it.eng.spago.error.EMFUserError

getExportedEngines

java.util.List getExportedEngines()
                                  throws it.eng.spago.error.EMFUserError
Gets the list of all exported engines

Returns:
The list of exported engines
Throws:
it.eng.spago.error.EMFUserError

getExportedConnections

java.util.List getExportedConnections()
                                      throws it.eng.spago.error.EMFUserError
Gets the list of exported connections

Returns:
List of the exported connections
Throws:
it.eng.spago.error.EMFUserError

commitAllChanges

ImportResultInfo commitAllChanges()
                                  throws it.eng.spago.error.EMFUserError
Commits all changes made on exported and current databases

Returns:
String, the path of the log file
Throws:
it.eng.spago.error.EMFUserError

checkExistingMetadata

void checkExistingMetadata()
                           throws it.eng.spago.error.EMFUserError
Check the existance of the exported metadata into the current system metadata and insert their associations into the association object MeatadataAssociation

Throws:
it.eng.spago.error.EMFUserError

stopImport

void stopImport()
Ends the import procedure


getMetadataAssociation

MetadataAssociations getMetadataAssociation()
Gets the object which contains the association between exported metadata and the current system metadata

Returns:
MetadataAssociation the object which contains the association between exported metadata and the current system metadata

getUserAssociation

UserAssociationsKeeper getUserAssociation()
Gets the object which contains only the association set by user between exported metadata and the current system metadata

Returns:
MetadataAssociation the object which contains the association, set by user, between exported metadata and the current system metadata

checkRoleReferences

void checkRoleReferences(java.util.Map roleAssociations)
                         throws it.eng.spago.error.EMFUserError
checks if two or more exported roles are associate to the same current role

Parameters:
roleAssociations - Map of association between exported roles and roles of the portal in use
Throws:
it.eng.spago.error.EMFUserError - if two ore more exported roles are associate to the same current role

getExistingObject

java.lang.Object getExistingObject(java.lang.Integer id,
                                   java.lang.Class objClass)
Get an existing object identified by the id and the class

Parameters:
id - The Object id
objClass - The class of the object
tx - Hibernate transaction for the current database
session - Hibernate session for the current database
Returns:
The existing hibernate object

getExportedObject

java.lang.Object getExportedObject(java.lang.Integer id,
                                   java.lang.Class objClass)
Get an exported object identified by the id and the class

Parameters:
id - The Object id
objClass - The class of the object
tx - Hibernate transaction for the exported database
session - Hibernate session for the exported database
Returns:
The existing hibernate object