ExternalizerSubTask (XDoclet 1.2.3 API)
Keywords: xdoclet.modules.externalizer.ExternalizerSubTask class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## xdoclet.modules.externalizer
Class ExternalizerSubTask

    java.lang.Object
      xdoclet.DocletSupport
          xdoclet.SubTask
              xdoclet.TemplateSubTask
                  xdoclet.modules.externalizer.ExternalizerSubTask

All Implemented Interfaces:
  Serializable

public class ExternalizerSubTask
extends TemplateSubTask

Externalizes key-value paired tags to whatever configured file (be it xml or properties file). It's useful for simple key-value properties or xml files. For now only properties files are supported. It supports i18n and l10n, so generated files follow `ResourceBundle` naming convention. Parameters "language", "country" and "variant" are reserved and used for this purpose.

Version:
  $Revision: 1.12 $
Author:
  Ara Abrahamian (ara_e@email.com)
See Also:
  Serialized Form
ant.element
  display-name="Externalizer" name="externalizer" parent="xdoclet.DocletTask"
created
  May 7, 2002

Nested Class Summary

Nested classes inherited from class xdoclet.TemplateSubTask
`TemplateSubTask.ExtentTypes, TemplateSubTask.OfType`

Field Summary
`static String` | `GENERATED_FILE_NAME`

Fields inherited from class xdoclet.DocletSupport
`currentClassTag, currentFieldTag, currentMethodTag`

Constructor Summary
`ExternalizerSubTask()`

Method Summary
`protected void` | `generateForClass(xjavadoc.XClass clazz)` Processed template for clazz and generates output file for clazz.
`protected String` | `getBundleKey(xjavadoc.XClass clazz)`
`xdoclet.modules.externalizer.ExternalizerSubTask.Combination` | `getCurrentCombination()`
`protected String` | `getGeneratedFileName(xjavadoc.XClass clazz)` Returns the filename of the generated file for a class.
`String` | `getKeyParamName()`
`String` | `getTagName()`
`String` | `getValueParamName()`
`void` | `setKeyParamName(String p)`
`void` | `setTagName(String tagName)`
`void` | `setValueParamName(String valueParamName)`
`void` | `validateOptions()` Called to validate configuration parameters.

Methods inherited from class xdoclet.TemplateSubTask
`addOfType, addOfType, addPackageSubstitution, copyAttributesFrom, engineFinished, engineStarted, execute, getAcceptAbstractClasses, getAcceptInterfaces, getDestinationFile, getEngine, getExtent, getGenerationManager, getHavingClassTag, getOfType, getPackageSubstitutions, getSubTaskClassName, getTemplateURL, init, isPackageSubstitutionInheritanceSupported, isPrefixWithPackageStructure, javaFile, matchesGenerationRules, 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

### GENERATED_FILE_NAME

    public static final String GENERATED_FILE_NAME

See Also:
  Constant Field Values

Constructor Detail

### ExternalizerSubTask

    public ExternalizerSubTask()

Method Detail

### getTagName

    public String getTagName()

### getValueParamName

    public String getValueParamName()

### getCurrentCombination

    public xdoclet.modules.externalizer.ExternalizerSubTask.Combination getCurrentCombination()

### getKeyParamName

    public String getKeyParamName()

### setTagName

    public void setTagName(String tagName)

### setValueParamName

    public void setValueParamName(String valueParamName)

### setKeyParamName

    public void setKeyParamName(String p)

### validateOptions

    public void validateOptions()
                         throws XDocletException

  Description copied from class: `TemplateSubTask`
  Called to validate configuration parameters.

  Overrides:
    `validateOptions` in class `TemplateSubTask`
  Throws:
    `XDocletException` - Description of Exception

### getBundleKey

    protected String getBundleKey(xjavadoc.XClass clazz)

### getGeneratedFileName

    protected String getGeneratedFileName(xjavadoc.XClass clazz)
                                   throws XDocletException

  Description copied from class: `TemplateSubTask`
  Returns the filename of the generated file for a class. If the string "{0}" is present in the pattern, it will be substituted with the transformed class name.

  Overrides:
    `getGeneratedFileName` in class `TemplateSubTask`
  Parameters:
    `clazz` - the class being processed
  Returns:
    the corresponding filename
  Throws:
    `XDocletException` - Description of Exception

### generateForClass

    protected void generateForClass(xjavadoc.XClass clazz)
                             throws XDocletException

  Description copied from class: `TemplateSubTask`
  Processed template for clazz and generates output file for clazz.

  Overrides:
    `generateForClass` in class `TemplateSubTask`
  Parameters:
    `clazz` - Description of Parameter
  Throws:
    `XDocletException` - Description of Exception

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| http://xdoclet.sourceforge.net/
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD