pt.digitalis.dif.codegen.templates
Class ProviderCGTemplate

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

public class ProviderCGTemplate
extends Object
implements IProvider

This class is a template for the IProvider interface method implementations. The CodeGen will copy these methods to the class implementing the interface IProvider. 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
ProviderCGTemplate()
           
 
Method Summary
 Map<String,IApplication> getApplications()
          Returns the applications associated with the Provider.
 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
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

ProviderCGTemplate

public ProviderCGTemplate()
Method Detail

getApplications

public Map<String,IApplication> getApplications()
Description copied from interface: IProvider
Returns the applications associated with the Provider.

Specified by:
getApplications in interface IProvider
Returns:
the list of the Provider's applications
See Also:
IProvider.getApplications()

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

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.