it.eng.spagobi.services.modules
Class ImportExportModule

java.lang.Object
  extended by it.eng.spago.dispatching.service.DefaultRequestContext
      extended by it.eng.spago.dispatching.module.AbstractModule
          extended by it.eng.spagobi.services.modules.ImportExportModule
All Implemented Interfaces:
it.eng.spago.dispatching.module.ModuleIFace, it.eng.spago.dispatching.service.RequestContextIFace, it.eng.spago.dispatching.service.ServiceIFace, it.eng.spago.init.InitializerIFace, java.io.Serializable

public class ImportExportModule
extends it.eng.spago.dispatching.module.AbstractModule

This class implements a module which handles the import / export operations

See Also:
Serialized Form

Constructor Summary
ImportExportModule()
           
 
Method Summary
private  void associateConnections(it.eng.spago.base.SourceBean request, it.eng.spago.base.SourceBean response)
          Manages the request of the user to associate some exported connections to the connections of the portal in use
private  void associateEngines(it.eng.spago.base.SourceBean request, it.eng.spago.base.SourceBean response)
          Manages the request of the user to associate some exported engines to the engines of the portal in use
private  void associateMetadata(it.eng.spago.base.SourceBean request, it.eng.spago.base.SourceBean response)
          Manages the associations between the exported metadata and the one of the portal in use
private  void associateRoles(it.eng.spago.base.SourceBean request, it.eng.spago.base.SourceBean response)
          Manages the request of the user to associate some exported roles to the roles of the portal in use
private  void backConnAssociation(it.eng.spago.base.SourceBean request, it.eng.spago.base.SourceBean response)
          Manages the request of the user to go back from the connections association to the engines association
private  void backEngineAssociation(it.eng.spago.base.SourceBean request, it.eng.spago.base.SourceBean response)
          Manages the request of the user to go back from the engines association to the roles association
private  void backMetadataAssociation(it.eng.spago.base.SourceBean request, it.eng.spago.base.SourceBean response)
          Manages the request of the user to go back from the metadata association to the connections association
private  void exitImport(it.eng.spago.base.SourceBean request, it.eng.spago.base.SourceBean response)
          Manages the request of the user to exit from the import procedure
private  void exportConf(it.eng.spago.base.SourceBean request, it.eng.spago.base.SourceBean response)
          Manages the request of the user to export some selected objects
private  java.util.List extractObjId(java.util.List requests)
           
private  java.util.Map getCurrentConnectionInfo()
          Gather information about the connections defined into the current SpagoBI platform.
private  void importConf(it.eng.spago.base.SourceBean request, it.eng.spago.base.SourceBean response)
          Manages the request of the user to import contents of an exported archive
 void init(it.eng.spago.base.SourceBean config)
          Initialize the module
 void service(it.eng.spago.base.SourceBean request, it.eng.spago.base.SourceBean response)
          Reads the operation asked by the user and calls the export or import methods
 
Methods inherited from class it.eng.spago.dispatching.module.AbstractModule
getConfig, getModule, getPage, getSharedData, setModule, setPage, setSharedData
 
Methods inherited from class it.eng.spago.dispatching.service.DefaultRequestContext
getErrorHandler, getRequestContainer, getResponseContainer, getServiceRequest, getServiceResponse, setRequestContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportExportModule

public ImportExportModule()
Method Detail

init

public void init(it.eng.spago.base.SourceBean config)
Initialize the module

Specified by:
init in interface it.eng.spago.init.InitializerIFace
Overrides:
init in class it.eng.spago.dispatching.module.AbstractModule
Parameters:
config - Configuration sourcebean of the module

service

public void service(it.eng.spago.base.SourceBean request,
                    it.eng.spago.base.SourceBean response)
             throws java.lang.Exception
Reads the operation asked by the user and calls the export or import methods

Parameters:
request - The Source Bean containing all request parameters
response - The Source Bean containing all response parameters
Throws:
exception - If an exception occurs
java.lang.Exception

exportConf

private void exportConf(it.eng.spago.base.SourceBean request,
                        it.eng.spago.base.SourceBean response)
                 throws EMFUserError
Manages the request of the user to export some selected objects

Parameters:
request - Spago SourceBean request
response - Spago SourceBean response
Throws:
EMFUserError

extractObjId

private java.util.List extractObjId(java.util.List requests)

importConf

private void importConf(it.eng.spago.base.SourceBean request,
                        it.eng.spago.base.SourceBean response)
                 throws EMFUserError
Manages the request of the user to import contents of an exported archive

Parameters:
request - Spago SourceBean request
response - Spago SourceBean response
Throws:
EMFUserError

associateRoles

private void associateRoles(it.eng.spago.base.SourceBean request,
                            it.eng.spago.base.SourceBean response)
                     throws EMFUserError
Manages the request of the user to associate some exported roles to the roles of the portal in use

Parameters:
request - Spago SourceBean request
response - Spago SourceBean response
Throws:
EMFUserError

associateEngines

private void associateEngines(it.eng.spago.base.SourceBean request,
                              it.eng.spago.base.SourceBean response)
                       throws EMFUserError
Manages the request of the user to associate some exported engines to the engines of the portal in use

Parameters:
request - Spago SourceBean request
response - Spago SourceBean response
Throws:
EMFUserError

associateConnections

private void associateConnections(it.eng.spago.base.SourceBean request,
                                  it.eng.spago.base.SourceBean response)
                           throws EMFUserError
Manages the request of the user to associate some exported connections to the connections of the portal in use

Parameters:
request - Spago SourceBean request
response - Spago SourceBean response
Throws:
EMFUserError

associateMetadata

private void associateMetadata(it.eng.spago.base.SourceBean request,
                               it.eng.spago.base.SourceBean response)
                        throws EMFUserError
Manages the associations between the exported metadata and the one of the portal in use

Parameters:
request - Spago SourceBean request
response - Spago SourceBean response
Throws:
EMFUserError

exitImport

private void exitImport(it.eng.spago.base.SourceBean request,
                        it.eng.spago.base.SourceBean response)
                 throws EMFUserError
Manages the request of the user to exit from the import procedure

Parameters:
request - Spago SourceBean request
response - Spago SourceBean response
Throws:
EMFUserError

backEngineAssociation

private void backEngineAssociation(it.eng.spago.base.SourceBean request,
                                   it.eng.spago.base.SourceBean response)
                            throws EMFUserError
Manages the request of the user to go back from the engines association to the roles association

Parameters:
request - Spago SourceBean request
response - Spago SourceBean response
Throws:
EMFUserError

backConnAssociation

private void backConnAssociation(it.eng.spago.base.SourceBean request,
                                 it.eng.spago.base.SourceBean response)
                          throws EMFUserError
Manages the request of the user to go back from the connections association to the engines association

Parameters:
request - Spago SourceBean request
response - Spago SourceBean response
Throws:
EMFUserError

backMetadataAssociation

private void backMetadataAssociation(it.eng.spago.base.SourceBean request,
                                     it.eng.spago.base.SourceBean response)
                              throws EMFUserError
Manages the request of the user to go back from the metadata association to the connections association

Parameters:
request - Spago SourceBean request
response - Spago SourceBean response
Throws:
EMFUserError

getCurrentConnectionInfo

private java.util.Map getCurrentConnectionInfo()
Gather information about the connections defined into the current SpagoBI platform.

Returns:
Map A map containing the name of the connection pools as keys and their description as value