xdoclet.modules.ejb.entity
Class EntityFacadeSubTask

java.lang.Object
  extended by xdoclet.DocletSupport
      extended by xdoclet.SubTask
          extended by xdoclet.TemplateSubTask
              extended by xdoclet.modules.ejb.AbstractEjbCodeGeneratorSubTask
                  extended by xdoclet.modules.ejb.entity.EntityFacadeSubTask
All Implemented Interfaces:
java.io.Serializable

public class EntityFacadeSubTask
extends AbstractEjbCodeGeneratorSubTask

Version:
$Revision: 1.3 $
Author:
Konstantin Pribluda (kpriblouda@yahoo.com)
See Also:
Serialized Form
ant.element
display-name = "Facade" name = "entityfacade" parent = "xdoclet.modules.ejb.EjbDocletTask"
created
September 8, 2002

Nested Class Summary
 
Nested classes/interfaces inherited from class xdoclet.TemplateSubTask
TemplateSubTask.ExtentTypes, TemplateSubTask.OfType
 
Field Summary
static java.lang.String DEFAULT_ENTITY_FACADE_CLASS_PATTERN
           
static java.lang.String DEFAULT_FACADE_EJB_NAME_PATTERN
           
protected static java.lang.String DEFAULT_TEMPLATE_FILE
           
protected  java.lang.String entityFacadeClassPattern
          A configuration parameter for specifying the entity bean facade EJB class name pattern.
protected  java.lang.String entityFacadeEjbNamePattern
          a configuration parameter for specifying facade ejb names pattern {0} means ejb name
 
Fields inherited from class xdoclet.DocletSupport
currentClassTag, currentFieldTag, currentMethodTag
 
Constructor Summary
EntityFacadeSubTask()
           
 
Method Summary
protected  void engineStarted()
          Describe what the method does
 java.lang.String getEntityFacadeClassPattern()
          Returns the configuration parameter for specifying the entity bean facade class name pattern.
 java.lang.String getEntityFacadeEjbNamePattern()
           
protected  java.lang.String getGeneratedFileName(xjavadoc.XClass clazz)
          Gets the GeneratedFileName attribute of the EntityCmpSubTask object
protected  boolean matchesGenerationRules(xjavadoc.XClass clazz)
          Returns true if output not already generated for clazz, and is of the specified type and has the specified class tag; false otherwise.
 void setEjbNamePattern(java.lang.String new_pattern)
           
 void setPattern(java.lang.String new_pattern)
          Sets the Pattern attribute of the EntityFacadeSubTask object
 void validateOptions()
          Called to validate configuration parameters.
 
Methods inherited from class xdoclet.TemplateSubTask
addOfType, addOfType, addPackageSubstitution, copyAttributesFrom, engineFinished, execute, generateForClass, getAcceptAbstractClasses, getAcceptInterfaces, getDestinationFile, getEngine, getExtent, getGenerationManager, getHavingClassTag, getOfType, getPackageSubstitutions, getSubTaskClassName, getTemplateURL, init, isPackageSubstitutionInheritanceSupported, isPrefixWithPackageStructure, javaFile, processInnerClasses, setAcceptAbstractClasses, setAcceptInterfaces, setDestinationFile, setEngine, setExtent, setExtentValue, setGenerationManager, setHavingClassTag, setOfType, setPackageSubstitutionInheritanceSupported, setPackageSubstitutions, setPrefixWithPackageStructure, setSubTaskClassName, setTemplateFile, setTemplateURL, startEngine, startProcess, startProcessForAll, startProcessPerClass
 
Methods inherited from class xdoclet.SubTask
addConfigParam, getConfigParams, getConfigParamsAsMap, getContext, getDestDir, getMergeDir, getSubTaskName, getXJavaDoc, setDestDir, setMergeDir, setSubTaskName
 
Methods inherited from class xdoclet.DocletSupport
getCurrentClass, getCurrentClassTag, getCurrentConstructor, getCurrentField, getCurrentFieldTag, getCurrentMethod, getCurrentMethodTag, getCurrentPackage, getCurrentTag, isDocletGenerated, popCurrentClass, pushCurrentClass, setCurrentClass, setCurrentClassTag, setCurrentConstructor, setCurrentField, setCurrentFieldTag, setCurrentMethod, setCurrentMethodTag, setCurrentPackage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ENTITY_FACADE_CLASS_PATTERN

public static final java.lang.String DEFAULT_ENTITY_FACADE_CLASS_PATTERN
See Also:
Constant Field Values

DEFAULT_FACADE_EJB_NAME_PATTERN

public static final java.lang.String DEFAULT_FACADE_EJB_NAME_PATTERN
See Also:
Constant Field Values

DEFAULT_TEMPLATE_FILE

protected static final java.lang.String DEFAULT_TEMPLATE_FILE
See Also:
Constant Field Values

entityFacadeClassPattern

protected java.lang.String entityFacadeClassPattern
A configuration parameter for specifying the entity bean facade EJB class name pattern. By default the value is used for deciding the entity bean facade class name. {0} in the value mean current class's symbolic name which for an EJBean is the EJB name.


entityFacadeEjbNamePattern

protected java.lang.String entityFacadeEjbNamePattern
a configuration parameter for specifying facade ejb names pattern {0} means ejb name

Constructor Detail

EntityFacadeSubTask

public EntityFacadeSubTask()
Method Detail

getEntityFacadeClassPattern

public java.lang.String getEntityFacadeClassPattern()
Returns the configuration parameter for specifying the entity bean facade class name pattern. By default the value is used for deciding the concrete CMP entity bean class name. {0} in the value mean current class's symbolic name which for an EJBean is the EJB name. If nothing explicitly specified by user then "{0}FacadeEJB" is used by default.

Returns:
The EntityCmpClassPattern value
See Also:
#entityCmpFacadePattern

getEntityFacadeEjbNamePattern

public java.lang.String getEntityFacadeEjbNamePattern()

setPattern

public void setPattern(java.lang.String new_pattern)
Sets the Pattern attribute of the EntityFacadeSubTask object

Parameters:
new_pattern - The new Pattern value

setEjbNamePattern

public void setEjbNamePattern(java.lang.String new_pattern)

validateOptions

public void validateOptions()
                     throws XDocletException
Called to validate configuration parameters.

Overrides:
validateOptions in class TemplateSubTask
Throws:
XDocletException

getGeneratedFileName

protected java.lang.String getGeneratedFileName(xjavadoc.XClass clazz)
                                         throws XDocletException
Gets the GeneratedFileName attribute of the EntityCmpSubTask object

Overrides:
getGeneratedFileName in class TemplateSubTask
Parameters:
clazz - Describe what the parameter does
Returns:
The GeneratedFileName value
Throws:
XDocletException

matchesGenerationRules

protected boolean matchesGenerationRules(xjavadoc.XClass clazz)
                                  throws XDocletException
Description copied from class: TemplateSubTask
Returns true if output not already generated for clazz, and is of the specified type and has the specified class tag; false otherwise. If returned false, no output file is generated for clazz.

Overrides:
matchesGenerationRules in class TemplateSubTask
Parameters:
clazz - Describe what the parameter does
Returns:
Describe the return value
Throws:
XDocletException
To do:
refactor/merge this method with matchesGenerationRules from EntityBmpSubTask

engineStarted

protected void engineStarted()
                      throws XDocletException
Describe what the method does

Overrides:
engineStarted in class TemplateSubTask
Throws:
XDocletException

http://xdoclet.sourceforge.net/