SAP CC 3.0 IEC API

com.highdeal.iec.action
Class JavaTask

java.lang.Object
  extended by com.highdeal.iec.action.JavaTask
All Implemented Interfaces:
XMLExportable

public abstract class JavaTask
extends java.lang.Object
implements XMLExportable

This is an abstract class. To insert your own Java code in the execution of a Scenario by a Connector program, you need to add a JavaActionModel which the classname attribute is the name of a class that implements this abstract class.

By this way, the performing invoke:

  1. the setProperties(Properties) to initialize the JavaTask implementation.
  2. the execute(DataCollection) to perform the JavaTask implementation (only if the initialization has not thrown an exception.)


Constructor Summary
JavaTask()
           
 
Method Summary
abstract  DataCollection execute(DataCollection collection)
          This method represents the perform of this JavaTask using the DataCollection as parameters.
The parameters from the parent nodes are in the DataCollection.
When the DataCollection is modified (most of the time, this JavaTask add properties in the DataCollection), it must be returned.
When an error occurred in this method, it has to be wrapped by a ExecException.
 void initialize(com.highdeal.hci.XMLMarshallable model)
          Initializes the from the model.
abstract  void setProperties(java.util.Properties props)
          Initialize the JavaTask with Properties.
The Properties are build from the property XML nodes of the JavaActionModel.
When the initialization can't be done (a property is missing for instance or has a bad value, etc...), a CannotInitializeException can be thrown.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaTask

public JavaTask()
Method Detail

execute

public abstract DataCollection execute(DataCollection collection)
                                throws ExecException
This method represents the perform of this JavaTask using the DataCollection as parameters.
The parameters from the parent nodes are in the DataCollection.
When the DataCollection is modified (most of the time, this JavaTask add properties in the DataCollection), it must be returned.
When an error occurred in this method, it has to be wrapped by a ExecException.

Parameters:
collection - the DataCollection contains the parameters of execution.
Returns:
the DataCollection modified if it does.
Throws:
ExecException

setProperties

public abstract void setProperties(java.util.Properties props)
                            throws CannotInitializeException
Initialize the JavaTask with Properties.
The Properties are build from the property XML nodes of the JavaActionModel.
When the initialization can't be done (a property is missing for instance or has a bad value, etc...), a CannotInitializeException can be thrown.

Parameters:
props - the properties
Throws:
CannotInitializeException - the exception is thrown when something from the Properties isn't expected.

initialize

public final void initialize(com.highdeal.hci.XMLMarshallable model)
                      throws CannotInitializeException
Description copied from interface: XMLExportable
Initializes the from the model.

Specified by:
initialize in interface XMLExportable
Parameters:
model - the model used for initializing
Throws:
CannotInitializeException

SAP CC 3.0 IEC API

(c) Copyright 2011 SAP AG. All rights reserved. SAP Convergent Charging 3.0