za.org.coefficient.interfaces
Interface Invoker

All Known Implementing Classes:
BaseInvoker, EjbInvoker, WebAppInvoker

public interface Invoker

Defines the interface for a module invoker


Method Summary
 java.lang.Object getService(java.lang.String serviceName)
          This method returns a reference to the named service.
 java.lang.Object invoke(CoefficientContext ctx)
          This method will look for a request parameter named module and one named op and will try to fire that operation on the module.
 java.lang.Object invokeGetterOnModule(java.lang.String module, java.lang.String method)
          This method will invoke the named getter on the named module and return the result
 java.lang.Object invokeMethodOnModule(java.lang.String module, java.lang.String method, java.lang.Object[] paramVals)
          This method will invoke the named method on the named module with the parameters provided in the incomming object array and return the result
 java.lang.Object invokeMethodOnService(java.lang.String serviceName, java.lang.String method, java.lang.Object[] paramVals)
          This method will invoke the named method on the named service with the parameters provided in the incomming object array and return the result
 java.lang.Object invokeMethodOnTheme(java.lang.String theme, java.lang.String method, java.lang.Object[] paramVals)
          This method is used to invoke methods on a system service that must be a theme.
 java.lang.Object invokeOpOnModule(java.lang.String module, java.lang.String operation, CoefficientContext ctx)
          This method will invoke the named operation on the named module with the given context as a parameter
 java.lang.Object invokeOpOnModule(java.lang.String module, java.lang.String operation, za.co.csir.icomtek.workflow.interfaces.WorkflowContext ctx)
          NOTE: This is bad and is only done to give the workflow some autonomy This method will invoke the named operation on the named module with the given a workflow context which is a CoefficientContext
 

Method Detail

invoke

java.lang.Object invoke(CoefficientContext ctx)
                        throws java.lang.Exception
This method will look for a request parameter named module and one named op and will try to fire that operation on the module.

Throws:
java.lang.Exception

invokeGetterOnModule

java.lang.Object invokeGetterOnModule(java.lang.String module,
                                      java.lang.String method)
                                      throws java.lang.Exception
This method will invoke the named getter on the named module and return the result

Parameters:
module - names a module in the system
method - names the getter on the module
Returns:
is the return value of the getter method
Throws:
java.lang.Exception

invokeMethodOnModule

java.lang.Object invokeMethodOnModule(java.lang.String module,
                                      java.lang.String method,
                                      java.lang.Object[] paramVals)
                                      throws java.lang.Exception
This method will invoke the named method on the named module with the parameters provided in the incomming object array and return the result

Parameters:
module - names a module available in the system
method - names the method on the module
paramVals - contains the parameters for the method invoke
Returns:
is the return value of the method
Throws:
java.lang.Exception

invokeMethodOnService

java.lang.Object invokeMethodOnService(java.lang.String serviceName,
                                       java.lang.String method,
                                       java.lang.Object[] paramVals)
                                       throws java.lang.Exception
This method will invoke the named method on the named service with the parameters provided in the incomming object array and return the result

Parameters:
module - names a service available in the system, this does not need to be a module or a theme
method - names the method on the service
paramVals - contains the parameters for the method invoke
Returns:
is the return value of the method
Throws:
java.lang.Exception

invokeOpOnModule

java.lang.Object invokeOpOnModule(java.lang.String module,
                                  java.lang.String operation,
                                  CoefficientContext ctx)
                                  throws java.lang.Exception
This method will invoke the named operation on the named module with the given context as a parameter

Parameters:
module - names a module in the system
operation - names the method to invoke on the module
ctx - is the coefficient context to be passed to the module
Returns:
is the return value if there is one, null otherwise
Throws:
java.lang.Exception

invokeOpOnModule

java.lang.Object invokeOpOnModule(java.lang.String module,
                                  java.lang.String operation,
                                  za.co.csir.icomtek.workflow.interfaces.WorkflowContext ctx)
                                  throws java.lang.Exception
NOTE: This is bad and is only done to give the workflow some autonomy This method will invoke the named operation on the named module with the given a workflow context which is a CoefficientContext

Throws:
java.lang.Exception

getService

java.lang.Object getService(java.lang.String serviceName)
                            throws java.lang.Exception
This method returns a reference to the named service. NOTE: this method can only be used by those in the same class loader as the requested service. This is because this returns an EJB created through a local interface, not a remote interface.

Parameters:
serviceName - is the service available in the system
Returns:
is the service that was requested
Throws:
java.lang.Exception

invokeMethodOnTheme

java.lang.Object invokeMethodOnTheme(java.lang.String theme,
                                     java.lang.String method,
                                     java.lang.Object[] paramVals)
                                     throws java.lang.Exception
This method is used to invoke methods on a system service that must be a theme.

Parameters:
theme - names a theme available in the system, this must be a theme
method - names the method on the service
paramVals - contains the parameters for the method invoke
Returns:
is the return value of the method
Throws:
java.lang.Exception


Copyright CSIR. All Rights Reserved.