|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pt.digitalis.dif.codegen.templates.StageCGTemplate
public class StageCGTemplate
This class is a template for the IStage interface method implementations. The CodeGen will copy these methods to a
new Proxy class for each stage. Some methods will be copied "as is", other will be tweaked. These Proxy classes are
intended to be Singletons kept by the IDEMRegistry
Field Summary | |
---|---|
static Map<String,ViewObject> |
errorViews
Relates the exception types with the views for redirection purposes upon an exception raising. |
protected static boolean |
isInitialized
Controls the lazy initializations of this stage proxy... |
Constructor Summary | |
---|---|
StageCGTemplate()
|
Method Summary | |
---|---|
protected void |
addEvent(EventType type,
String id)
Adds a new event id to the known handlers |
protected ViewObject |
createView(String engine,
String type,
String target,
boolean isDefault)
Creates a new view object. |
CallbackType |
getCallbackType()
Returns the Entity's callback type. |
IStage |
getDefaultErrorStage()
Returns the default error Stage defined for this Stage |
ViewObject |
getDefaultErrorView()
Returns the default error view defined for this Stage. |
ViewObject |
getDefaultView()
Returns the default view. |
Map<EventType,List<String>> |
getEventHandlers()
Returns the list of all the Stages submit handlers. |
String |
getID()
Returns the Entity ID. |
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()
Returns the list of all the Stages injected in this Stage. |
List<ViewObject> |
getInjectedViews()
Returns the list of all the views injected in this Stage. |
IStageInstance |
getInstance()
Return an instance of the stage for execution |
LicenseEditionType |
getLicenseEdition()
Get the License Edition. |
String |
getMessageForLanguage(String language,
String messageID)
Returns a message associated with a given ID |
Map<String,String> |
getMessagesForLanguage(String language)
Returns all messages associated with the Entity. |
String |
getName()
Returns the Entity name. |
String |
getOriginalClassName()
Returns the original entity class name |
String |
getOverridesStageID()
|
IParameters |
getParameters()
Returns the parameters for the current stage |
IService |
getService()
Returns the Stage service. |
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 |
isRegistered()
Returns information about if the Entity is registered. |
boolean |
isRegistrable()
Returns information about if the Entity can be registered. |
protected void |
lazyStageProxyInitialization(IStageInstance stage)
The lazy initializations for all stages. |
boolean |
register(String name,
String key)
Registers the Entity with a given key. |
void |
unregister()
Unregisters the Entity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static Map<String,ViewObject> errorViews
protected static boolean isInitialized
Constructor Detail |
---|
public StageCGTemplate()
Method Detail |
---|
protected void addEvent(EventType type, String id)
type
- the event type to addid
- the id of the eventprotected 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 CallbackType getCallbackType()
ICallback
getCallbackType
in interface ICallback
ICallback.getCallbackType()
public IStage getDefaultErrorStage()
IStage
getDefaultErrorStage
in interface IStage
IStage.getDefaultErrorStage()
public ViewObject getDefaultErrorView()
IStage
getDefaultErrorView
in interface IStage
IStage.getDefaultErrorView()
public ViewObject getDefaultView()
IStage
getDefaultView
in interface IStage
IStage.getDefaultView()
public Map<EventType,List<String>> getEventHandlers()
IStage
getEventHandlers
in interface IStage
IStage.getEventHandlers()
public String getID()
IEntity
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()
IStage
getInjectedStages
in interface IStage
IStage.getInjectedStages()
public List<ViewObject> getInjectedViews()
IStage
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 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> getMessagesForLanguage(String language)
IStage
getMessagesForLanguage
in interface IStage
language
- the language to get the messages in
IStage.getMessagesForLanguage(java.lang.String)
public String getName()
IEntity
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 IParameters getParameters()
IStage
getParameters
in interface IStage
IStage.getParameters()
public IService getService()
IStage
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 isRegistered()
IRegistrable
isRegistered
in interface IRegistrable
IRegistrable.isRegistered()
public boolean isRegistrable()
IRegistrable
isRegistrable
in interface IRegistrable
IRegistrable.isRegistrable()
protected void lazyStageProxyInitialization(IStageInstance stage)
stage
- the stage instance for accessing some stage properties in the initialization processpublic 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 unregister()
IRegistrable
unregister
in interface IRegistrable
IRegistrable.unregister()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |