|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.eng.spagobi.tools.importexport.ImportManager
public class ImportManager
Implements the interface which defines methods for managing the import requests
Field Summary |
---|
Fields inherited from interface it.eng.spagobi.tools.importexport.IImportManager |
---|
IMPORT_ASS_DEFAULT_MODE, IMPORT_ASS_PREDEFINED_MODE |
Constructor Summary | |
---|---|
ImportManager()
|
Method Summary | |
---|---|
boolean |
associateAllExportedDataSourcesByUserAssociation()
Tries to associate all exported data sources using the user associations; returns true is some data sources associations is required, false otherwise. |
boolean |
associateAllExportedEnginesByUserAssociation()
Tries to associate all exported engines using the user associations; returns true is some engines associations is required, false otherwise. |
boolean |
associateAllExportedRolesByUserAssociation()
Tries to associate all exported roles using the user associations; returns true is some roles associations is required, false otherwise. |
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. |
void |
closeSession()
Close session to exported and current databases. |
ImportResultInfo |
commitAllChanges()
Commits all changes made on exported and current databases. |
AssociationFile |
getAssociationFile()
Returns the AssociationFile involved in the current import operation, if any. |
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 |
getExportedDataSources()
Gets the list of exported data sources. |
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. |
java.lang.String |
getImpAssMode()
Gets the import association mode. |
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(boolean overwrite,
it.eng.spago.base.SessionContainer session)
Imports the exported objects. |
void |
init(java.lang.String pathImpTmpFold,
java.lang.String archiveName,
byte[] archiveContent)
Prepare the environment for the import procedure. |
void |
openSession()
Open session to exported and current databases. |
void |
setAssociationFile(AssociationFile associationFile)
Sets the AssociationFile involved in the current import operation. |
void |
setImpAssMode(java.lang.String impAssMode)
Sets the import association mode. |
void |
stopImport()
Ends the import procedure. |
void |
updateDataSourceReferences(java.util.Map mapDataSources)
Update the data source name for each list of values of type query based on association between exported data sources and current system data sources. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImportManager()
Method Detail |
---|
public void init(java.lang.String pathImpTmpFold, java.lang.String archiveName, byte[] archiveContent) throws it.eng.spago.error.EMFUserError
init
in interface IImportManager
pathImpTmpFold
- The path of the temporary import folderarchiveName
- the name of the compress exported filearchiveContent
- the bytes of the compress exported file
it.eng.spago.error.EMFUserError
- the EMF user errorpublic void openSession() throws it.eng.spago.error.EMFUserError
IImportManager
openSession
in interface IImportManager
it.eng.spago.error.EMFUserError
- the EMF user errorpublic void closeSession()
IImportManager
closeSession
in interface IImportManager
public void importObjects(boolean overwrite, it.eng.spago.base.SessionContainer session) throws it.eng.spago.error.EMFUserError
importObjects
in interface IImportManager
overwrite
- the overwrite
it.eng.spago.error.EMFUserError
- the EMF user errorpublic java.lang.String getExportVersion()
getExportVersion
in interface IImportManager
public java.lang.String getCurrentVersion()
getCurrentVersion
in interface IImportManager
public java.util.List getExportedRoles() throws it.eng.spago.error.EMFUserError
getExportedRoles
in interface IImportManager
it.eng.spago.error.EMFUserError
- the EMF user errorpublic java.util.List getExportedEngines() throws it.eng.spago.error.EMFUserError
getExportedEngines
in interface IImportManager
it.eng.spago.error.EMFUserError
- the EMF user errorpublic void checkRoleReferences(java.util.Map roleAssociations) throws it.eng.spago.error.EMFUserError
checkRoleReferences
in interface IImportManager
roleAssociations
- Map of assocaition between exported roles and roles of the
portal in use
it.eng.spago.error.EMFUserError
- if two ore more exported roles are associate to the same
current rolepublic void updateDataSourceReferences(java.util.Map mapDataSources) throws it.eng.spago.error.EMFUserError
mapDataSources
- Map of the associations between exported data sources and
current system data sources
it.eng.spago.error.EMFUserError
- the EMF user errorpublic ImportResultInfo commitAllChanges() throws it.eng.spago.error.EMFUserError
commitAllChanges
in interface IImportManager
it.eng.spago.error.EMFUserError
- the EMF user errorpublic void stopImport()
stopImport
in interface IImportManager
public java.util.List getExportedDataSources() throws it.eng.spago.error.EMFUserError
getExportedDataSources
in interface IImportManager
it.eng.spago.error.EMFUserError
- the EMF user errorpublic void checkExistingMetadata() throws it.eng.spago.error.EMFUserError
checkExistingMetadata
in interface IImportManager
it.eng.spago.error.EMFUserError
- the EMF user errorpublic MetadataAssociations getMetadataAssociation()
getMetadataAssociation
in interface IImportManager
public java.lang.Object getExistingObject(java.lang.Integer id, java.lang.Class objClass)
IImportManager
getExistingObject
in interface IImportManager
id
- The Object idobjClass
- The class of the object
public java.lang.Object getExportedObject(java.lang.Integer id, java.lang.Class objClass)
IImportManager
getExportedObject
in interface IImportManager
id
- The Object idobjClass
- The class of the object
public UserAssociationsKeeper getUserAssociation()
IImportManager
getUserAssociation
in interface IImportManager
public java.lang.String getImpAssMode()
IImportManager
getImpAssMode
in interface IImportManager
public void setImpAssMode(java.lang.String impAssMode)
IImportManager
setImpAssMode
in interface IImportManager
impAssMode
- The import association modepublic AssociationFile getAssociationFile()
IImportManager
getAssociationFile
in interface IImportManager
public void setAssociationFile(AssociationFile associationFile)
IImportManager
setAssociationFile
in interface IImportManager
associationFile
- the association filepublic boolean associateAllExportedRolesByUserAssociation() throws it.eng.spago.error.EMFUserError
IImportManager
associateAllExportedRolesByUserAssociation
in interface IImportManager
it.eng.spago.error.EMFUserError
- the EMF user errorpublic boolean associateAllExportedEnginesByUserAssociation() throws it.eng.spago.error.EMFUserError
IImportManager
associateAllExportedEnginesByUserAssociation
in interface IImportManager
it.eng.spago.error.EMFUserError
- the EMF user errorpublic boolean associateAllExportedDataSourcesByUserAssociation() throws it.eng.spago.error.EMFUserError
IImportManager
associateAllExportedDataSourcesByUserAssociation
in interface IImportManager
it.eng.spago.error.EMFUserError
- the EMF user error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |