pt.digitalis.dif.codegen.templates
Class TemplateResources

java.lang.Object
  extended by pt.digitalis.dif.codegen.templates.TemplateResources

public final class TemplateResources
extends Object

Resources used by the DEM Entity templates on the code generation.

Author:
Pedro Viegas pviegas@digitalis.pt, Rodrigo Gonçalves rgoncalves@digitalis.pt
Created on:
Nov 6, 2007

Method Summary
static CallbackType getCallBack(String id)
          Returns a callback type
static IDEMManager getDEMManager()
          Returns the DEM manager.
static IDocumentRepositoryManager getDocumentRepositoryManager()
          Inspector for the 'documentRepositoryManager' attribute.
static EventType getEventType(String id)
          Returns an event type
static TemplateResources getInstance()
           
static Object getIoCImplementation(String clazz)
          Returns an IoC implementation
static IMessageManager getMessageManager()
          Returns the message manager.
static IParameterManager getParameterManager()
          Returns the parameter manager.
static ParameterScope getParameterScope(String scope)
          Returns the parameter scope
static IParameters getParametersInstance(IStageInstance stage)
          Returns a IParameters instance Development note: This is a workaround for a Javassist bug.
static List<IProvider> getProvidersAsList()
          Returns the providers as a List of IProvider
static IRegistrationManager getRegistrationManager()
          Returns the registration manager.
static String getRequestParameter(IDIFContext context, String id)
          returns a given parameter form the request
 ViewObject stageExecute(IStageInstance stageInstance, IDIFContext context)
          The stage execute logic
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCallBack

public static CallbackType getCallBack(String id)
Returns a callback type

Parameters:
id - the id of the call back to return
Returns:
the registrationManager

getDEMManager

public static IDEMManager getDEMManager()
Returns the DEM manager.

Returns:
the demManager

getDocumentRepositoryManager

public static IDocumentRepositoryManager getDocumentRepositoryManager()
Inspector for the 'documentRepositoryManager' attribute.

Returns:
the documentRepositoryManager value

getEventType

public static EventType getEventType(String id)
Returns an event type

Parameters:
id - the id of the event to return
Returns:
the registrationManager

getInstance

public static TemplateResources getInstance()
Returns:
the singleton instance

getIoCImplementation

public static Object getIoCImplementation(String clazz)
Returns an IoC implementation

Parameters:
clazz - the class that defines the implementation interface
Returns:
the implementation

getMessageManager

public static IMessageManager getMessageManager()
Returns the message manager.

Returns:
the messageManager

getParameterManager

public static IParameterManager getParameterManager()
Returns the parameter manager.

Returns:
the parameterManager

getParameterScope

public static ParameterScope getParameterScope(String scope)
Returns the parameter scope

Parameters:
scope - the scope as a param
Returns:
the parameter scope

getParametersInstance

public static IParameters getParametersInstance(IStageInstance stage)
Returns a IParameters instance Development note: This is a workaround for a Javassist bug. Could not have this line of the generated code.

Parameters:
stage - the stage to get the parameters for
Returns:
the registrationManager

getProvidersAsList

public static List<IProvider> getProvidersAsList()
Returns the providers as a List of IProvider

Returns:
the registrationManager

getRegistrationManager

public static IRegistrationManager getRegistrationManager()
Returns the registration manager.

Returns:
the registrationManager

getRequestParameter

public static String getRequestParameter(IDIFContext context,
                                         String id)
returns a given parameter form the request

Parameters:
context - the current context
id - the Id of the desired parameter
Returns:
the parameter value as string

stageExecute

public ViewObject stageExecute(IStageInstance stageInstance,
                               IDIFContext context)
The stage execute logic

Parameters:
stageInstance -
context -
Returns:
the view object to render the stage output in


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