|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pt.digitalis.dif.codegen.templates.StageInstanceCGTemplate
public class StageInstanceCGTemplate
This class is a template for the IStageInstance interface method implementations. The CodeGen will copy these methods to a new Instance class for each stage. Some methods will be copied "as is", others will be tweaked.
Constructor Summary | |
---|---|
StageInstanceCGTemplate()
|
Method Summary | |
---|---|
void |
__Stage__InjectedAttributesInitMethod__(IDIFContext difContext)
This method will be used by the code gen module to set the annotated attributes. |
void |
__Stage__PostProcessingMethod__(IDIFContext difContext)
This method will be used by the framework to do some post processing work. |
ViewObject |
_CG_execute(IDIFContext context)
The business logic executing method. |
boolean |
_CG_finalize(IDIFContext context)
The finalization method. |
boolean |
_CG_init(IDIFContext context)
The initialization method. |
Object |
callEventMethod(IDIFContext context,
EventType type,
String eventName)
The method that will be enhanced with the call to the correct event method. |
ViewObject |
callExecuteMethod(IDIFContext context)
The method that will be enhanced with the call to the method annotated with @Execute . |
ViewObject |
callExecuteOnEventMethod(IDIFContext context,
EventType type,
String eventName)
The method that will be enhanced with the call to the method annotated with @Execute . |
protected boolean |
callFinalizeMethod(IDIFContext context)
The method that will be enhanced with the call to the method annotated with @Finalize . |
protected void |
callInitCustomParametersMethod(IParameters parameters)
The method that will be enhanced with the users custom parameters (call to the method annotated with @CustomParameters . |
protected boolean |
callInitMethod(IDIFContext context)
The method that will be enhanced with the call to the method annotated with @DIFInitializer . |
protected ViewObject |
createView(String engine,
String type,
String target,
boolean isDefault)
Creates a new view object. |
void |
declareFeatureActive(String featureID)
Declares for the current stage instance that a given feature is enabled |
ControllerException |
getAuthenticationError()
Gets the authentication error after an initialization has occurred |
CallbackType |
getCallbackType()
Returns the Entity's callback type. |
IDIFContext |
getContext()
Returns the execution context. |
IStage |
getDefaultErrorStage()
The default error stage is constant and common to all instances and as such can be placed on the _CG_proxy. |
ViewObject |
getDefaultErrorView()
The default error view is constant and common to all instances and as such can be placed on the _CG_proxy. |
ViewObject |
getDefaultView()
The default view is constant and common to all instances and as such can be placed on the _CG_proxy. |
Map<EventType,List<String>> |
getEventHandlers()
Returns the list of all the Stages submit handlers. |
String |
getID()
The ID is constant and common to all instances and as such can be placed on the _CG_proxy. |
Map<String,String> |
getInjectedErrorStages()
Returns the list of all the error Stages injected in this Stage. |
Map<String,ViewObject> |
getInjectedErrorViews()
Returns the list of all the error views injected in this Stage. |
List<String> |
getInjectedStages()
The injected stages are constant and common to all instances and as such can be placed on the _CG_proxy. |
List<ViewObject> |
getInjectedViews()
The injected views are constant and common to all instances and as such can be placed on the _CG_proxy. |
IStageInstance |
getInstance()
Return an instance of the stage for execution |
LicenseEditionType |
getLicenseEdition()
Get the License Edition. |
String |
getMessage(String messageID)
Returns a message associated with a given ID |
String |
getMessageForLanguage(String language,
String messageID)
Returns a message associated with a given ID |
Map<String,String> |
getMessages()
Returns all messages associated with the Entity. |
Map<String,String> |
getMessagesForLanguage(String language)
Returns all messages associated with the Entity. |
String |
getName()
The name is constant and common to all instances and as such can be placed on the _CG_proxy. |
String |
getOriginalClassName()
Returns the original entity class name |
String |
getOverridesStageID()
|
ParameterErrors |
getParameterErrors()
Gets the parameter errors after a initialization has occurred |
IParameters |
getParameters()
Returns the parameters for the current stage |
IService |
getService()
The service is constant and common to all instances and as such can be placed on the _CG_proxy. |
String |
getStageInstanceClassName()
Obtains the original stage class name |
protected TemplateResources |
getTemplateResources()
For usage of the CG methods |
String |
getUID()
Returns the entity's unique ID. |
boolean |
hasAuthentication()
Defines if the stage has authentication. |
boolean |
hasAuthenticationErrorInjection()
Registers if the stage has injected the authentication errors. |
boolean |
hasAuthorization()
Defines if the stage has authorization. |
boolean |
hasCallbackEnabled()
Returns information about the Entity's callback state. |
boolean |
hasInjectedContributions()
|
boolean |
hasParameterErrorInjection()
Registers if the stage has injected the parameter errors. |
boolean |
hasValidationLogicForForm(String formName)
Checks if the current form has a validation logic handler for the given form |
boolean |
isFeatureEnabled(String featureID)
Validates if a given feature is active/present |
boolean |
isInitialized()
|
boolean |
isRegistered()
Returns information about if the Entity is registered. |
boolean |
isRegistrable()
Returns information about if the Entity can be registered. |
boolean |
register(String name,
String key)
Registers the Entity with a given key. |
void |
setAuthenticationError(ControllerException exception)
Sets the authentication error |
void |
setContext(IDIFContext newContext)
Sets the execution context on the Stage. |
void |
setParameterErrors(ParameterErrors errors)
Sets the parameter errors |
void |
setProxy(IStage _CG_proxy)
Sets the associated proxy to call info upon |
void |
unregister()
Unregisters the Entity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StageInstanceCGTemplate()
Method Detail |
---|
public void __Stage__InjectedAttributesInitMethod__(IDIFContext difContext)
difContext
- the contextpublic void __Stage__PostProcessingMethod__(IDIFContext difContext)
difContext
- the contextpublic ViewObject _CG_execute(IDIFContext context) throws BusinessFlowException
IStageInstance
This method should define the Stage business logic.
_CG_execute
in interface IStageInstance
context
- the execution context
BusinessFlowException
- when an exception is thrown by the stage's init/execute stepsIStageInstance._CG_execute(IDIFContext)
public boolean _CG_finalize(IDIFContext context) throws BusinessFlowException
IStageInstance
This method should perform any tasks related to the Stage initialization.
Not to be confused with Java's own protected void finalize() throws Throwable
.
_CG_finalize
in interface IStageInstance
context
- the execution context
BusinessFlowException
- when an exception is thrown by the stage's init/execute stepsIStageInstance._CG_finalize(IDIFContext)
public boolean _CG_init(IDIFContext context) throws BusinessFlowException
IStageInstance
This method should perform any tasks related to the Stage initialization.
_CG_init
in interface IStageInstance
context
- the execution context
BusinessFlowException
- when an exception is thrown by the stage's init/execute stepsIStageInstance._CG_init(IDIFContext)
public Object callEventMethod(IDIFContext context, EventType type, String eventName)
IStageInstance
callEventMethod
in interface IStageInstance
context
- the execution contexttype
- the type of the fired eventeventName
- the name of the event
IStageInstance.callEventMethod(pt.digitalis.dif.controller.interfaces.IDIFContext,
pt.digitalis.dif.dem.objects.EventType, java.lang.String)
public ViewObject callExecuteMethod(IDIFContext context)
IStageInstance
@Execute
.
callExecuteMethod
in interface IStageInstance
context
- the execution context
IStageInstance.callExecuteMethod(pt.digitalis.dif.controller.interfaces.IDIFContext)
public ViewObject callExecuteOnEventMethod(IDIFContext context, EventType type, String eventName)
IStageInstance
@Execute
.
callExecuteOnEventMethod
in interface IStageInstance
context
- the execution contexttype
- the type of the fired eventeventName
- the name of the event
IStageInstance.callExecuteOnEventMethod(pt.digitalis.dif.controller.interfaces.IDIFContext,
pt.digitalis.dif.dem.objects.EventType, java.lang.String)
protected boolean callFinalizeMethod(IDIFContext context)
@Finalize
.
context
- the execution context
@Finalize
-annotated methodprotected void callInitCustomParametersMethod(IParameters parameters)
@CustomParameters
.
parameters
- the stage parameters to be customizedprotected boolean callInitMethod(IDIFContext context)
@DIFInitializer
.
context
- the execution context
@DIFInitializer
-annotated methodprotected ViewObject createView(String engine, String type, String target, boolean isDefault)
engine
- the engine of the viewtype
- the type of the viewtarget
- the target resource/template of the viewisDefault
- T if the view is the default view
public void declareFeatureActive(String featureID)
IStageInstance
declareFeatureActive
in interface IStageInstance
featureID
- the feature Id to declare activeIStageInstance.declareFeatureActive(java.lang.String)
public ControllerException getAuthenticationError()
IStageInstance
getAuthenticationError
in interface IStageInstance
IStageInstance.getAuthenticationError()
public CallbackType getCallbackType()
ICallback
getCallbackType
in interface ICallback
ICallback.getCallbackType()
public IDIFContext getContext()
IStageInstance
getContext
in interface IStageInstance
IStageInstance.getContext()
public IStage getDefaultErrorStage()
getDefaultErrorStage
in interface IStage
IStage.getDefaultErrorStage()
public ViewObject getDefaultErrorView()
getDefaultErrorView
in interface IStage
IStage.getDefaultErrorView()
public ViewObject getDefaultView()
getDefaultView
in interface IStage
IStage.getDefaultView()
public Map<EventType,List<String>> getEventHandlers()
IStage
getEventHandlers
in interface IStage
IStage.getEventHandlers()
public String getID()
getID
in interface IEntity
IEntity.getID()
public Map<String,String> getInjectedErrorStages()
IStage
getInjectedErrorStages
in interface IStage
IStage.getInjectedErrorStages()
public Map<String,ViewObject> getInjectedErrorViews()
IStage
getInjectedErrorViews
in interface IStage
IStage.getInjectedErrorViews()
public List<String> getInjectedStages()
getInjectedStages
in interface IStage
IStage.getInjectedStages()
public List<ViewObject> getInjectedViews()
getInjectedViews
in interface IStage
IStage.getInjectedViews()
public IStageInstance getInstance()
IStage
getInstance
in interface IStage
IStage.getInstance()
public LicenseEditionType getLicenseEdition()
IRegistrable
getLicenseEdition
in interface IRegistrable
LicenseEditionType
IRegistrable.getLicenseEdition()
public String getMessage(String messageID)
IMessage
getMessage
in interface IMessage
messageID
- the message ID
IMessage.getMessage(java.lang.String)
public String getMessageForLanguage(String language, String messageID)
IStage
getMessageForLanguage
in interface IStage
language
- the language to get the messages inmessageID
- the message ID
IStage.getMessageForLanguage(java.lang.String, java.lang.String)
public Map<String,String> getMessages()
IMessage
getMessages
in interface IMessage
IMessage.getMessages()
public Map<String,String> getMessagesForLanguage(String language)
IStage
getMessagesForLanguage
in interface IStage
language
- the language to get the messages in
IStage.getMessagesForLanguage(java.lang.String)
public String getName()
getName
in interface IEntity
IEntity.getName()
public String getOriginalClassName()
IEntity
getOriginalClassName
in interface IEntity
IEntity.getOriginalClassName()
public String getOverridesStageID()
getOverridesStageID
in interface IStage
IStage.getOverridesStageID()
public ParameterErrors getParameterErrors()
IStageInstance
getParameterErrors
in interface IStageInstance
IStageInstance.getParameterErrors()
public IParameters getParameters()
IStage
getParameters
in interface IStage
IStage.getParameters()
public IService getService()
getService
in interface IStage
IStage.getService()
public String getStageInstanceClassName()
IStage
getStageInstanceClassName
in interface IStage
IStage.getStageInstanceClassName()
protected TemplateResources getTemplateResources()
public String getUID()
IEntity
getUID
in interface IEntity
IEntity.getUID()
public boolean hasAuthentication()
IStage
hasAuthentication
in interface IStage
IStage.hasAuthentication()
public boolean hasAuthenticationErrorInjection()
IStage
hasAuthenticationErrorInjection
in interface IStage
IStage.hasAuthenticationErrorInjection()
public boolean hasAuthorization()
IStage
hasAuthorization
in interface IStage
IStage.hasAuthorization()
public boolean hasCallbackEnabled()
ICallback
hasCallbackEnabled
in interface ICallback
ICallback.hasCallbackEnabled()
public boolean hasInjectedContributions()
hasInjectedContributions
in interface IStage
Inject
IStage.hasInjectedContributions()
public boolean hasParameterErrorInjection()
IStage
hasParameterErrorInjection
in interface IStage
IStage.hasParameterErrorInjection()
public boolean hasValidationLogicForForm(String formName)
IStage
hasValidationLogicForForm
in interface IStage
formName
- the form name
IStage.hasValidationLogicForForm(java.lang.String)
public boolean isFeatureEnabled(String featureID)
IStageInstance
isFeatureEnabled
in interface IStageInstance
featureID
- the Id of the feature do validate is is present/active
IStageInstance.isFeatureEnabled(java.lang.String)
public boolean isInitialized()
isInitialized
in interface IStageInstance
IStageInstance.isInitialized()
public boolean isRegistered()
IRegistrable
isRegistered
in interface IRegistrable
IRegistrable.isRegistered()
public boolean isRegistrable()
IRegistrable
isRegistrable
in interface IRegistrable
IRegistrable.isRegistrable()
public boolean register(String name, String key)
IRegistrable
register
in interface IRegistrable
name
- the name to register tokey
- the encripted registration key
IRegistrable.register(java.lang.String, java.lang.String)
public void setAuthenticationError(ControllerException exception)
IStageInstance
setAuthenticationError
in interface IStageInstance
exception
- the authentication exceptionIStageInstance.setAuthenticationError(pt.digitalis.dif.exception.controller.ControllerException)
public void setContext(IDIFContext newContext)
IStageInstance
setContext
in interface IStageInstance
newContext
- the execution contextIStageInstance.setContext(IDIFContext)
public void setParameterErrors(ParameterErrors errors)
IStageInstance
setParameterErrors
in interface IStageInstance
errors
- the errors object to setIStageInstance.setParameterErrors(pt.digitalis.dif.dem.objects.parameters.errors.ParameterErrors)
public void setProxy(IStage _CG_proxy)
IStageInstance
setProxy
in interface IStageInstance
_CG_proxy
- the proxy to setIStageInstance.setProxy(pt.digitalis.dif.dem.interfaces.IStage)
public void unregister()
IRegistrable
unregister
in interface IRegistrable
IRegistrable.unregister()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |