pt.digitalis.dif.codegen
Class CGAncillaries

java.lang.Object
  extended by pt.digitalis.dif.codegen.CGAncillaries

public class CGAncillaries
extends Object

Place holder for some DIF CG-related constants and operations that are used on the code generation process.

Author:
Rodrigo Gonçalves rgoncalves@digitalis.pt
, Pedro Viegas pviegas@digitalis.pt
Created on:
2007/10/29

Field Summary
static String APP_INIT_METHOD
          The name of the method that calls the user-defined application's initialization method.
static String APPLICATION_GET_PROVIDER_METHOD
          The IApplication 'getProvider' method name.
static String BOOLEAN_RETURN
          The boolean return as a String.
static String CALL_EVENT_METHOD
          The name of the method that calls the event handler method.
static String CALL_EXEC_METHOD
          The name of the method that calls the user-defined execution method.
static String CALL_EXEC_ONEVENT_METHOD
          The name of the method that calls the user-defined execution method for a specified event.
static String CALL_FINALIZE_METHOD
          The name of the method that calls the user-defined execution method.
static String CALL_INIT_CUSTOM_PARAMETERS_METHOD
          The name of the method that calls the user-defined parameter definition method.
static String CALL_INIT_METHOD
          The name of the method that calls the user-defined initialization method.
static String CALLBACK_GET_CALLBACK_TYPE_METHOD
          The ICallback 'getCallbackType' method name.
static String CALLBACK_HAS_CALLBACK_ENABLED_METHOD
          The ICallback 'hasCallbackEnabled' method name.
static boolean CG_TO_BE_IMPLEMENTED_BOOLEAN
          This message is used as return for Boolean-returning methods whose bodies will be implemented by the CodeGen.
static String CG_TO_BE_IMPLEMENTED_MESSAGE
          This message is used as return for String-returning methods whose bodies will be implemented by the CodeGen.
static Object CG_TO_BE_IMPLEMENTED_OBJECT
          This message is used as return for Object-returning methods whose bodies will be implemented by the CodeGen.
static IStage CG_TO_BE_IMPLEMENTED_STAGE
          This message is used as return for Stage-returning methods whose bodies will be implemented by the CodeGen.
static ViewObject CG_TO_BE_IMPLEMENTED_VIEW
          This message is used as return for ViewObject-returning methods whose bodies will be implemented by the CodeGen.
static String COMMA
          The comma character as a String.
static String END_BLOCK
          Java's end block char as a String constant.
static String ENTITY_GET_ID_METHOD
          The IEntity 'getID' method name.
static String ENTITY_GET_NAME_METHOD
          The IEntity 'getName' method name.
static String ENTITY_GET_ORIGINALCLASSNAME_METHOD
          The IEntity 'getOriginalClassName' method name.
static String ENTITY_GET_OVERRIDE_METHOD
          The IEntity 'getID' method name.
static String ENTITY_GET_STAGEINSTANCECLASSNAME_METHOD
          The IEntity 'getOriginalClassName' method name.
static String IDIF_CONTEXT_ARGS
          The DIFContext argument as a String.
static String IPARAMETERS_ARGS
          The IParameters argument as a String.
static String LIST_RETURN
          The List return as a String.
static String MAP_RETURN
          The Map return as a String.
static String METHOD_BODY_TAG
          The method body tag as String constant.
static String NEW_LINE
          The new line character as a String.
static String NON_STAGE_ENRICHED_CLASS_ID
          The id tag for the non-stage enriched class.
static String SERVICE_GET_APPLICATION_METHOD
          The IService 'getApplication' method name.
static String STAGE_EVENT_HANDLERS_BUILDER
          The error stages builder method name
static String STAGE_GET_DEFAULT_ERROR_STAGE
          The IStage 'getDefaultErrorStage' method name.
static String STAGE_GET_DEFAULT_ERROR_VIEW
          The IStage 'getDefaultErrorView' method name.
static String STAGE_GET_DEFAULT_VIEW
          The IStage 'getDefaultView' method name.
static String STAGE_GET_SERVICE_METHOD
          The IStage 'getService' method name.
static String STAGE_HAS_AUTHENTICATION
          The IStage 'hasAuthentication' method name.
static String STAGE_HAS_AUTHENTICATION_ERROR_INJECTION
          The IStage 'hasAuthenticationErrorInjection' method name.
static String STAGE_HAS_AUTHORIZATION
          The IStage 'hasAuthorization' method name.
static String STAGE_HAS_INJECTED_CONTRIBUTIONS
          The IStage 'hasInjectedContributions' method name.
static String STAGE_HAS_PARAMETER_ERROR_INJECTION
          The IStage 'hasParameterErrorInjection' method name.
static String STAGE_INJECTED_ATTRIBUTES_INIT_METHOD_NAME
          Defines the name of the entity internal init method
static String STAGE_INJECTED_ATTRIBUTES_INIT_METHOD_NAME_SOURCE
          Defines the source of the entity internal init method.
static String STAGE_INJECTED_ERRORSTAGES_BUILDER
          The error stages builder method name
static String STAGE_INJECTED_ERRORVIEWS_BUILDER
          The error views builder method name
static String STAGE_INJECTED_STAGES_BUILDER
          The stages builder method name
static String STAGE_INJECTED_VIEWS_BUILDER
          The views builder method name
static String STAGE_INSTANCE_ID
          The id tag for the stage instance.
static String STAGE_POSTPROCESSING_METHOD_NAME
          Defines the name of the entity internal finalize method
static String STAGE_POSTPROCESSING_METHOD_NAME_SOURCE
          Defines the source of the entity internal init method.
static String STAGE_PROXY_ID
          The id tag for the stage proxy.
static String START_BLOCK
          Java's start block char as a String constant.
static String STRING_RETURN
          The String return as a String.
static String VALIDATOR_GET_BOUND_PARAMETER_IDS_METHOD
          The IValidator 'getBoundParameterIDs' method name.
static String VIEW_OBJECT_RETURN
          The ViewObject return as a String.
static String VOID_ARGS
          The void argument as a String.
static String VOID_RETURN
          The void return as a String.
 
Constructor Summary
CGAncillaries()
           
 
Method Summary
static String getReturnSignatureForClass(Class<?> clazz)
           
static String[] parse(String stringToSplit, String regex)
          Separates a string into multiple strings by splitting the original string around matches of a given pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APP_INIT_METHOD

public static final String APP_INIT_METHOD
The name of the method that calls the user-defined application's initialization method.

See Also:
Constant Field Values

APPLICATION_GET_PROVIDER_METHOD

public static final String APPLICATION_GET_PROVIDER_METHOD
The IApplication 'getProvider' method name.

See Also:
Constant Field Values

BOOLEAN_RETURN

public static final String BOOLEAN_RETURN
The boolean return as a String.

See Also:
Constant Field Values

CALL_EVENT_METHOD

public static final String CALL_EVENT_METHOD
The name of the method that calls the event handler method.

See Also:
Constant Field Values

CALL_EXEC_METHOD

public static final String CALL_EXEC_METHOD
The name of the method that calls the user-defined execution method.

See Also:
Constant Field Values

CALL_EXEC_ONEVENT_METHOD

public static final String CALL_EXEC_ONEVENT_METHOD
The name of the method that calls the user-defined execution method for a specified event.

See Also:
Constant Field Values

CALL_FINALIZE_METHOD

public static final String CALL_FINALIZE_METHOD
The name of the method that calls the user-defined execution method.

See Also:
Constant Field Values

CALL_INIT_CUSTOM_PARAMETERS_METHOD

public static final String CALL_INIT_CUSTOM_PARAMETERS_METHOD
The name of the method that calls the user-defined parameter definition method.

See Also:
Constant Field Values

CALL_INIT_METHOD

public static final String CALL_INIT_METHOD
The name of the method that calls the user-defined initialization method.

See Also:
Constant Field Values

CALLBACK_GET_CALLBACK_TYPE_METHOD

public static final String CALLBACK_GET_CALLBACK_TYPE_METHOD
The ICallback 'getCallbackType' method name.

See Also:
Constant Field Values

CALLBACK_HAS_CALLBACK_ENABLED_METHOD

public static final String CALLBACK_HAS_CALLBACK_ENABLED_METHOD
The ICallback 'hasCallbackEnabled' method name.

See Also:
Constant Field Values

CG_TO_BE_IMPLEMENTED_BOOLEAN

public static final boolean CG_TO_BE_IMPLEMENTED_BOOLEAN
This message is used as return for Boolean-returning methods whose bodies will be implemented by the CodeGen.

See Also:
Constant Field Values

CG_TO_BE_IMPLEMENTED_MESSAGE

public static final String CG_TO_BE_IMPLEMENTED_MESSAGE
This message is used as return for String-returning methods whose bodies will be implemented by the CodeGen.


CG_TO_BE_IMPLEMENTED_OBJECT

public static final Object CG_TO_BE_IMPLEMENTED_OBJECT
This message is used as return for Object-returning methods whose bodies will be implemented by the CodeGen.


CG_TO_BE_IMPLEMENTED_STAGE

public static final IStage CG_TO_BE_IMPLEMENTED_STAGE
This message is used as return for Stage-returning methods whose bodies will be implemented by the CodeGen.


CG_TO_BE_IMPLEMENTED_VIEW

public static final ViewObject CG_TO_BE_IMPLEMENTED_VIEW
This message is used as return for ViewObject-returning methods whose bodies will be implemented by the CodeGen.


COMMA

public static final String COMMA
The comma character as a String.

See Also:
Constant Field Values

END_BLOCK

public static final String END_BLOCK
Java's end block char as a String constant.

See Also:
Constant Field Values

ENTITY_GET_ID_METHOD

public static final String ENTITY_GET_ID_METHOD
The IEntity 'getID' method name.

See Also:
Constant Field Values

ENTITY_GET_NAME_METHOD

public static final String ENTITY_GET_NAME_METHOD
The IEntity 'getName' method name.

See Also:
Constant Field Values

ENTITY_GET_ORIGINALCLASSNAME_METHOD

public static final String ENTITY_GET_ORIGINALCLASSNAME_METHOD
The IEntity 'getOriginalClassName' method name.

See Also:
Constant Field Values

ENTITY_GET_OVERRIDE_METHOD

public static final String ENTITY_GET_OVERRIDE_METHOD
The IEntity 'getID' method name.

See Also:
Constant Field Values

ENTITY_GET_STAGEINSTANCECLASSNAME_METHOD

public static final String ENTITY_GET_STAGEINSTANCECLASSNAME_METHOD
The IEntity 'getOriginalClassName' method name.

See Also:
Constant Field Values

IDIF_CONTEXT_ARGS

public static final String IDIF_CONTEXT_ARGS
The DIFContext argument as a String.


IPARAMETERS_ARGS

public static final String IPARAMETERS_ARGS
The IParameters argument as a String.


LIST_RETURN

public static final String LIST_RETURN
The List return as a String.


MAP_RETURN

public static final String MAP_RETURN
The Map return as a String.


METHOD_BODY_TAG

public static final String METHOD_BODY_TAG
The method body tag as String constant.

See Also:
Constant Field Values

NEW_LINE

public static final String NEW_LINE
The new line character as a String.

See Also:
Constant Field Values

NON_STAGE_ENRICHED_CLASS_ID

public static final String NON_STAGE_ENRICHED_CLASS_ID
The id tag for the non-stage enriched class.

See Also:
Constant Field Values

SERVICE_GET_APPLICATION_METHOD

public static final String SERVICE_GET_APPLICATION_METHOD
The IService 'getApplication' method name.

See Also:
Constant Field Values

STAGE_EVENT_HANDLERS_BUILDER

public static final String STAGE_EVENT_HANDLERS_BUILDER
The error stages builder method name

See Also:
Constant Field Values

STAGE_GET_DEFAULT_ERROR_STAGE

public static final String STAGE_GET_DEFAULT_ERROR_STAGE
The IStage 'getDefaultErrorStage' method name.

See Also:
Constant Field Values

STAGE_GET_DEFAULT_ERROR_VIEW

public static final String STAGE_GET_DEFAULT_ERROR_VIEW
The IStage 'getDefaultErrorView' method name.

See Also:
Constant Field Values

STAGE_GET_DEFAULT_VIEW

public static final String STAGE_GET_DEFAULT_VIEW
The IStage 'getDefaultView' method name.

See Also:
Constant Field Values

STAGE_GET_SERVICE_METHOD

public static final String STAGE_GET_SERVICE_METHOD
The IStage 'getService' method name.

See Also:
Constant Field Values

STAGE_HAS_AUTHENTICATION

public static final String STAGE_HAS_AUTHENTICATION
The IStage 'hasAuthentication' method name.

See Also:
Constant Field Values

STAGE_HAS_AUTHENTICATION_ERROR_INJECTION

public static final String STAGE_HAS_AUTHENTICATION_ERROR_INJECTION
The IStage 'hasAuthenticationErrorInjection' method name.

See Also:
Constant Field Values

STAGE_HAS_AUTHORIZATION

public static final String STAGE_HAS_AUTHORIZATION
The IStage 'hasAuthorization' method name.

See Also:
Constant Field Values

STAGE_HAS_INJECTED_CONTRIBUTIONS

public static final String STAGE_HAS_INJECTED_CONTRIBUTIONS
The IStage 'hasInjectedContributions' method name.

See Also:
Constant Field Values

STAGE_HAS_PARAMETER_ERROR_INJECTION

public static final String STAGE_HAS_PARAMETER_ERROR_INJECTION
The IStage 'hasParameterErrorInjection' method name.

See Also:
Constant Field Values

STAGE_INJECTED_ATTRIBUTES_INIT_METHOD_NAME

public static final String STAGE_INJECTED_ATTRIBUTES_INIT_METHOD_NAME
Defines the name of the entity internal init method

See Also:
Constant Field Values

STAGE_INJECTED_ATTRIBUTES_INIT_METHOD_NAME_SOURCE

public static final String STAGE_INJECTED_ATTRIBUTES_INIT_METHOD_NAME_SOURCE
Defines the source of the entity internal init method. The ${body} enables later substitution of method body.


STAGE_INJECTED_ERRORSTAGES_BUILDER

public static final String STAGE_INJECTED_ERRORSTAGES_BUILDER
The error stages builder method name

See Also:
Constant Field Values

STAGE_INJECTED_ERRORVIEWS_BUILDER

public static final String STAGE_INJECTED_ERRORVIEWS_BUILDER
The error views builder method name

See Also:
Constant Field Values

STAGE_INJECTED_STAGES_BUILDER

public static final String STAGE_INJECTED_STAGES_BUILDER
The stages builder method name

See Also:
Constant Field Values

STAGE_INJECTED_VIEWS_BUILDER

public static final String STAGE_INJECTED_VIEWS_BUILDER
The views builder method name

See Also:
Constant Field Values

STAGE_INSTANCE_ID

public static final String STAGE_INSTANCE_ID
The id tag for the stage instance.

See Also:
Constant Field Values

STAGE_POSTPROCESSING_METHOD_NAME

public static final String STAGE_POSTPROCESSING_METHOD_NAME
Defines the name of the entity internal finalize method

See Also:
Constant Field Values

STAGE_POSTPROCESSING_METHOD_NAME_SOURCE

public static final String STAGE_POSTPROCESSING_METHOD_NAME_SOURCE
Defines the source of the entity internal init method. The ${body} enables later substitution of method body.


STAGE_PROXY_ID

public static final String STAGE_PROXY_ID
The id tag for the stage proxy.

See Also:
Constant Field Values

START_BLOCK

public static final String START_BLOCK
Java's start block char as a String constant.

See Also:
Constant Field Values

STRING_RETURN

public static final String STRING_RETURN
The String return as a String.


VALIDATOR_GET_BOUND_PARAMETER_IDS_METHOD

public static final String VALIDATOR_GET_BOUND_PARAMETER_IDS_METHOD
The IValidator 'getBoundParameterIDs' method name.

See Also:
Constant Field Values

VIEW_OBJECT_RETURN

public static final String VIEW_OBJECT_RETURN
The ViewObject return as a String.


VOID_ARGS

public static final String VOID_ARGS
The void argument as a String.

See Also:
Constant Field Values

VOID_RETURN

public static final String VOID_RETURN
The void return as a String.

See Also:
Constant Field Values
Constructor Detail

CGAncillaries

public CGAncillaries()
Method Detail

getReturnSignatureForClass

public static String getReturnSignatureForClass(Class<?> clazz)
Parameters:
clazz - the class
Returns:
the method signature

parse

public static final String[] parse(String stringToSplit,
                                   String regex)
Separates a string into multiple strings by splitting the original string around matches of a given pattern. Trims the destination strings to remove leading and trailing white spaces.

Parameters:
stringToSplit - the string to split
regex - the pattern used to separate the string
Returns:
an array of strings with the original string split and trimmed.


Copyright © 2014 Digitalis Informática Lda. All Rights Reserved.