it.eng.spagobi.services.modules
Class ExecuteBIObjectModule

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.ExecuteBIObjectModule
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 ExecuteBIObjectModule
extends it.eng.spago.dispatching.module.AbstractModule

Executes a report, according to four phases; each phase is identified by a message string.

1) Creates the page

2) Selects the role

3) From the field input values loads the object and starts execution

4) See Report/Change the report state

See Also:
Serialized Form

Field Summary
(package private)  it.eng.spago.error.EMFErrorHandler errorHandler
           
static java.lang.String EXEC_CHANGE_STATE
           
static java.lang.String EXEC_PHASE_RETURN_FROM_LOOKUP
           
static java.lang.String EXEC_PHASE_SELECTED_ROLE
           
(package private)  ExecutionController execContr
           
static java.lang.String MESSAGE_EXECUTION
           
static java.lang.String MODULE_PAGE
           
(package private)  it.eng.spago.base.SessionContainer permanentSession
           
(package private)  it.eng.spago.base.RequestContainer requestContainer
           
(package private)  it.eng.spago.base.SessionContainer session
           
 
Constructor Summary
ExecuteBIObjectModule()
           
 
Method Summary
private  void changeStateHandler(it.eng.spago.base.SourceBean request, it.eng.spago.base.SourceBean response)
          Called after the user change state selection to pass the BIObject from a state to another
private  void debug(java.lang.String method, java.lang.String message)
          Trace a debug message into the log
private  void deleteSubObjectHandler(it.eng.spago.base.SourceBean request, it.eng.spago.base.SourceBean response)
          Delete a subObject
private  void execute(BIObject obj, BIObject.SubObjectDetail subObj, it.eng.spago.base.SourceBean response)
          Based on the object type launches the right execution mechanism.
private  void executionHandler(it.eng.spago.base.SourceBean request, it.eng.spago.base.SourceBean response)
          Handles the final execution of the object
private  void executionSubObjectHandler(it.eng.spago.base.SourceBean request, it.eng.spago.base.SourceBean response)
          Based on the object type lauch the right subobject execution mechanism.
 int findBIObjParId(java.lang.Object parIdObj)
           
private  java.util.List getSubObjectsList(BIObject obj, it.eng.spago.security.IEngUserProfile profile)
          Get the list of subObjects of a BIObject for the current user
 void init(it.eng.spago.base.SourceBean config)
           
private  void lookUpReturnHandler(it.eng.spago.base.SourceBean request, it.eng.spago.base.SourceBean response)
          Called after the parameter value lookup selection to continue the execution phase
private  void pageCreationHandler(it.eng.spago.base.SourceBean request, it.eng.spago.base.SourceBean response)
          Manage the parameter page creation preaparing and setting into the response all the necessary attributes
private  void selectRoleHandler(it.eng.spago.base.SourceBean request, it.eng.spago.base.SourceBean response)
          Called after the user role selection to continue the execution phase
 void service(it.eng.spago.base.SourceBean request, it.eng.spago.base.SourceBean response)
          Manage all the request in order to exec all the different BIObject execution phases
 
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
 

Field Detail

MODULE_PAGE

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

EXEC_PHASE_SELECTED_ROLE

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

EXEC_PHASE_RETURN_FROM_LOOKUP

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

EXEC_CHANGE_STATE

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

MESSAGE_EXECUTION

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

errorHandler

it.eng.spago.error.EMFErrorHandler errorHandler

execContr

ExecutionController execContr

requestContainer

it.eng.spago.base.RequestContainer requestContainer

session

it.eng.spago.base.SessionContainer session

permanentSession

it.eng.spago.base.SessionContainer permanentSession
Constructor Detail

ExecuteBIObjectModule

public ExecuteBIObjectModule()
Method Detail

init

public void init(it.eng.spago.base.SourceBean config)
Specified by:
init in interface it.eng.spago.init.InitializerIFace
Overrides:
init in class it.eng.spago.dispatching.module.AbstractModule

service

public void service(it.eng.spago.base.SourceBean request,
                    it.eng.spago.base.SourceBean response)
             throws java.lang.Exception
Manage all the request in order to exec all the different BIObject execution phases

Parameters:
request - The request source bean
response - The response Source bean
Throws:
java.lang.Exception - If an Exception occurred

pageCreationHandler

private void pageCreationHandler(it.eng.spago.base.SourceBean request,
                                 it.eng.spago.base.SourceBean response)
                          throws java.lang.Exception
Manage the parameter page creation preaparing and setting into the response all the necessary attributes

Parameters:
request - The Spago Request SourceBean
response - The Spago Response SourceBean
Throws:
java.lang.Exception

changeStateHandler

private void changeStateHandler(it.eng.spago.base.SourceBean request,
                                it.eng.spago.base.SourceBean response)
                         throws java.lang.Exception
Called after the user change state selection to pass the BIObject from a state to another

Parameters:
request - The request SourceBean
response - The response SourceBean
Throws:
java.lang.Exception

executionHandler

private void executionHandler(it.eng.spago.base.SourceBean request,
                              it.eng.spago.base.SourceBean response)
                       throws java.lang.Exception
Handles the final execution of the object

Parameters:
request - The request SourceBean
response - The response SourceBean
Throws:
java.lang.Exception

findBIObjParId

public int findBIObjParId(java.lang.Object parIdObj)

lookUpReturnHandler

private void lookUpReturnHandler(it.eng.spago.base.SourceBean request,
                                 it.eng.spago.base.SourceBean response)
                          throws java.lang.Exception
Called after the parameter value lookup selection to continue the execution phase

Parameters:
request - The request SourceBean
response - The response SourceBean
Throws:
java.lang.Exception

selectRoleHandler

private void selectRoleHandler(it.eng.spago.base.SourceBean request,
                               it.eng.spago.base.SourceBean response)
                        throws java.lang.Exception
Called after the user role selection to continue the execution phase

Parameters:
request - The request SourceBean
response - The response SourceBean
Throws:
java.lang.Exception

deleteSubObjectHandler

private void deleteSubObjectHandler(it.eng.spago.base.SourceBean request,
                                    it.eng.spago.base.SourceBean response)
                             throws java.lang.Exception
Delete a subObject

Parameters:
request - The request SourceBean
response - The response SourceBean
Throws:
java.lang.Exception

getSubObjectsList

private java.util.List getSubObjectsList(BIObject obj,
                                         it.eng.spago.security.IEngUserProfile profile)
Get the list of subObjects of a BIObject for the current user

Parameters:
obj - BIObject container of the subObjects
profile - profile of the user
Returns:
the List of the BIObject's subobjects visible to the current user

execute

private void execute(BIObject obj,
                     BIObject.SubObjectDetail subObj,
                     it.eng.spago.base.SourceBean response)
Based on the object type launches the right execution mechanism. For objects executed by an external engine instantiates the driver for execution, gets the execution call parameters map, adds in reponse the map of the parameters. For objects executed by an internal engine, instantiates the engine class and launches execution method.

Parameters:
obj - The BIobject
subObj - The SubObjectDetail subObject to be executed (in case it is not null)
response - The response Source Bean

executionSubObjectHandler

private void executionSubObjectHandler(it.eng.spago.base.SourceBean request,
                                       it.eng.spago.base.SourceBean response)
                                throws java.lang.Exception
Based on the object type lauch the right subobject execution mechanism. For object executed by an external engine instances the driver for execution, get the execution call parameters map, add in reponse the map of the parameters.

Parameters:
request - The request SourceBean
response - The response SourceBean
Throws:
java.lang.Exception

debug

private void debug(java.lang.String method,
                   java.lang.String message)
Trace a debug message into the log

Parameters:
method - Name of the method to store into the log
message - Message to store into the log