Package  Use  Tree  Index  Help 
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 

 

jve.generated
Class DataSourceService

java.lang.Object
  extended byjve.generated.DataSourceService

All Implemented Interfaces:
IDataSourceService


public class DataSourceService
extends java.lang.Object
implements IDataSourceService

Default implementation of IDataSourceService.


Field Summary
protected  IDataSource dataSource
           
 

Constructor Summary
DataSourceService(java.beans.PropertyChangeListener argsListener)
           
 

Method Summary
 void actionPerformed(IActionBinder action)
          Reacts to some action performed on this data source service.
protected  void addArgListeners()
          Add the argument listener to all of the service arguments.
protected  void clearArgListeners()
          Remove the argument listener from all of the service arguments.
protected  java.lang.Object getArg(int index)
          If the argument points to a binder, it will have to use the binder's object, and potentially a property from it
 IDataSource getDataSource()
          Get the Data Source associated with this action.
protected  java.lang.String getErrorMessage()
           
 ObjectReference getServiceArgument()
          Get the argument used as the parameter for the service call.
 java.lang.String getServiceSignature()
          Get the service signature for this action.
 java.lang.Class getType()
          Get the return type of the service call
 java.lang.Object invokeDataSourceService()
          Use the service provider to retrive an object.
protected  void log(java.lang.String s)
           
protected  void log(java.lang.Throwable t)
          The log(xxx) methods are called in case of a failure.
 void refresh()
          Refresh the data source service.
protected  void refreshArguments()
          Call the refresh() method on all of the service arguments.
protected  java.lang.reflect.Method resolveMethod()
          Resolve the service method based on the serviceName and argument signature
 void setDataSource(IDataSource source)
          Set the Data Source associated with this action.
 void setServiceArgument(ObjectReference arg)
          Set the argument for the service call, according to the method signature set with the setService method.
 void setServiceSignature(java.lang.String service)
          This is the service method signature that is to be use.
 java.lang.String toString()
           
 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

 

Field Detail

 

 

dataSource

protected IDataSource dataSource

Constructor Detail

 

 

DataSourceService

public DataSourceService(java.beans.PropertyChangeListener argsListener)

Method Detail

 

 

log

protected void log(java.lang.Throwable t)

The log(xxx) methods are called in case of a failure. Data Objects and binders do not intend to provide any error validation framework. The default logging support will use the error stream if the -Djve.debug system property is defined. One can override these methods to hook up to a particular error validation/framework

Parameters:
t - Exceptions


 

 

log

protected void log(java.lang.String s)


 

 

getErrorMessage

protected java.lang.String getErrorMessage()


 

 

clearArgListeners

protected void clearArgListeners()

Remove the argument listener from all of the service arguments.


 

 

addArgListeners

protected void addArgListeners()

Add the argument listener to all of the service arguments.


 

 

setDataSource

public void setDataSource(IDataSource source)

Description copied from interface: IDataSourceService
Set the Data Source associated with this action.

Specified by:
setDataSource in interface IDataSourceService

Parameters:
source - DataSource to use for this service


 

 

getDataSource

public IDataSource getDataSource()

Description copied from interface: IDataSourceService
Get the Data Source associated with this action.

Specified by:
getDataSource in interface IDataSourceService

Returns:
The Data Source used for this service


 

 

setServiceSignature

public void setServiceSignature(java.lang.String service)
                         throws java.lang.IllegalArgumentException

Description copied from interface: IDataSourceService
This is the service method signature that is to be use. It has to be complete including parameter types e.g. getUserRecord(Integer id);

Specified by:
setServiceSignature in interface IDataSourceService

Parameters:
service - signature
Throws:
java.lang.IllegalArgumentException


 

 

getServiceSignature

public java.lang.String getServiceSignature()

Description copied from interface: IDataSourceService
Get the service signature for this action.

Specified by:
getServiceSignature in interface IDataSourceService

Returns:
service signature


 

 

setServiceArgument

public void setServiceArgument(ObjectReference arg)

Description copied from interface: IDataSourceService
Set the argument for the service call, according to the method signature set with the setService method.

Specified by:
setServiceArgument in interface IDataSourceService

Parameters:
arg - the service argument


 

 

getServiceArgument

public ObjectReference getServiceArgument()

Description copied from interface: IDataSourceService
Get the argument used as the parameter for the service call.

Specified by:
getServiceArgument in interface IDataSourceService

Returns:
argument used for the service


 

 

toString

public java.lang.String toString()


 

 

resolveMethod

protected java.lang.reflect.Method resolveMethod()
                                          throws java.lang.Exception

Resolve the service method based on the serviceName and argument signature

Throws:
java.lang.Exception - throws any introspection exceptions resolving the method.


 

 

refreshArguments

protected void refreshArguments()

Call the refresh() method on all of the service arguments.


 

 

getArg

protected java.lang.Object getArg(int index)

If the argument points to a binder, it will have to use the binder's object, and potentially a property from it

Parameters:
index - the index in the argument list
Returns:
the object of the argument at the given index


 

 

invokeDataSourceService

public java.lang.Object invokeDataSourceService()
                                         throws java.lang.IllegalStateException

Use the service provider to retrive an object. Assume service/args are already set

Returns:
service result
Throws:
java.lang.IllegalStateException - if there's an error invoking the service


 

 

actionPerformed

public void actionPerformed(IActionBinder action)

Reacts to some action performed on this data source service. This implmenetation simply passes the action onto all of the service's argument objects.

Parameters:
action - the action performed


 

 

getType

public java.lang.Class getType()
                        throws java.lang.IllegalStateException

Get the return type of the service call

Returns:
the return type
Throws:
java.lang.IllegalStateException - if the service isn't properly set up or there was a reflection exception


 

 

refresh

public void refresh()

Refresh the data source service.
This implementation simply refreshes all of the service arguments.


Package  Use  Tree  Index  Help 
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD