User: jeje Date: 02/03/11 09:32:46 Added: core/src/xdoclet/jmx/vendor Mx4jDescriptionAdapterSubTask.java Removed: core/src/xdoclet/jmx/vendor OpenJMXDescriptionAdapterSubTask.java Log: Modified sources in order to reflect changes in the name from OpenJMX to mx4j. Modified the templates in order to reflect a class name change too. Revision Changes Path 1.1 xdoclet/core/src/xdoclet/jmx/vendor/Mx4jDescriptionAdapterSubTask.java Index: Mx4jDescriptionAdapterSubTask.java =================================================================== package xdoclet.jmx.vendor; import xdoclet.TemplateSubTask; import xdoclet.XDocletException; import xdoclet.util.Translator; import java.io.File; /** * Generates MBeanDescriptionAdaptor subclass for Mx4j. * * @author Dmitri Colebatch ([EMAIL PROTECTED]) * @created January 31, 2002 * @version $Revision: 1.1 $ */ public class Mx4jDescriptionAdapterSubTask extends TemplateSubTask { public final static String SUBTASK_NAME = "mx4jDescription"; protected static String mbeanDescriptionClassPattern; private static String DEFAULT_TEMPLATE_FILE = "/xdoclet/jmx/vendor/mx4j-mbean-description.j"; private static String GENERATED_FILE_NAME = "{0}MBeanDescription.java"; public Mx4jDescriptionAdapterSubTask() { setTemplateURL( getClass().getResource( DEFAULT_TEMPLATE_FILE ) ); setDestinationFile( GENERATED_FILE_NAME ); setHavingClassTag( "jmx:mbean" ); mbeanDescriptionClassPattern = "{0}MBeanDescription"; } public static String getMbeanDescriptionClassPattern() { return mbeanDescriptionClassPattern; } public String getSubTaskName() { return SUBTASK_NAME; } public void setPattern( String new_pattern ) { mbeanDescriptionClassPattern = new_pattern; } /** * Called to validate configuration parameters. * * @exception XDocletException Description of Exception */ public void validateOptions() throws XDocletException { super.validateOptions(); if( getMbeanDescriptionClassPattern() == null || getMbeanDescriptionClassPattern().trim().equals( "" ) ) { throw new XDocletException( Translator.getString( "parameter_missing_or_empty", new String[]{"pattern"} ) ); } if( getMbeanDescriptionClassPattern().indexOf( "{0}" ) == -1 ) { throw new XDocletException( Translator.getString( "xdoclet.jmx.Messages", "pattern_has_no_placeholder" ) ); } } }
_______________________________________________ Xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel