pt.digitalis.dif.codegen.templates
Class ApplicationCGTemplate

java.lang.Object
  extended by pt.digitalis.dif.codegen.templates.ApplicationCGTemplate
All Implemented Interfaces:
IApplication, IApplicationPrivate, IEntity, IMessage, IRegistrable

public class ApplicationCGTemplate
extends Object
implements IApplication, IApplicationPrivate

This class is a template for the IApplication interface method implementations. The CodeGen will copy these methods to the class implementing the interface IApplication. Some methods will be copied "as is", other will be tweaked.

Author:
Rodrigo Gonçalves rgoncalves@digitalis.pt
Created on:
2007/06/01

Constructor Summary
ApplicationCGTemplate()
           
 
Method Summary
 void __CG__initialize()
          Application initializer
 String getID()
          Returns the Entity ID.
 LicenseEditionType getLicenseEdition()
          Get the License Edition.
 String getMessage(String messageID)
          Returns a message associated with a given ID
 Map<String,String> getMessages()
          Returns all messages associated with the Entity.
 String getName()
          Returns the Entity name.
 String getOriginalClassName()
          Returns the original entity class name
 IProvider getProvider()
          Returns the Application's provider.
 Map<String,IService> getServices()
          Returns a list of all services associated to the Application.
protected  TemplateResources getTemplateResources()
           
 String getUID()
          Returns the entity's unique ID.
 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 unregister()
          Unregisters the Entity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationCGTemplate

public ApplicationCGTemplate()
Method Detail

__CG__initialize

public void __CG__initialize()
Description copied from interface: IApplicationPrivate
Application initializer

Specified by:
__CG__initialize in interface IApplicationPrivate
See Also:
IApplicationPrivate.__CG__initialize()

getLicenseEdition

public LicenseEditionType getLicenseEdition()
Description copied from interface: IRegistrable
Get the License Edition.

Specified by:
getLicenseEdition in interface IRegistrable
Returns:
LicenseEditionType
See Also:
IRegistrable.getLicenseEdition()

getID

public String getID()
Description copied from interface: IEntity
Returns the Entity ID.

Specified by:
getID in interface IEntity
Returns:
the Entity ID
See Also:
IEntity.getID()

getMessage

public String getMessage(String messageID)
Description copied from interface: IMessage
Returns a message associated with a given ID

Specified by:
getMessage in interface IMessage
Parameters:
messageID - the message ID
Returns:
the message with the given id
See Also:
IMessage.getMessage(java.lang.String)

getMessages

public Map<String,String> getMessages()
Description copied from interface: IMessage
Returns all messages associated with the Entity.

Specified by:
getMessages in interface IMessage
Returns:
a map with all the messages related to the Entity
See Also:
IMessage.getMessages()

getName

public String getName()
Description copied from interface: IEntity
Returns the Entity name.

Specified by:
getName in interface IEntity
Returns:
the Entity name
See Also:
IEntity.getName()

getOriginalClassName

public String getOriginalClassName()
Description copied from interface: IEntity
Returns the original entity class name

Specified by:
getOriginalClassName in interface IEntity
Returns:
the class name
See Also:
IEntity.getOriginalClassName()

getProvider

public IProvider getProvider()
Description copied from interface: IApplication
Returns the Application's provider.

Specified by:
getProvider in interface IApplication
Returns:
the Application provider
See Also:
IApplication.getProvider()

getServices

public Map<String,IService> getServices()
Description copied from interface: IApplication
Returns a list of all services associated to the Application.

Specified by:
getServices in interface IApplication
Returns:
a list of all the Application services
See Also:
IApplication.getServices()

getTemplateResources

protected TemplateResources getTemplateResources()
Returns:
an instance of template resources

getUID

public String getUID()
Description copied from interface: IEntity
Returns the entity's unique ID. The unique ID has the form ":".

Specified by:
getUID in interface IEntity
Returns:
the entity's UID
See Also:
IEntity.getUID()

isRegistered

public boolean isRegistered()
Description copied from interface: IRegistrable
Returns information about if the Entity is registered.

Specified by:
isRegistered in interface IRegistrable
Returns:
T if the Entity is registered, F otherwise
See Also:
IRegistrable.isRegistered()

isRegistrable

public boolean isRegistrable()
Description copied from interface: IRegistrable
Returns information about if the Entity can be registered.

Specified by:
isRegistrable in interface IRegistrable
Returns:
T if the Entity is registrable, F otherwise
See Also:
IRegistrable.isRegistrable()

register

public boolean register(String name,
                        String key)
Description copied from interface: IRegistrable
Registers the Entity with a given key.

Specified by:
register in interface IRegistrable
Parameters:
name - the name to register to
key - the encripted registration key
Returns:
T if the Entity was successfully registered, F otherwise
See Also:
IRegistrable.register(java.lang.String, java.lang.String)

unregister

public void unregister()
Description copied from interface: IRegistrable
Unregisters the Entity.

Specified by:
unregister in interface IRegistrable
See Also:
IRegistrable.unregister()


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