org.infinispan.tools.doclet.config
Class ConfigHtmlGenerator

java.lang.Object
  extended by org.infinispan.tools.doclet.html.HtmlGenerator
      extended by org.infinispan.tools.doclet.config.AbstractConfigHtmlGenerator
          extended by org.infinispan.tools.doclet.config.ConfigHtmlGenerator

public class ConfigHtmlGenerator
extends AbstractConfigHtmlGenerator

Infinispan configuration reference guide generator

Since:
4.0
Author:
Vladimir Blagojevic

Field Summary
 
Fields inherited from class org.infinispan.tools.doclet.config.AbstractConfigHtmlGenerator
CONFIG_REF, CONFIG_REF_DESC_ATT, CONFIG_REF_NAME_ATT, CONFIG_REF_PARENT_NAME_ATT, rootDoc, sb
 
Constructor Summary
ConfigHtmlGenerator(String encoding, String title, String bottom, String footer, String header, String metaDescription, List<String> metaKeywords, String classpath)
           
 
Method Summary
protected  List<Class<?>> getConfigBeans()
          Returns a list of classes inspected for configuration reference javadoc tags.
protected  String getRootElementName()
          Name of the root element in the schema
protected  String getSchemaFile()
          Returns name of the schema file.
protected  String getTitle()
           
protected  boolean postVisitNode(TreeNode n)
          Callback invoked after visiting the specified node n.
protected  boolean preVisitNode(TreeNode n)
          Callback invoked prior to visiting the specified node n.
protected  void preXMLTableOfContentsCreate(XSOMSchemaTreeWalker sw, XMLTreeOutputWalker tw)
          Invoked prior to creation of XML tree table of contents for configuration elements in schema
 
Methods inherited from class org.infinispan.tools.doclet.config.AbstractConfigHtmlGenerator
generateContents, getAsInputStreamFromClassLoader, getRootDoc, getStringBuilder, lookupFile, parseTag, postXMLTableOfContentsCreate, setRootDoc
 
Methods inherited from class org.infinispan.tools.doclet.html.HtmlGenerator
generateHtml, generateHtml, isValid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigHtmlGenerator

public ConfigHtmlGenerator(String encoding,
                           String title,
                           String bottom,
                           String footer,
                           String header,
                           String metaDescription,
                           List<String> metaKeywords,
                           String classpath)
Method Detail

getConfigBeans

protected List<Class<?>> getConfigBeans()
                                 throws Exception
Description copied from class: AbstractConfigHtmlGenerator
Returns a list of classes inspected for configuration reference javadoc tags. Configuration reference tags are specified at class level and field level using @configRef javadoc tag.

Configuration class hierarchy should match configuration XML schema where each configuration class matches to one Java class and each property of XML element matches to a field of a class. On a class level @configRef javadoc tag should be placed on a class definition that matches the target XML element. On a field level @configRef javadoc tag should be placed on a field (anywhere in class hiearchy) that matches XML property.

@configRef has two key value property pairs: name and desc. Name specifies the name of the matching XML element in cases when @configRef decorates a class. If @configRef decorates a Java field then name attribute should match XML attribute.

Note that name property is optional in cases when @configRef decorates a Java field while it is mandatory in cases when @configRef decorates a configuration class.

Specified by:
getConfigBeans in class AbstractConfigHtmlGenerator
Returns:
a list of configuration classes decorated with @configRef Javadoc tags.
Throws:
Exception

getSchemaFile

protected String getSchemaFile()
Description copied from class: AbstractConfigHtmlGenerator
Returns name of the schema file.

Note that schema file should be placed on a classpath.

Specified by:
getSchemaFile in class AbstractConfigHtmlGenerator
Returns:
name of the schema file located on the classpath.

getTitle

protected String getTitle()
Overrides:
getTitle in class AbstractConfigHtmlGenerator

getRootElementName

protected String getRootElementName()
Description copied from class: AbstractConfigHtmlGenerator
Name of the root element in the schema

Specified by:
getRootElementName in class AbstractConfigHtmlGenerator
Returns:
name of the root element in the schema

preXMLTableOfContentsCreate

protected void preXMLTableOfContentsCreate(XSOMSchemaTreeWalker sw,
                                           XMLTreeOutputWalker tw)
Description copied from class: AbstractConfigHtmlGenerator
Invoked prior to creation of XML tree table of contents for configuration elements in schema

Overrides:
preXMLTableOfContentsCreate in class AbstractConfigHtmlGenerator

preVisitNode

protected boolean preVisitNode(TreeNode n)
Description copied from class: AbstractConfigHtmlGenerator
Callback invoked prior to visiting the specified node n.

Overrides:
preVisitNode in class AbstractConfigHtmlGenerator
Returns:
true if the TreeNode n should be skipped for configuration reference creation, false otherwise

postVisitNode

protected boolean postVisitNode(TreeNode n)
Description copied from class: AbstractConfigHtmlGenerator
Callback invoked after visiting the specified node n.

Overrides:
postVisitNode in class AbstractConfigHtmlGenerator
Returns:
true if no more elements should be included in configuration reference creation, false otherwise

Google Analytics

Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.