pt.digitalis.dif.codegen.templates
Class ServiceCGTemplate

java.lang.Object
  extended by pt.digitalis.dif.codegen.templates.ServiceCGTemplate
All Implemented Interfaces:
IEntity, IMessage, IRegistrable, IService

public class ServiceCGTemplate
extends Object
implements IService

This class is a template for the IService interface method implementations. The CodeGen will copy these methods to the class implementing the interface IService. 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
ServiceCGTemplate()
           
 
Method Summary
 IApplication getApplication()
          Returns the Service application.
 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
 Map<String,IStage> getStages()
          Returns the list of Service stages.
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

ServiceCGTemplate

public ServiceCGTemplate()
Method Detail

getApplication

public IApplication getApplication()
Description copied from interface: IService
Returns the Service application.

Specified by:
getApplication in interface IService
Returns:
the Service application
See Also:
IService.getApplication()

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()

getStages

public Map<String,IStage> getStages()
Description copied from interface: IService
Returns the list of Service stages.

Specified by:
getStages in interface IService
Returns:
the list of the Service stages
See Also:
IService.getStages()

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.