pt.digitalis.dif.dem.interfaces
Interface IStageInstance

All Superinterfaces:
ICallback, IEntity, IMessage, IRegistrable, IStage
All Known Implementing Classes:
StageInstanceCGTemplate

public interface IStageInstance
extends IStage, IMessage

This interface represents a Stage entity on the DEM.

A Stage is related to a Service.

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

Method Summary
 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.
 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
 IDIFContext getContext()
          Returns the execution context.
 ParameterErrors getParameterErrors()
          Gets the parameter errors after a initialization has occurred
 boolean isFeatureEnabled(String featureID)
          Validates if a given feature is active/present
 boolean isInitialized()
           
 void setAuthenticationError(ControllerException exception)
          Sets the authentication error
 void setContext(IDIFContext context)
          Sets the execution context on the Stage.
 void setParameterErrors(ParameterErrors errors)
          Sets the parameter errors
 void setProxy(IStage proxy)
          Sets the associated proxy to call info upon
 
Methods inherited from interface pt.digitalis.dif.dem.interfaces.IStage
getDefaultErrorStage, getDefaultErrorView, getDefaultView, getEventHandlers, getInjectedErrorStages, getInjectedErrorViews, getInjectedStages, getInjectedViews, getInstance, getMessageForLanguage, getMessagesForLanguage, getOverridesStageID, getParameters, getService, getStageInstanceClassName, hasAuthentication, hasAuthenticationErrorInjection, hasAuthorization, hasInjectedContributions, hasParameterErrorInjection, hasValidationLogicForForm
 
Methods inherited from interface pt.digitalis.dif.dem.interfaces.IEntity
getID, getName, getOriginalClassName, getUID
 
Methods inherited from interface pt.digitalis.dif.dem.interfaces.ICallback
getCallbackType, hasCallbackEnabled
 
Methods inherited from interface pt.digitalis.dif.dem.interfaces.IRegistrable
getLicenseEdition, isRegistered, isRegistrable, register, unregister
 
Methods inherited from interface pt.digitalis.dif.dem.interfaces.IMessage
getMessage, getMessages
 

Method Detail

_CG_execute

ViewObject _CG_execute(IDIFContext context)
                       throws BusinessFlowException
The business logic executing method.

This method should define the Stage business logic.

Parameters:
context - the execution context
Returns:
a view
Throws:
BusinessFlowException - when an exception is thrown by the stage's init/execute steps

_CG_finalize

boolean _CG_finalize(IDIFContext context)
                     throws BusinessFlowException
The finalization method.

This method should perform any tasks related to the Stage initialization.

Not to be confused with Java's own protected void finalize() throws Throwable.

Parameters:
context - the execution context
Returns:
T if finalization was successful, F otherwise
Throws:
BusinessFlowException - when an exception is thrown by the stage's init/execute steps

_CG_init

boolean _CG_init(IDIFContext context)
                 throws BusinessFlowException
The initialization method.

This method should perform any tasks related to the Stage initialization.

Parameters:
context - the execution context
Returns:
T if initialization went ok, F otherwise
Throws:
BusinessFlowException - when an exception is thrown by the stage's init/execute steps

callEventMethod

Object callEventMethod(IDIFContext context,
                       EventType type,
                       String eventName)
The method that will be enhanced with the call to the correct event method.

Parameters:
context - the execution context
type - the type of the fired event
eventName - the name of the event
Returns:
the object to return

callExecuteMethod

ViewObject callExecuteMethod(IDIFContext context)
The method that will be enhanced with the call to the method annotated with @Execute.

Parameters:
context - the execution context
Returns:
the view to return

callExecuteOnEventMethod

ViewObject callExecuteOnEventMethod(IDIFContext context,
                                    EventType type,
                                    String eventName)
The method that will be enhanced with the call to the method annotated with @Execute.

Parameters:
context - the execution context
type - the type of the fired event
eventName - the name of the event
Returns:
the view to return

declareFeatureActive

void declareFeatureActive(String featureID)
Declares for the current stage instance that a given feature is enabled

Parameters:
featureID - the feature Id to declare active

getAuthenticationError

ControllerException getAuthenticationError()
Gets the authentication error after an initialization has occurred

Returns:
the controller error exception object

getContext

IDIFContext getContext()
Returns the execution context.

Returns:
the execution context

getParameterErrors

ParameterErrors getParameterErrors()
Gets the parameter errors after a initialization has occurred

Returns:
the parameter errors object

isFeatureEnabled

boolean isFeatureEnabled(String featureID)
Validates if a given feature is active/present

Parameters:
featureID - the Id of the feature do validate is is present/active
Returns:
true if it is active/present

isInitialized

boolean isInitialized()
Returns:
T if the stage has already been initialized by calling the "_CG_init" method

setAuthenticationError

void setAuthenticationError(ControllerException exception)
Sets the authentication error

Parameters:
exception - the authentication exception

setContext

void setContext(IDIFContext context)
Sets the execution context on the Stage.

Parameters:
context - the execution context

setParameterErrors

void setParameterErrors(ParameterErrors errors)
Sets the parameter errors

Parameters:
errors - the errors object to set

setProxy

void setProxy(IStage proxy)
Sets the associated proxy to call info upon

Parameters:
proxy - the proxy to set


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