|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.bonita.connector.core.Connector
public abstract class Connector
The abstract class Connector is the superclass of
all classes that represent connectors.
| Field Summary | |
|---|---|
boolean |
validation
Enables or not a validation before executing the connector. |
| Constructor Summary | |
|---|---|
Connector()
|
|
| Method Summary | ||
|---|---|---|
protected
|
bonitaListToArrayMap(java.util.List<java.util.List<java.lang.Object>> array,
java.lang.Class<K> key,
java.lang.Class<V> value)
|
|
protected
|
bonitaListToMap(java.util.List<java.util.List<java.lang.Object>> array,
java.lang.Class<K> key,
java.lang.Class<V> value)
|
|
protected static java.util.List<ConnectorError> |
checkGraphicalAnnotations(java.lang.Class<? extends Connector> c)
|
|
protected static java.util.List<ConnectorError> |
checkRuntimeAnnotations(java.lang.Class<? extends Connector> c)
|
|
boolean |
containsErrors()
Returns true if the Connector contains errors. |
|
void |
execute()
Execute the content of the Connector. |
|
void |
execute(APIAccessor accessor,
ActivityInstance activityInstance)
Method of the interface to be implemented. Put in all your required user-defined operations. |
|
protected abstract void |
executeConnector()
Execute the specific content of the Connector. |
|
static boolean |
fieldExists(java.lang.Class<? extends Connector> c,
java.lang.String fieldName)
Checks whether the given field name belongs to an existing connector field |
|
protected static java.lang.reflect.Field |
getField(java.lang.Class<? extends Connector> c,
java.lang.String fieldName)
Returns the Field given by its Class and its name. |
|
static java.lang.String |
getFieldName(java.lang.String methodName)
Gives the field name from its method name. |
|
static java.lang.String |
getGetterName(java.lang.String fieldName)
|
|
static java.lang.reflect.Type |
getGetterReturnType(java.lang.Class<? extends Connector> classConnector,
java.lang.String outputName)
|
|
java.util.List<Getter> |
getGetters()
Obtains the getter list of the connector |
|
static java.lang.reflect.Method |
getMethod(java.lang.Class<?> connectorClass,
java.lang.String methodName,
java.lang.Class<?>[] paramTypes)
|
|
java.util.List<Setter> |
getSetters()
Obtains the setter list of the connector |
|
protected static boolean |
isFieldExist(java.lang.Class<? extends Connector> c,
java.lang.String fieldName)
Checks if the field exists in this connector. |
|
java.util.List<ConnectorError> |
validate()
Checks if all required fields are set. |
|
static java.util.List<ConnectorError> |
validateConnector(java.lang.Class<? extends Connector> c)
Checks whether the Connector is valid and well-formed. |
|
protected abstract java.util.List<ConnectorError> |
validateValues()
Checks if field values are well-set. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public boolean validation
| Constructor Detail |
|---|
public Connector()
| Method Detail |
|---|
public static java.util.List<ConnectorError> validateConnector(java.lang.Class<? extends Connector> c)
c - the Connector Class
protected static java.util.List<ConnectorError> checkGraphicalAnnotations(java.lang.Class<? extends Connector> c)
protected static java.util.List<ConnectorError> checkRuntimeAnnotations(java.lang.Class<? extends Connector> c)
protected static boolean isFieldExist(java.lang.Class<? extends Connector> c,
java.lang.String fieldName)
c - the connector classfieldName - the field name
public static boolean fieldExists(java.lang.Class<? extends Connector> c,
java.lang.String fieldName)
c - the connectorfieldName - the field name
protected static java.lang.reflect.Field getField(java.lang.Class<? extends Connector> c,
java.lang.String fieldName)
c - the class of the wanted fieldfieldName - the name of the wanted field
public static java.lang.String getFieldName(java.lang.String methodName)
methodName - the method name of the field
public static java.lang.String getGetterName(java.lang.String fieldName)
public final void execute()
throws java.lang.Exception
Connector.
If the connector contains error an IllegalStateException is thrown
java.lang.Exception - if an exception occurs
protected abstract void executeConnector()
throws java.lang.Exception
Connector.
java.lang.Exception - if an exception occursprotected abstract java.util.List<ConnectorError> validateValues()
ConnectorError;
an empty list otherwisepublic final java.util.List<ConnectorError> validate()
ConnectorError;
an empty list otherwisepublic final boolean containsErrors()
public void execute(APIAccessor accessor,
ActivityInstance activityInstance)
throws java.lang.Exception
TxHook
execute in interface TxHookaccessor - The APIAccessor interface to access: RuntimeAPI, ManagementAPI, DefinitionAPI, CommandAPI.activityInstance - the record of the current activity.
java.lang.Exception - If an Exception has occurred.TxHook.execute(APIAccessor, ActivityInstance)public final java.util.List<Setter> getSetters()
public final java.util.List<Getter> getGetters()
protected <K,V> java.util.Map<K,V> bonitaListToMap(java.util.List<java.util.List<java.lang.Object>> array,
java.lang.Class<K> key,
java.lang.Class<V> value)
protected <K,V> java.util.Map<K,java.lang.Object[]> bonitaListToArrayMap(java.util.List<java.util.List<java.lang.Object>> array,
java.lang.Class<K> key,
java.lang.Class<V> value)
public static java.lang.reflect.Method getMethod(java.lang.Class<?> connectorClass,
java.lang.String methodName,
java.lang.Class<?>[] paramTypes)
public static java.lang.reflect.Type getGetterReturnType(java.lang.Class<? extends Connector> classConnector,
java.lang.String outputName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||