Poseidon for UMLTM
  UMLdoc
 PREV      NEXT       FRAMES    NO FRAMES      

com.gentleware.poseidon.generator

Interface CodeTemplateManager

com.gentleware.poseidon.generator.CodeTemplateManager

public interface CodeTemplateManager


Interface for handling and managing code templates. An instance of any implementing class has to be added to the generator in order to make handling of code templates available.

Created : sturm, Jan 9, 2003, 4:41:37 PM

Authors:
sturm
Since:
1.6


 Association Summary
public CoreGenerator  coreGenerator
 
arrow_up
 

 Method Summary
public void   addCodeTemplate(Class elementClass, CodeTemplate template)
Adds a CodeTemplate instance to the set of known CodeTemplates. 
public void   addCodeTemplate(Class elementClass, CodeTemplate template, boolean treatAsUnencrypted)
Adds a CodeTemplate instance to the set of known CodeTemplates. 
public void   addCodeTemplate(Class elementClass, CodeTemplate template, Object predicate, boolean treatAsUnencrypted, boolean replace)
Adds a CodeTemplate instance to the set of known CodeTemplates. 
public List   getCodeTemplates(Object element)
Returns the CodeTemplate instance to be used for generating the code files. 
public List   getCodeTemplatesForPredicate(Object element, Object predicate)
Returns the list of CodeTemplate instances to be used for generating the code files based on the given predicate. 
public void   removeAllCodeTemplates(Class elementClass)
Removes all registered CodeTemplates for the given class of elements. 
public void   removeCodeTemplate(Class elementClass, CodeTemplate template)
Removes the given CodeTemplate from the list of registered templates for the given class of elements. 
public void   removeCodeTemplate(Class elementClass, CodeTemplate template, Object predicate)
Removes the given CodeTemplate from the generation set associated with the given predicate. 
public void   removeCodeTemplatesForPredicate(Class elementClass, Object predicate)
Removes the set of CodeTemplates registered for the given class of elements and predicate. 
arrow_up
 

Tagged Values
static false
 

 Association Detail

coreGenerator

public CoreGenerator coreGenerator

arrow_up
 Method Detail

addCodeTemplate

public void addCodeTemplate(Class elementClass, CodeTemplate template)


Adds a CodeTemplate instance to the set of known CodeTemplates. Each of the CodeTemplate instances is mapped to a class of elements. For each class elements only one CodeTemplate instance can be defined, while the CodeTemplate instances can be mapped to more than one element class. The template will be treated as encrypted.  
Parameters:
elementClass - Class of elements this CodeTemplate instance is used for.
template - The CodeTemplate instance to be added.
arrow_up


addCodeTemplate

public void addCodeTemplate(Class elementClass, CodeTemplate template, boolean treatAsUnencrypted)


Adds a CodeTemplate instance to the set of known CodeTemplates. Each of the CodeTemplate instances is mapped to a class of elements. For each class elements only one CodeTemplate instance can be defined, while the CodeTemplate instances can be mapped to more than one element class.  
Parameters:
elementClass - Class of elements this CodeTemplate instance is used for.
template - The CodeTemplate instance to be added.
treatAsUnencrypted - True, if the template should be treated as unencrypted.
arrow_up


addCodeTemplate

public void addCodeTemplate(Class elementClass, CodeTemplate template, Object predicate, boolean treatAsUnencrypted, boolean replace)


Adds a CodeTemplate instance to the set of known CodeTemplates. Each of the CodeTemplate instances is mapped to a class of elements. For each class elements any number CodeTemplate instances can be defined, while the CodeTemplate instances can be mapped to more than one element class. A CodeTemplate can also be declared as the replacement for any previously defined CodeTemplate for the given class of elements.  
Parameters:
elementClass - Class of elements this CodeTemplate instance is used for.
template - The CodeTemplate instance to be added.
predicate -
treatAsUnencrypted - True, if the template should be treated as unencrypted.
replace - True, if the template should replace any previously registered template.
arrow_up


getCodeTemplates

public List getCodeTemplates(Object element)


Returns the CodeTemplate instance to be used for generating the code files. Because no predicate is given, the default generation set is used to retrieve the templates.  
Parameters:
element - Element the CodeTemplate instance should be retrieved for.
Returns:
The CodeTemplate instance to be used for the given element.
arrow_up


getCodeTemplatesForPredicate

public List getCodeTemplatesForPredicate(Object element, Object predicate)


Returns the list of CodeTemplate instances to be used for generating the code files based on the given predicate.  
Parameters:
element - Element the CodeTemplates instance should be retrieved for.
predicate - In the simplest case, a lowercase string designating the language.
Returns:
The CodeTemplate instances to be used for the given element and predicate.
arrow_up


removeAllCodeTemplates

public void removeAllCodeTemplates(Class elementClass)


Removes all registered CodeTemplates for the given class of elements. The entry for the class of elements is removed as well.  
Parameters:
elementClass - The class of elements to delete the templates for.
arrow_up


removeCodeTemplate

public void removeCodeTemplate(Class elementClass, CodeTemplate template)


Removes the given CodeTemplate from the list of registered templates for the given class of elements.  
Parameters:
elementClass - The class of elements the template should be removed for.
template - The template to be removed.
arrow_up


removeCodeTemplate

public void removeCodeTemplate(Class elementClass, CodeTemplate template, Object predicate)


Removes the given CodeTemplate from the generation set associated with the given predicate.  
Parameters:
elementClass - The class of elements the template should be removed for.
template - The template to be removed.
predicate - The predicate to find the generation set the template should be removed from.
arrow_up


removeCodeTemplatesForPredicate

public void removeCodeTemplatesForPredicate(Class elementClass, Object predicate)


Removes the set of CodeTemplates registered for the given class of elements and predicate.  
Parameters:
elementClass - The class of elements to delete the templates for.
predicate - The predicate object used to determine which set of templates to remove.
arrow_up
Created  2004 - 10 - 21

    Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

Generated with Poseidon for UMLTM.
Poseidon is a registered trademark of Gentleware AG in Germany, USA and other countries. Copyright 2003-2004 Gentleware AG, Schanzenstr. 70, 20357 Hamburg, Germany. All Rights Reserved.

UML is a trademark or registered trademark of Object Management Group, Inc. in the U.S. and other countries.