You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(94) |
Sep
(205) |
Oct
(139) |
Nov
(144) |
Dec
(252) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(44) |
Feb
(3) |
Mar
|
Apr
(32) |
May
(40) |
Jun
(24) |
Jul
(4) |
Aug
(20) |
Sep
(10) |
Oct
(61) |
Nov
(86) |
Dec
(79) |
2005 |
Jan
(82) |
Feb
(124) |
Mar
(9) |
Apr
(123) |
May
(125) |
Jun
(115) |
Jul
(35) |
Aug
(111) |
Sep
(62) |
Oct
(82) |
Nov
(77) |
Dec
(167) |
2006 |
Jan
(31) |
Feb
(29) |
Mar
(8) |
Apr
(16) |
May
(11) |
Jun
(104) |
Jul
(4) |
Aug
(115) |
Sep
(37) |
Oct
(2) |
Nov
(4) |
Dec
(6) |
2007 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
(2) |
May
(3) |
Jun
|
Jul
(3) |
Aug
(1) |
Sep
|
Oct
|
Nov
(2) |
Dec
|
2008 |
Jan
|
Feb
(3) |
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(5) |
Sep
(1) |
Oct
(1) |
Nov
(4) |
Dec
(1) |
2009 |
Jan
|
Feb
|
Mar
|
Apr
(9) |
May
(1) |
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
From: Ive H. <hel...@us...> - 2006-06-12 06:52:21
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/entity In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10966/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/entity Modified Files: ValueObjectPlugin.java LookupObjectPlugin.java PrimaryKeyClassPlugin.java Log Message: Support force & verbose options (XDP-183) Use cached metatadata stored inside EjbConfig Index: PrimaryKeyClassPlugin.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/entity/PrimaryKeyClassPlugin.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PrimaryKeyClassPlugin.java 7 Jun 2006 01:42:34 -0000 1.8 --- PrimaryKeyClassPlugin.java 12 Jun 2006 06:52:18 -0000 1.9 *************** *** 19,23 **** import org.generama.MergeableVelocityTemplateEngine; - import org.generama.QDoxCapableMetadataProvider; import org.generama.WriterMapper; --- 19,22 ---- *************** *** 30,34 **** import org.xdoclet.plugin.ejb.qtags.EjbPkTag; import org.xdoclet.plugin.ejb.qtags.TagLibrary; - import org.xdoclet.plugin.ejb.util.QDoxCachedMetadataProvider; import com.thoughtworks.qdox.model.BeanProperty; --- 29,32 ---- *************** *** 49,55 **** private Map pkHierarchyCache = new HashMap(); ! public PrimaryKeyClassPlugin(MergeableVelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, ! WriterMapper writerMapper, EjbConfig config) { ! super(templateEngine, new QDoxCachedMetadataProvider(metadataProvider), writerMapper, config); EjbRuntime.setPlugin(this); setPackageregex("beans"); --- 47,53 ---- private Map pkHierarchyCache = new HashMap(); ! public PrimaryKeyClassPlugin(MergeableVelocityTemplateEngine templateEngine, ! WriterMapper writerMapper, EjbConfig config) { ! super(templateEngine, writerMapper, config); EjbRuntime.setPlugin(this); setPackageregex("beans"); *************** *** 190,193 **** --- 188,194 ---- PkMetadata pkHierarchy = getMetaPk(javaClass); boolean generate = (pkHierarchy != null) ? pkHierarchy.getType().equals(getVirtualType(javaClass)) : false; + if (generate) generate = isDestinationDirty(javaClass); + if (generate && verbose) System.out.println( + "Generating Primary Key for " + javaClass.getName()); return generate; } Index: ValueObjectPlugin.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/entity/ValueObjectPlugin.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ValueObjectPlugin.java 7 Jun 2006 01:42:34 -0000 1.3 --- ValueObjectPlugin.java 12 Jun 2006 06:52:18 -0000 1.4 *************** *** 97,103 **** private Map metaVoCache = new HashMap(); ! public ValueObjectPlugin(MergeableVelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, ! WriterMapper writerMapper, EjbConfig config) { ! super(templateEngine, new QDoxValueObjectExpanderFilterMetadataProvider(metadataProvider), writerMapper, config); // Set the plugin for callback reference, as QDoxValueObjectExpanderFilterMetadataProvider must be static --- 97,109 ---- private Map metaVoCache = new HashMap(); ! public ValueObjectPlugin(MergeableVelocityTemplateEngine templateEngine, ! WriterMapper writerMapper, EjbConfig config) ! throws ClassNotFoundException { ! ! super(templateEngine, writerMapper, ! new EjbConfig( ! new QDoxValueObjectExpanderFilterMetadataProvider( ! config.getMetadataProvider()), writerMapper) ! ); // Set the plugin for callback reference, as QDoxValueObjectExpanderFilterMetadataProvider must be static *************** *** 631,635 **** private QDoxValueObjectExpanderFilterMetadataProvider getValueObjectMetadataProvider() { ! return (QDoxValueObjectExpanderFilterMetadataProvider) getMetadataProvider(); } --- 637,642 ---- private QDoxValueObjectExpanderFilterMetadataProvider getValueObjectMetadataProvider() { ! QDoxCachedMetadataProvider cached = (QDoxCachedMetadataProvider) getMetadataProvider(); ! return (QDoxValueObjectExpanderFilterMetadataProvider) cached.getFilteredMetadataProvider(); } *************** *** 1358,1361 **** --- 1365,1371 ---- generate = generate && ejbUtils.isEntityBean(javaClass); generate = generate && (getMetaVO(javaClass) != null); + if (generate) generate = isDestinationDirty(javaClass); + if (generate && verbose) System.out.println( + "Generating Value Object for " + javaClass.getName()); return generate; } Index: LookupObjectPlugin.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/entity/LookupObjectPlugin.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** LookupObjectPlugin.java 7 Jun 2006 01:42:34 -0000 1.4 --- LookupObjectPlugin.java 12 Jun 2006 06:52:18 -0000 1.5 *************** *** 9,14 **** import org.generama.MergeableVelocityTemplateEngine; - import org.generama.QDoxCapableMetadataProvider; import org.generama.WriterMapper; import org.xdoclet.plugin.ejb.EjbConfig; import org.xdoclet.plugin.ejb.EjbHomeUtils; --- 9,14 ---- import org.generama.MergeableVelocityTemplateEngine; import org.generama.WriterMapper; + import org.xdoclet.plugin.ejb.EjbConfig; import org.xdoclet.plugin.ejb.EjbHomeUtils; *************** *** 21,25 **** import org.xdoclet.plugin.ejb.qtags.EjbUtilTag; import org.xdoclet.plugin.ejb.qtags.TagLibrary; - import org.xdoclet.plugin.ejb.util.QDoxCachedMetadataProvider; import com.thoughtworks.qdox.model.JavaClass; --- 21,24 ---- *************** *** 44,50 **** protected boolean includeGUID = true; ! public LookupObjectPlugin(MergeableVelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, ! WriterMapper writerMapper, EjbConfig config) { ! super(templateEngine, new QDoxCachedMetadataProvider(metadataProvider), writerMapper, config); // EjbRuntime.setPlugin(this); --- 43,49 ---- protected boolean includeGUID = true; ! public LookupObjectPlugin(MergeableVelocityTemplateEngine templateEngine, ! WriterMapper writerMapper, EjbConfig config) { ! super(templateEngine, writerMapper, config); // EjbRuntime.setPlugin(this); *************** *** 268,271 **** --- 267,273 ---- boolean generate = ejbUtils.shouldGenerate(metadata); generate = generate && ((utilTag == null) || (utilTag.isGenerate())); + if (generate) generate = isDestinationDirty(javaClass); + if (generate && verbose) System.out.println( + "Generating Lookup Object for " + javaClass.getName()); return generate; } |
From: Ive H. <hel...@us...> - 2006-06-12 06:52:20
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/interfaces In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10966/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/interfaces Modified Files: AbstractRemoteInterfacePluginTestCase.java AbstractLocalInterfacePluginTestCase.java AbstractRemoteHomeInterfacePluginTestCase.java AbstractLocalHomeInterfacePluginTestCase.java ServiceEndpointPluginTestCase.java Log Message: Support force & verbose options (XDP-183) Use cached metatadata stored inside EjbConfig Index: AbstractRemoteInterfacePluginTestCase.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/interfaces/AbstractRemoteInterfacePluginTestCase.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AbstractRemoteInterfacePluginTestCase.java 7 Jun 2006 01:42:34 -0000 1.3 --- AbstractRemoteInterfacePluginTestCase.java 12 Jun 2006 06:52:17 -0000 1.4 *************** *** 23,27 **** QDoxCapableMetadataProvider qdoxCapableMetadataProvider = (QDoxCapableMetadataProvider) metadataProvider; EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! return new RemoteInterfacePlugin(new MergeableVelocityTemplateEngine(), qdoxCapableMetadataProvider, writerMapper, config); } } \ No newline at end of file --- 23,34 ---- QDoxCapableMetadataProvider qdoxCapableMetadataProvider = (QDoxCapableMetadataProvider) metadataProvider; EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! // Pending GRA-4 ! // return new RemoteInterfacePlugin(new MergeableVelocityTemplateEngine(), qdoxCapableMetadataProvider, writerMapper, config); ! RemoteInterfacePlugin plugin = ! new RemoteInterfacePlugin( ! new MergeableVelocityTemplateEngine(), writerMapper, config); ! plugin.setForce(true); ! plugin.setVerbose(true); ! return plugin; } } \ No newline at end of file Index: ServiceEndpointPluginTestCase.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/interfaces/ServiceEndpointPluginTestCase.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ServiceEndpointPluginTestCase.java 7 Jun 2006 01:42:34 -0000 1.3 --- ServiceEndpointPluginTestCase.java 12 Jun 2006 06:52:17 -0000 1.4 *************** *** 47,51 **** EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); config.setVersion(EjbVersion.EJB_2_1); ! return new ServiceEndpointPlugin(new MergeableVelocityTemplateEngine(), qdoxCapableMetadataProvider, writerMapper, config); } } --- 47,58 ---- EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); config.setVersion(EjbVersion.EJB_2_1); ! ServiceEndpointPlugin plugin = ! new ServiceEndpointPlugin( ! new MergeableVelocityTemplateEngine(), writerMapper, config); ! plugin.setForce(true); ! return plugin; } + + + } Index: AbstractLocalInterfacePluginTestCase.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/interfaces/AbstractLocalInterfacePluginTestCase.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AbstractLocalInterfacePluginTestCase.java 7 Jun 2006 01:42:34 -0000 1.3 --- AbstractLocalInterfacePluginTestCase.java 12 Jun 2006 06:52:17 -0000 1.4 *************** *** 23,28 **** QDoxCapableMetadataProvider qdoxCapableMetadataProvider = (QDoxCapableMetadataProvider) metadataProvider; EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! return new LocalInterfacePlugin(new MergeableVelocityTemplateEngine(), qdoxCapableMetadataProvider, ! writerMapper, config); } } \ No newline at end of file --- 23,35 ---- QDoxCapableMetadataProvider qdoxCapableMetadataProvider = (QDoxCapableMetadataProvider) metadataProvider; EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! // Pending GRA-4 ! // return new LocalInterfacePlugin(new MergeableVelocityTemplateEngine(), qdoxCapableMetadataProvider, ! // writerMapper, config); ! LocalInterfacePlugin plugin = ! new LocalInterfacePlugin( ! new MergeableVelocityTemplateEngine(), writerMapper, config); ! plugin.setForce(true); ! plugin.setVerbose(true); ! return plugin; } } \ No newline at end of file Index: AbstractLocalHomeInterfacePluginTestCase.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/interfaces/AbstractLocalHomeInterfacePluginTestCase.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AbstractLocalHomeInterfacePluginTestCase.java 7 Jun 2006 01:42:34 -0000 1.3 --- AbstractLocalHomeInterfacePluginTestCase.java 12 Jun 2006 06:52:17 -0000 1.4 *************** *** 23,28 **** QDoxCapableMetadataProvider qdoxCapableMetadataProvider = (QDoxCapableMetadataProvider) metadataProvider; EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! return new LocalHomeInterfacePlugin(new MergeableVelocityTemplateEngine(), qdoxCapableMetadataProvider, ! writerMapper, config); } } \ No newline at end of file --- 23,35 ---- QDoxCapableMetadataProvider qdoxCapableMetadataProvider = (QDoxCapableMetadataProvider) metadataProvider; EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! // Pending GRA-4 ! // return new LocalHomeInterfacePlugin(new MergeableVelocityTemplateEngine(), qdoxCapableMetadataProvider, ! // writerMapper, config); ! LocalHomeInterfacePlugin plugin = ! new LocalHomeInterfacePlugin( ! new MergeableVelocityTemplateEngine(), writerMapper, config); ! plugin.setForce(true); ! plugin.setVerbose(true); ! return plugin; } } \ No newline at end of file Index: AbstractRemoteHomeInterfacePluginTestCase.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/interfaces/AbstractRemoteHomeInterfacePluginTestCase.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AbstractRemoteHomeInterfacePluginTestCase.java 7 Jun 2006 01:42:34 -0000 1.3 --- AbstractRemoteHomeInterfacePluginTestCase.java 12 Jun 2006 06:52:17 -0000 1.4 *************** *** 24,29 **** QDoxCapableMetadataProvider qdoxCapableMetadataProvider = (QDoxCapableMetadataProvider) metadataProvider; EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! return new RemoteHomeInterfacePlugin(new MergeableVelocityTemplateEngine(), qdoxCapableMetadataProvider, ! writerMapper, config); } } \ No newline at end of file --- 24,36 ---- QDoxCapableMetadataProvider qdoxCapableMetadataProvider = (QDoxCapableMetadataProvider) metadataProvider; EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! // Pending GRA-4 ! // return new RemoteHomeInterfacePlugin(new MergeableVelocityTemplateEngine(), qdoxCapableMetadataProvider, ! // writerMapper, config); ! RemoteHomeInterfacePlugin plugin = ! new RemoteHomeInterfacePlugin( ! new MergeableVelocityTemplateEngine(), writerMapper, config); ! plugin.setForce(true); ! plugin.setVerbose(true); ! return plugin; } } \ No newline at end of file |
From: Ive H. <hel...@us...> - 2006-06-12 06:50:49
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/descriptor/expected In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10003/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/descriptor/expected Modified Files: ejb-jar-v20.xml ejb-jar-v21.xml Log Message: Place contents of queries inside CDATA section (XDP-185) Index: ejb-jar-v20.xml =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/descriptor/expected/ejb-jar-v20.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ejb-jar-v20.xml 7 Jun 2006 01:42:34 -0000 1.9 --- ejb-jar-v20.xml 12 Jun 2006 06:50:46 -0000 1.10 *************** *** 44,48 **** </query-method> <result-type-mapping>Local</result-type-mapping> ! <ejb-ql>my EJBQL 1</ejb-ql> </query> <query> --- 44,48 ---- </query-method> <result-type-mapping>Local</result-type-mapping> ! <ejb-ql><![CDATA[my EJBQL 1]]></ejb-ql> </query> <query> *************** *** 54,58 **** </query-method> <result-type-mapping>Remote</result-type-mapping> ! <ejb-ql>my EJBQL 2</ejb-ql> </query> <query> --- 54,58 ---- </query-method> <result-type-mapping>Remote</result-type-mapping> ! <ejb-ql><![CDATA[my EJBQL 2]]></ejb-ql> </query> <query> *************** *** 65,69 **** </method-params> </query-method> ! <ejb-ql/> </query> <query> --- 65,69 ---- </method-params> </query-method> ! <ejb-ql><![CDATA[SELECT OBJECT(o) FROM Account o WHERE o.param1 = ?1 and o.param2 = ?2 and o.id <> 5]]></ejb-ql> </query> <query> *************** *** 73,77 **** <method-params/> </query-method> ! <ejb-ql/> </query> <query> --- 73,77 ---- <method-params/> </query-method> ! <ejb-ql><![CDATA[]]></ejb-ql> </query> <query> *************** *** 82,86 **** </query-method> <result-type-mapping>Local</result-type-mapping> ! <ejb-ql>SELECT OBJECT(o) FROM Statement o WHERE o.value > 1000</ejb-ql> </query> <!--Define your extra finders in a file called ejb-finders-AccountBean.xml and place it in your merge directory.--> --- 82,86 ---- </query-method> <result-type-mapping>Local</result-type-mapping> ! <ejb-ql><![CDATA[SELECT OBJECT(o) FROM Statement o WHERE o.value > 1000]]></ejb-ql> </query> <!--Define your extra finders in a file called ejb-finders-AccountBean.xml and place it in your merge directory.--> Index: ejb-jar-v21.xml =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/descriptor/expected/ejb-jar-v21.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ejb-jar-v21.xml 7 Jun 2006 01:42:34 -0000 1.9 --- ejb-jar-v21.xml 12 Jun 2006 06:50:46 -0000 1.10 *************** *** 43,47 **** </query-method> <result-type-mapping>Local</result-type-mapping> ! <ejb-ql>my EJBQL 1</ejb-ql> </query> <query> --- 43,47 ---- </query-method> <result-type-mapping>Local</result-type-mapping> ! <ejb-ql><![CDATA[my EJBQL 1]]></ejb-ql> </query> <query> *************** *** 53,57 **** </query-method> <result-type-mapping>Remote</result-type-mapping> ! <ejb-ql>my EJBQL 2</ejb-ql> </query> <query> --- 53,57 ---- </query-method> <result-type-mapping>Remote</result-type-mapping> ! <ejb-ql><![CDATA[my EJBQL 2]]></ejb-ql> </query> <query> *************** *** 64,68 **** </method-params> </query-method> ! <ejb-ql/> </query> <query> --- 64,68 ---- </method-params> </query-method> ! <ejb-ql><![CDATA[SELECT OBJECT(o) FROM Account o WHERE o.param1 = ?1 and o.param2 = ?2 and o.id <> 5]]></ejb-ql> </query> <query> *************** *** 72,76 **** <method-params/> </query-method> ! <ejb-ql/> </query> <query> --- 72,76 ---- <method-params/> </query-method> ! <ejb-ql><![CDATA[]]></ejb-ql> </query> <query> *************** *** 81,85 **** </query-method> <result-type-mapping>Local</result-type-mapping> ! <ejb-ql>SELECT OBJECT(o) FROM Statement o WHERE o.value > 1000</ejb-ql> </query> <!--Define your extra finders in a file called ejb-finders-AccountBean.xml and place it in your merge directory.--> --- 81,85 ---- </query-method> <result-type-mapping>Local</result-type-mapping> ! <ejb-ql><![CDATA[SELECT OBJECT(o) FROM Statement o WHERE o.value > 1000]]></ejb-ql> </query> <!--Define your extra finders in a file called ejb-finders-AccountBean.xml and place it in your merge directory.--> |
From: Ive H. <hel...@us...> - 2006-06-12 06:49:51
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/util In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv9455/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/util Modified Files: QDoxFilterMetadataProvider.java Log Message: Provide access to filtered metadata object Index: QDoxFilterMetadataProvider.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/util/QDoxFilterMetadataProvider.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** QDoxFilterMetadataProvider.java 13 Dec 2005 03:40:33 -0000 1.1 --- QDoxFilterMetadataProvider.java 12 Jun 2006 06:49:45 -0000 1.2 *************** *** 37,39 **** --- 37,46 ---- return this.wrapper.getOriginalPackageName(metadata); } + + /** + * Provides access to the filtered MetadataProvider + */ + public QDoxCapableMetadataProvider getFilteredMetadataProvider() { + return wrapper; + } } |
From: Ive H. <hel...@us...> - 2006-06-12 06:44:12
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/descriptor In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv6699/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/descriptor Modified Files: beans.jelly Log Message: Place contents of queries inside CDATA section (XDP-185) & avoid using shouldGenerate for interfaces Index: beans.jelly =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/descriptor/beans.jelly,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** beans.jelly 11 Oct 2005 09:22:26 -0000 1.5 --- beans.jelly 12 Jun 2006 06:44:07 -0000 1.6 *************** *** 2,6 **** <j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:jsl="jelly:jsl"> <j:forEach var="class" items="${util.getBeans(metadata)}"> ! <j:if test="${plugin.shouldGenerate(class)}"> <j:set var="ejbBeanTag" value="${class.getTagByName('ejb.bean')}"/> <x:element name="${util.entityType(class)}"> --- 2,6 ---- <j:jelly xmlns:j="jelly:core" xmlns:x="jelly:xml" xmlns:jsl="jelly:jsl"> <j:forEach var="class" items="${util.getBeans(metadata)}"> ! <j:if test="${util.shouldGenerate(class)}"> <j:set var="ejbBeanTag" value="${class.getTagByName('ejb.bean')}"/> <x:element name="${util.entityType(class)}"> *************** *** 19,35 **** </j:if> <ejb-name>${util.getEjbName(class)}</ejb-name> ! <j:if test="${plugin.remoteHomeInterfacePlugin.shouldGenerate(class)}"> <home>${plugin.remoteHomeInterfacePlugin.getVirtualType(class)}</home> </j:if> ! <j:if test="${plugin.remoteInterfacePlugin.shouldGenerate(class)}"> <remote>${plugin.remoteInterfacePlugin.getVirtualType(class)}</remote> </j:if> ! <j:if test="${plugin.localHomeInterfacePlugin.shouldGenerate(class)}"> <local-home>${plugin.localHomeInterfacePlugin.getVirtualType(class)}</local-home> </j:if> ! <j:if test="${plugin.localInterfacePlugin.shouldGenerate(class)}"> <local>${plugin.localInterfacePlugin.getVirtualType(class)}</local> </j:if> ! <j:if test="${plugin.serviceEndpointPlugin.shouldGenerate(class)}"> <service-endpoint>${plugin.serviceEndpointPlugin.getVirtualType(class)}</service-endpoint> </j:if> --- 19,35 ---- </j:if> <ejb-name>${util.getEjbName(class)}</ejb-name> ! <j:if test="${util.hasRemoteHomeInterface(class)}"> <home>${plugin.remoteHomeInterfacePlugin.getVirtualType(class)}</home> </j:if> ! <j:if test="${util.hasRemoteInterface(class)}"> <remote>${plugin.remoteInterfacePlugin.getVirtualType(class)}</remote> </j:if> ! <j:if test="${util.hasLocalHomeInterface(class)}"> <local-home>${plugin.localHomeInterfacePlugin.getVirtualType(class)}</local-home> </j:if> ! <j:if test="${util.hasLocalInterface(class)}"> <local>${plugin.localInterfacePlugin.getVirtualType(class)}</local> </j:if> ! <j:if test="${util.hasServiceEndPoint(class)}"> <service-endpoint>${plugin.serviceEndpointPlugin.getVirtualType(class)}</service-endpoint> </j:if> *************** *** 261,265 **** <result-type-mapping>${finderTag.resultTypeMapping}</result-type-mapping> </j:if> ! <ejb-ql>${finderTag.query}</ejb-ql> </query> </j:forEach> --- 261,265 ---- <result-type-mapping>${finderTag.resultTypeMapping}</result-type-mapping> </j:if> ! <ejb-ql><![CDATA[${finderTag.query}]]></ejb-ql> </query> </j:forEach> *************** *** 279,283 **** <result-type-mapping>${selectMethod.getTagByName('ejb.select').resultTypeMapping}</result-type-mapping> </j:if> ! <ejb-ql>${selectMethod.getTagByName('ejb.select').query}</ejb-ql> </query> </j:forEach> --- 279,283 ---- <result-type-mapping>${selectMethod.getTagByName('ejb.select').resultTypeMapping}</result-type-mapping> </j:if> ! <ejb-ql><![CDATA[${selectMethod.getTagByName('ejb.select').query}]]></ejb-ql> </query> </j:forEach> |
From: Ive H. <hel...@us...> - 2006-06-12 06:42:35
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv5723/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb Modified Files: EjbUtils.java Log Message: Fixed bug in method methodPermissions (XDP-186) & added some utility methods Index: EjbUtils.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/EjbUtils.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** EjbUtils.java 7 Jun 2006 01:42:34 -0000 1.15 --- EjbUtils.java 12 Jun 2006 06:42:31 -0000 1.16 *************** *** 517,520 **** --- 517,564 ---- } + /** + * Returns true if the given JavaClass has a Remote Interface + * (independend of whether one is generated or not). + */ + public boolean hasRemoteInterface(JavaClass javaClass) { + return hasFlag(getViewType(javaClass), REMOTE) + && !isMessageDrivenBean(javaClass); + } + + /** + * Returns true if the given JavaClass has a Remote Home Interface + * (independend of whether one is generated or not). + */ + public boolean hasRemoteHomeInterface(JavaClass javaClass) { + return hasFlag(getViewType(javaClass), REMOTE_HOME) + && !isMessageDrivenBean(javaClass); + } + + /** + * Returns true if the given JavaClass has a Local Interface + * (independend of whether one is generated or not). + */ + public boolean hasLocalInterface(JavaClass javaClass) { + return hasFlag(getViewType(javaClass), LOCAL) + && !isMessageDrivenBean(javaClass); + } + + /** + * Returns true if the given JavaClass has a Local Home Interface + * (independend of whether one is generated or not). + */ + public boolean hasLocalHomeInterface(JavaClass javaClass) { + return hasFlag(getViewType(javaClass), LOCAL_HOME) + && !isMessageDrivenBean(javaClass); + } + + /** + * Returns true if the given JavaClass has a Service Endpoint Interface + * (independend of whether one is generated or not). + */ + public boolean hasServiceEndPoint(JavaClass javaClass) { + return hasFlag(getViewType(javaClass), SERVICE_END_POINT); + } + public boolean isViewType(JavaClass javaClass, String viewType) { return hasFlag(getViewType(javaClass), getViewType(viewType)); *************** *** 2025,2039 **** } ! if (!canContinue) { ! throw getErrorWithTagLocation(finderTag, ! "Couldn't resolve role-names for method permission" + ! (version.greaterOrEquals(EjbVersion.EJB_2_0) ? " or unchecked is false" : "")); } - - // Lets expand by permission for interface type - // Method signature should maybe be unrolled by permType, but it's not really relevant - // the return type, soo.. - retLst.addAll(MethodPermission.unroll(permType, getFinderMethodBySignature(finderTag.getSignature()), - finderTag.getRoleNames())); } --- 2069,2079 ---- } ! if (canContinue) { ! // Lets expand by permission for interface type ! // Method signature should maybe be unrolled by permType, but it's not really relevant ! // the return type, soo.. ! retLst.addAll(MethodPermission.unroll(permType, getFinderMethodBySignature(finderTag.getSignature()), ! finderTag.getRoleNames())); } } |
From: Diogo Q. <dqu...@us...> - 2006-06-07 22:15:09
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv31117/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb Modified Files: EjbJavaGeneratingPlugin.java Added Files: EjbJavaClassBuilder.java Log Message: EjbJavaGenerating plugin now support in memory generation of artifacts. This will be important for not needing second passes like xd1 does. A better management of hierarchy of from related tags is still needed to prepare PluginCMP and PluginBMP. Index: EjbJavaGeneratingPlugin.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/EjbJavaGeneratingPlugin.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** EjbJavaGeneratingPlugin.java 15 Dec 2005 09:46:48 -0000 1.5 --- EjbJavaGeneratingPlugin.java 5 Jun 2006 00:02:50 -0000 1.6 *************** *** 8,12 **** --- 8,16 ---- import java.io.File; + import java.util.Collection; + import java.util.HashSet; + import java.util.Iterator; import java.util.Map; + import java.util.Set; import org.apache.commons.logging.Log; *************** *** 21,26 **** --- 25,35 ---- import org.xdoclet.plugin.ejb.qtags.TagLibrary; + import com.thoughtworks.qdox.JavaDocBuilder; import com.thoughtworks.qdox.model.BeanProperty; + import com.thoughtworks.qdox.model.ClassLibrary; import com.thoughtworks.qdox.model.JavaClass; + import com.thoughtworks.qdox.model.JavaClassCache; + import com.thoughtworks.qdox.model.JavaClassParent; + import com.thoughtworks.qdox.model.JavaSource; import com.thoughtworks.qdox.model.Type; *************** *** 31,35 **** * * @qtags.ignore ! * * @author Diogo Quintela * @version $Revision$ --- 40,44 ---- * * @qtags.ignore ! * * @author Diogo Quintela * @version $Revision$ *************** *** 299,301 **** --- 308,379 ---- return retBuf.toString(); } + + protected boolean isDynamicJavaClass(JavaClass clazz) { + return clazz instanceof DynamicJavaClass; + } + + protected JavaClass createDynamicJavaClass(String className, String packaze, String[] imports, QDoxCapableMetadataProvider metadataProvider) { + JavaClass retVal = new DynamicJavaClass(className); + JavaDocBuilder builder = new JavaDocBuilder(metadataProvider.getDocletTagFactory()); + retVal.setParent(createJavaClassParent(builder.getClassLibrary(), packaze, imports)); + retVal.setJavaClassCache(createJavaClassCache(builder, metadataProvider.getMetadata(), retVal)); + return retVal; + } + + + protected JavaClassParent createJavaClassParent(ClassLibrary classLibrary, String packaze, String[] importz) { + JavaSource src = new JavaSource(); + src.setClassLibrary(classLibrary); + for (int i = 0; importz != null && i < importz.length; i++) { + src.addImport(importz[i]); + } + src.setPackage(packaze); + return src; + } + + protected JavaClassCache createJavaClassCache(final JavaClassCache classCache, Collection metadata, final JavaClass clz) { + final Set javaClasses = new HashSet(); + javaClasses.addAll(metadata); + javaClasses.add(clz); + + return new JavaClassCache() { + public JavaClass[] getClasses() { + log.trace("createJavaClassCache.getClasses()"); + return (JavaClass[])javaClasses.toArray(new JavaClass[0]); + } + + public JavaClass getClassByName(final String name) { + if (log.isTraceEnabled()) { + log.trace("createJavaClassCache.getClassByName() name="+name); + } + if (name == null) { + return null; + } + for (Iterator iter = javaClasses.iterator(); iter.hasNext();) { + JavaClass javaClass = (JavaClass)iter.next(); + if (javaClass.getFullyQualifiedName().equals(name)) { + if (log.isTraceEnabled()) { + log.trace("createJavaClassCache.getClassByName() FOUND javaClass="+javaClass); + } + return javaClass; + } + } + if (log.isTraceEnabled()) { + log.trace("createJavaClassCache.getClassByName() NOT FOUND! Using builder.getClassByName("+name+")"); + } + // not found. Try to use JavaClassCache + return classCache.getClassByName(name); + } + + }; + } + + private static class DynamicJavaClass extends JavaClass { + public DynamicJavaClass() { + super(); + } + public DynamicJavaClass(String name) { + super(name); + } + } } --- NEW FILE: EjbJavaClassBuilder.java --- package org.xdoclet.plugin.ejb; import com.thoughtworks.qdox.model.JavaClass; public interface EjbJavaClassBuilder { /** * JavaClass that describes the generated artifacts. * Normally a plugin will generate a single artifact per entry... * ValueObjectPlugin is such an exception. * * @return The generated artifacts JavaClass otherwise null */ public JavaClass[] buildFor(JavaClass metadata); } |
From: Diogo Q. <dqu...@us...> - 2006-06-07 22:14:27
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/testapp-ejb/src/main/java/org/xdoclet/testapp/ejb/util In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv27879/testapp-ejb/src/main/java/org/xdoclet/testapp/ejb/util Modified Files: TransferReceiverUtil.java AccountUtil.java Log Message: Fix bugs. Index: TransferReceiverUtil.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/testapp-ejb/src/main/java/org/xdoclet/testapp/ejb/util/TransferReceiverUtil.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TransferReceiverUtil.java 13 Dec 2005 03:56:45 -0000 1.2 --- TransferReceiverUtil.java 7 Jun 2006 01:44:13 -0000 1.3 *************** *** 15,18 **** --- 15,21 ---- private static javax.jms.QueueConnectionFactory cachedConnectionFactory = null; + private TransferReceiverUtil() { + } + /** * Obtain destination queue from default initial context Index: AccountUtil.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/testapp-ejb/src/main/java/org/xdoclet/testapp/ejb/util/AccountUtil.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AccountUtil.java 13 Dec 2005 03:56:45 -0000 1.2 --- AccountUtil.java 7 Jun 2006 01:44:13 -0000 1.3 *************** *** 13,17 **** private static org.xdoclet.testapp.ejb.interfaces.AccountLocalHome cachedHome = null; ! public org.xdoclet.testapp.ejb.interfaces.AccountRemoteHome getHome() throws javax.naming.NamingException { org.xdoclet.testapp.ejb.interfaces.AccountRemoteHome retVal = cachedRemoteHome; if (retVal == null) { --- 13,20 ---- private static org.xdoclet.testapp.ejb.interfaces.AccountLocalHome cachedHome = null; ! private AccountUtil() { ! } ! ! public static org.xdoclet.testapp.ejb.interfaces.AccountRemoteHome getHome() throws javax.naming.NamingException { org.xdoclet.testapp.ejb.interfaces.AccountRemoteHome retVal = cachedRemoteHome; if (retVal == null) { *************** *** 22,30 **** } ! public org.xdoclet.testapp.ejb.interfaces.AccountRemoteHome getHome(java.util.Hashtable env) throws javax.naming.NamingException { return (org.xdoclet.testapp.ejb.interfaces.AccountRemoteHome) lookupHome(env, org.xdoclet.testapp.ejb.interfaces.AccountRemoteHome.JNDI_NAME, org.xdoclet.testapp.ejb.interfaces.AccountRemoteHome.class); } ! public org.xdoclet.testapp.ejb.interfaces.AccountLocalHome getLocalHome() throws javax.naming.NamingException { org.xdoclet.testapp.ejb.interfaces.AccountLocalHome retVal = cachedHome; if (retVal == null) { --- 25,33 ---- } ! public static org.xdoclet.testapp.ejb.interfaces.AccountRemoteHome getHome(java.util.Hashtable env) throws javax.naming.NamingException { return (org.xdoclet.testapp.ejb.interfaces.AccountRemoteHome) lookupHome(env, org.xdoclet.testapp.ejb.interfaces.AccountRemoteHome.JNDI_NAME, org.xdoclet.testapp.ejb.interfaces.AccountRemoteHome.class); } ! public static org.xdoclet.testapp.ejb.interfaces.AccountLocalHome getLocalHome() throws javax.naming.NamingException { org.xdoclet.testapp.ejb.interfaces.AccountLocalHome retVal = cachedHome; if (retVal == null) { *************** *** 35,39 **** } ! public org.xdoclet.testapp.ejb.interfaces.AccountLocalHome getLocalHome(java.util.Hashtable env) throws javax.naming.NamingException { return (org.xdoclet.testapp.ejb.interfaces.AccountLocalHome) lookupHome(env, org.xdoclet.testapp.ejb.interfaces.AccountLocalHome.JNDI_NAME, org.xdoclet.testapp.ejb.interfaces.AccountLocalHome.class); } --- 38,42 ---- } ! public static org.xdoclet.testapp.ejb.interfaces.AccountLocalHome getLocalHome(java.util.Hashtable env) throws javax.naming.NamingException { return (org.xdoclet.testapp.ejb.interfaces.AccountLocalHome) lookupHome(env, org.xdoclet.testapp.ejb.interfaces.AccountLocalHome.JNDI_NAME, org.xdoclet.testapp.ejb.interfaces.AccountLocalHome.class); } |
From: Diogo Q. <dqu...@us...> - 2006-06-07 22:14:26
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-xwork/src/test/java/org/xdoclet/plugin/xwork In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv27208/plugin-xwork/src/test/java/org/xdoclet/plugin/xwork Modified Files: AbstractXWorkTestCase.java Log Message: Plugin validation. Offline validation Index: AbstractXWorkTestCase.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-xwork/src/test/java/org/xdoclet/plugin/xwork/AbstractXWorkTestCase.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** AbstractXWorkTestCase.java 12 Apr 2006 18:18:12 -0000 1.5 --- AbstractXWorkTestCase.java 7 Jun 2006 01:43:49 -0000 1.6 *************** *** 6,10 **** package org.xdoclet.plugin.xwork; - import org.custommonkey.xmlunit.XMLUnit; import org.generama.JellyTemplateEngine; import org.generama.MetadataProvider; --- 6,9 ---- *************** *** 16,26 **** public abstract class AbstractXWorkTestCase extends AbstractXMLGeneratingPluginTestCase { - protected void setUp() - throws Exception { - super.setUp(); - XMLUnit.getControlDocumentBuilderFactory().setValidating(true); - XMLUnit.getTestDocumentBuilderFactory().setValidating(true); - } - protected Plugin createPlugin(MetadataProvider metadataProvider, WriterMapper writerMapper) { return new XWorkXMLPlugin(new JellyTemplateEngine(), (QDoxCapableMetadataProvider) metadataProvider, --- 15,18 ---- |
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/entity In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25729/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/entity Modified Files: LookupObjectPlugin.vm PrimaryKeyClassPlugin.java LookupObjectPlugin.java ValueObjectPlugin.java Log Message: Fix bugs. Index: PrimaryKeyClassPlugin.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/entity/PrimaryKeyClassPlugin.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PrimaryKeyClassPlugin.java 5 Jun 2006 00:02:50 -0000 1.7 --- PrimaryKeyClassPlugin.java 7 Jun 2006 01:42:34 -0000 1.8 *************** *** 18,23 **** import java.util.TreeSet; import org.generama.QDoxCapableMetadataProvider; - import org.generama.VelocityTemplateEngine; import org.generama.WriterMapper; --- 18,23 ---- import java.util.TreeSet; + import org.generama.MergeableVelocityTemplateEngine; import org.generama.QDoxCapableMetadataProvider; import org.generama.WriterMapper; *************** *** 29,32 **** --- 29,33 ---- import org.xdoclet.plugin.ejb.EjbUtils; import org.xdoclet.plugin.ejb.qtags.EjbPkTag; + import org.xdoclet.plugin.ejb.qtags.TagLibrary; import org.xdoclet.plugin.ejb.util.QDoxCachedMetadataProvider; *************** *** 48,52 **** private Map pkHierarchyCache = new HashMap(); ! public PrimaryKeyClassPlugin(VelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { super(templateEngine, new QDoxCachedMetadataProvider(metadataProvider), writerMapper, config); --- 49,53 ---- private Map pkHierarchyCache = new HashMap(); ! public PrimaryKeyClassPlugin(MergeableVelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { super(templateEngine, new QDoxCachedMetadataProvider(metadataProvider), writerMapper, config); *************** *** 267,271 **** for (Iterator iter = hierarchyLst.iterator(); iter.hasNext();) { JavaClass clazz = (JavaClass) iter.next(); ! pkTag = (EjbPkTag) clazz.getTagByName("ejb.pk"); if (pkTag != null) { --- 268,272 ---- for (Iterator iter = hierarchyLst.iterator(); iter.hasNext();) { JavaClass clazz = (JavaClass) iter.next(); ! pkTag = (EjbPkTag) clazz.getTagByName(TagLibrary.EJB_PK); if (pkTag != null) { *************** *** 387,401 **** protected String getLocalyDefinedFullClassName(JavaClass clazz) { ! EjbPkTag pkTag = (EjbPkTag) clazz.getTagByName("ejb.pk"); return (pkTag != null) ? pkTag.getClass_() : null; } protected String getPatternBasedUnqualifiedName(JavaClass clazz) { ! EjbPkTag pkTag = (EjbPkTag) clazz.getTagByName("ejb.pk"); return (pkTag != null && pkTag.getPattern() != null) ? ejbUtils.expandPattern(pkTag.getPattern(), clazz) : null; } protected String getLocalyDefinedPackageName(JavaClass clazz) { ! EjbPkTag pkTag = (EjbPkTag) clazz.getTagByName("ejb.pk"); return (pkTag != null) ? pkTag.getPackage() : null; } --- 388,402 ---- protected String getLocalyDefinedFullClassName(JavaClass clazz) { ! EjbPkTag pkTag = (EjbPkTag) clazz.getTagByName(TagLibrary.EJB_PK); return (pkTag != null) ? pkTag.getClass_() : null; } protected String getPatternBasedUnqualifiedName(JavaClass clazz) { ! EjbPkTag pkTag = (EjbPkTag) clazz.getTagByName(TagLibrary.EJB_PK); return (pkTag != null && pkTag.getPattern() != null) ? ejbUtils.expandPattern(pkTag.getPattern(), clazz) : null; } protected String getLocalyDefinedPackageName(JavaClass clazz) { ! EjbPkTag pkTag = (EjbPkTag) clazz.getTagByName(TagLibrary.EJB_PK); return (pkTag != null) ? pkTag.getPackage() : null; } Index: ValueObjectPlugin.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/entity/ValueObjectPlugin.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ValueObjectPlugin.java 5 Jun 2006 00:02:50 -0000 1.2 --- ValueObjectPlugin.java 7 Jun 2006 01:42:34 -0000 1.3 *************** *** 25,30 **** import org.generama.GeneramaException; import org.generama.QDoxCapableMetadataProvider; - import org.generama.VelocityTemplateEngine; import org.generama.WriterMapper; --- 25,30 ---- import org.generama.GeneramaException; + import org.generama.MergeableVelocityTemplateEngine; import org.generama.QDoxCapableMetadataProvider; import org.generama.WriterMapper; *************** *** 41,44 **** --- 41,45 ---- import org.xdoclet.plugin.ejb.qtags.EjbValueObjectFieldTag; import org.xdoclet.plugin.ejb.qtags.EjbValueObjectTag; + import org.xdoclet.plugin.ejb.qtags.TagLibrary; import org.xdoclet.plugin.ejb.util.DuplicatedJavaClass; import org.xdoclet.plugin.ejb.util.QDoxCachedMetadataProvider; *************** *** 96,100 **** private Map metaVoCache = new HashMap(); ! public ValueObjectPlugin(VelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { super(templateEngine, new QDoxValueObjectExpanderFilterMetadataProvider(metadataProvider), writerMapper, config); --- 97,101 ---- private Map metaVoCache = new HashMap(); ! public ValueObjectPlugin(MergeableVelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { super(templateEngine, new QDoxValueObjectExpanderFilterMetadataProvider(metadataProvider), writerMapper, config); *************** *** 643,648 **** public boolean isCloneable(Type type) { ! JavaMethod cloneMethod = type.getJavaClass().getMethodBySignature("clone", null); ! return type.isA(new Type(Cloneable.class.getName())) && cloneMethod != null && cloneMethod.isPublic(); } --- 644,649 ---- public boolean isCloneable(Type type) { ! // JavaMethod cloneMethod = type.getJavaClass().getMethodBySignature("clone", null); ! return type.isA(new Type(Cloneable.class.getName())); // && cloneMethod != null && cloneMethod.isPublic(); } *************** *** 836,840 **** public boolean isGeneratePKConstructor() { ! return valueTag.isGeneratePKConstructor(); } --- 837,841 ---- public boolean isGeneratePKConstructor() { ! return valueTag.isGeneratePkConstructor(); } *************** *** 996,1000 **** public ValueObjectMetadata getMetaVO(JavaClass javaClass) { ValueObjectMetadata retVal = null; ! DocletTag[] valueTags = javaClass.getTagsByName("ejb.value-object"); if (valueTags.length > 0 && log.isDebugEnabled()) { --- 997,1001 ---- public ValueObjectMetadata getMetaVO(JavaClass javaClass) { ValueObjectMetadata retVal = null; ! DocletTag[] valueTags = javaClass.getTagsByName(TagLibrary.EJB_VALUE_OBJECT); if (valueTags.length > 0 && log.isDebugEnabled()) { *************** *** 1210,1214 **** protected String getPatternBasedUnqualifiedName(JavaClass javaClass) { ! EjbValueObjectTag valueObjectTag = (EjbValueObjectTag) javaClass.getTagByName("ejb.value-object"); return ejbUtils.expandPattern(getPattern(valueObjectTag), valueObjectTag.getName_()); } --- 1211,1215 ---- protected String getPatternBasedUnqualifiedName(JavaClass javaClass) { ! EjbValueObjectTag valueObjectTag = (EjbValueObjectTag) javaClass.getTagByName(TagLibrary.EJB_VALUE_OBJECT); return ejbUtils.expandPattern(getPattern(valueObjectTag), valueObjectTag.getName_()); } *************** *** 1269,1273 **** } ! DocletTag[] tags = method.getTagsByName("ejb.value-object-field"); // Remote duplicate @ejb.value-object-match tags by 'match' --- 1270,1274 ---- } ! DocletTag[] tags = method.getTagsByName(TagLibrary.EJB_VALUE_OBJECT_FIELD); // Remote duplicate @ejb.value-object-match tags by 'match' *************** *** 1305,1309 **** protected static JavaClass[] expandClass(JavaClass javaClass) { List retLst = new ArrayList(); ! DocletTag[] valueTags = javaClass.getTagsByName("ejb.value-object"); int countTags; --- 1306,1310 ---- protected static JavaClass[] expandClass(JavaClass javaClass) { List retLst = new ArrayList(); ! DocletTag[] valueTags = javaClass.getTagsByName(TagLibrary.EJB_VALUE_OBJECT); int countTags; *************** *** 1318,1322 **** DocletTag tag = tags[j]; ! if ("ejb.value-object".equals(tag.getName())) { if (tagIdx++ == i) { newTags.add(tag); --- 1319,1323 ---- DocletTag tag = tags[j]; ! if (TagLibrary.EJB_VALUE_OBJECT.equals(tag.getName())) { if (tagIdx++ == i) { newTags.add(tag); Index: LookupObjectPlugin.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/entity/LookupObjectPlugin.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** LookupObjectPlugin.java 5 Jun 2006 00:02:50 -0000 1.3 --- LookupObjectPlugin.java 7 Jun 2006 01:42:34 -0000 1.4 *************** *** 8,13 **** import java.util.Map; import org.generama.QDoxCapableMetadataProvider; - import org.generama.VelocityTemplateEngine; import org.generama.WriterMapper; import org.xdoclet.plugin.ejb.EjbConfig; --- 8,13 ---- import java.util.Map; + import org.generama.MergeableVelocityTemplateEngine; import org.generama.QDoxCapableMetadataProvider; import org.generama.WriterMapper; import org.xdoclet.plugin.ejb.EjbConfig; *************** *** 20,23 **** --- 20,24 ---- import org.xdoclet.plugin.ejb.interfaces.RemoteHomeInterfacePlugin; import org.xdoclet.plugin.ejb.qtags.EjbUtilTag; + import org.xdoclet.plugin.ejb.qtags.TagLibrary; import org.xdoclet.plugin.ejb.util.QDoxCachedMetadataProvider; *************** *** 43,47 **** protected boolean includeGUID = true; ! public LookupObjectPlugin(VelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { super(templateEngine, new QDoxCachedMetadataProvider(metadataProvider), writerMapper, config); --- 44,48 ---- protected boolean includeGUID = true; ! public LookupObjectPlugin(MergeableVelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { super(templateEngine, new QDoxCachedMetadataProvider(metadataProvider), writerMapper, config); *************** *** 137,140 **** --- 138,147 ---- } } + + method = new JavaMethod(getDestinationClassname(metadata)); + method.setConstructor(true); + method.setModifiers(new String[] { "private" }); + retVal.addMethod(method); + if (getEjbUtils().isMessageDrivenBean(metadata)) { method = new JavaMethod("getQueue"); *************** *** 167,171 **** if (hasRemoteView(metadata)) { method = new JavaMethod("getHome"); ! method.setModifiers(new String[] { "public" }); method.setExceptions(new Type[] { new Type("javax.naming.NamingException") }); method --- 174,178 ---- if (hasRemoteView(metadata)) { method = new JavaMethod("getHome"); ! method.setModifiers(new String[] { "public", "static" }); method.setExceptions(new Type[] { new Type("javax.naming.NamingException") }); method *************** *** 174,178 **** retVal.addMethod(method); method = new JavaMethod("getHome"); ! method.setModifiers(new String[] { "public" }); method.setParameters(new JavaParameter[] { new JavaParameter(new Type("java.util.Hashtable"), "env") }); --- 181,185 ---- retVal.addMethod(method); method = new JavaMethod("getHome"); ! method.setModifiers(new String[] { "public", "static" }); method.setParameters(new JavaParameter[] { new JavaParameter(new Type("java.util.Hashtable"), "env") }); *************** *** 185,189 **** if (hasLocalView(metadata)) { method = new JavaMethod("getLocalHome"); ! method.setModifiers(new String[] { "public" }); method.setExceptions(new Type[] { new Type("javax.naming.NamingException") }); method --- 192,196 ---- if (hasLocalView(metadata)) { method = new JavaMethod("getLocalHome"); ! method.setModifiers(new String[] { "public", "static" }); method.setExceptions(new Type[] { new Type("javax.naming.NamingException") }); method *************** *** 192,196 **** retVal.addMethod(method); method = new JavaMethod("getLocalHome"); ! method.setModifiers(new String[] { "public" }); method.setParameters(new JavaParameter[] { new JavaParameter(new Type("java.util.Hashtable"), "env") }); --- 199,203 ---- retVal.addMethod(method); method = new JavaMethod("getLocalHome"); ! method.setModifiers(new String[] { "public", "static" }); method.setParameters(new JavaParameter[] { new JavaParameter(new Type("java.util.Hashtable"), "env") }); *************** *** 258,262 **** public boolean shouldGenerate(Object metadata) { JavaClass javaClass = (JavaClass) metadata; ! EjbUtilTag utilTag = (EjbUtilTag) javaClass.getTagByName("ejb.util"); boolean generate = ejbUtils.shouldGenerate(metadata); generate = generate && ((utilTag == null) || (utilTag.isGenerate())); --- 265,269 ---- public boolean shouldGenerate(Object metadata) { JavaClass javaClass = (JavaClass) metadata; ! EjbUtilTag utilTag = (EjbUtilTag) javaClass.getTagByName(TagLibrary.EJB_UTIL); boolean generate = ejbUtils.shouldGenerate(metadata); generate = generate && ((utilTag == null) || (utilTag.isGenerate())); *************** *** 283,287 **** public String lookupVarName(JavaClass javaClass) { ! EjbUtilTag utilTag = (EjbUtilTag) javaClass.getTagByName("ejb.util"); return ((utilTag == null) || "logical".equals(utilTag.getLookupKind())) ? ejbHomeUtils.getJndiNameConst() : ejbHomeUtils.getCompleteNameConst(); --- 290,294 ---- public String lookupVarName(JavaClass javaClass) { ! EjbUtilTag utilTag = (EjbUtilTag) javaClass.getTagByName(TagLibrary.EJB_UTIL); return ((utilTag == null) || "logical".equals(utilTag.getLookupKind())) ? ejbHomeUtils.getJndiNameConst() : ejbHomeUtils.getCompleteNameConst(); Index: LookupObjectPlugin.vm =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/entity/LookupObjectPlugin.vm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LookupObjectPlugin.vm 13 Dec 2005 03:36:17 -0000 1.2 --- LookupObjectPlugin.vm 7 Jun 2006 01:42:34 -0000 1.3 *************** *** 26,29 **** --- 26,33 ---- #end + private ${plugin.getDestinationClassname($class)}() { + // no instantiation + } + #if($util.isMessageDrivenBean($class)) /** *************** *** 70,74 **** #else #if($plugin.hasRemoteView($class)) ! public ${plugin.remoteHomeInterfacePlugin.getVirtualType($class)} getHome() throws javax.naming.NamingException { ${plugin.remoteHomeInterfacePlugin.getVirtualType($class)} retVal =#if($plugin.cachehomes) cachedRemoteHome#else null#end; if (retVal == null) { --- 74,78 ---- #else #if($plugin.hasRemoteView($class)) ! public static ${plugin.remoteHomeInterfacePlugin.getVirtualType($class)} getHome() throws javax.naming.NamingException { ${plugin.remoteHomeInterfacePlugin.getVirtualType($class)} retVal =#if($plugin.cachehomes) cachedRemoteHome#else null#end; if (retVal == null) { *************** *** 81,85 **** } ! public ${plugin.remoteHomeInterfacePlugin.getVirtualType($class)} getHome(java.util.Hashtable env) throws javax.naming.NamingException { return (${plugin.remoteHomeInterfacePlugin.getVirtualType($class)}) lookupHome(env, ${plugin.remoteHomeInterfacePlugin.getVirtualType($class)}.${plugin.lookupVarName($class)}, ${plugin.remoteHomeInterfacePlugin.getVirtualType($class)}.class); } --- 85,89 ---- } ! public static ${plugin.remoteHomeInterfacePlugin.getVirtualType($class)} getHome(java.util.Hashtable env) throws javax.naming.NamingException { return (${plugin.remoteHomeInterfacePlugin.getVirtualType($class)}) lookupHome(env, ${plugin.remoteHomeInterfacePlugin.getVirtualType($class)}.${plugin.lookupVarName($class)}, ${plugin.remoteHomeInterfacePlugin.getVirtualType($class)}.class); } *************** *** 87,91 **** #end #if($plugin.hasLocalView($class)) ! public ${plugin.localHomeInterfacePlugin.getVirtualType($class)} getLocalHome() throws javax.naming.NamingException { ${plugin.localHomeInterfacePlugin.getVirtualType($class)} retVal =#if($plugin.cachehomes) cachedHome#else null#end; if (retVal == null) { --- 91,95 ---- #end #if($plugin.hasLocalView($class)) ! public static ${plugin.localHomeInterfacePlugin.getVirtualType($class)} getLocalHome() throws javax.naming.NamingException { ${plugin.localHomeInterfacePlugin.getVirtualType($class)} retVal =#if($plugin.cachehomes) cachedHome#else null#end; if (retVal == null) { *************** *** 98,102 **** } ! public ${plugin.localHomeInterfacePlugin.getVirtualType($class)} getLocalHome(java.util.Hashtable env) throws javax.naming.NamingException { return (${plugin.localHomeInterfacePlugin.getVirtualType($class)}) lookupHome(env, ${plugin.localHomeInterfacePlugin.getVirtualType($class)}.${plugin.lookupVarName($class)}, ${plugin.localHomeInterfacePlugin.getVirtualType($class)}.class); } --- 102,106 ---- } ! public static ${plugin.localHomeInterfacePlugin.getVirtualType($class)} getLocalHome(java.util.Hashtable env) throws javax.naming.NamingException { return (${plugin.localHomeInterfacePlugin.getVirtualType($class)}) lookupHome(env, ${plugin.localHomeInterfacePlugin.getVirtualType($class)}.${plugin.lookupVarName($class)}, ${plugin.localHomeInterfacePlugin.getVirtualType($class)}.class); } |
From: Diogo Q. <dqu...@us...> - 2006-06-07 22:14:09
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25729/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb Modified Files: EjbJavaGeneratingPlugin.java EjbUtils.java EjbHomeUtils.java EjbIds.java Log Message: Fix bugs. Index: EjbJavaGeneratingPlugin.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/EjbJavaGeneratingPlugin.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** EjbJavaGeneratingPlugin.java 5 Jun 2006 00:02:50 -0000 1.6 --- EjbJavaGeneratingPlugin.java 7 Jun 2006 01:42:34 -0000 1.7 *************** *** 17,22 **** import org.apache.commons.logging.LogFactory; import org.generama.QDoxCapableMetadataProvider; - import org.generama.VelocityTemplateEngine; import org.generama.WriterMapper; --- 17,22 ---- import org.apache.commons.logging.LogFactory; + import org.generama.MergeableVelocityTemplateEngine; import org.generama.QDoxCapableMetadataProvider; import org.generama.WriterMapper; *************** *** 50,54 **** // For now, we are forcing to use velocity, maybe sometime, we may need to // pull down to a EjbVelocityJavaGeneratingPlugin, for example ! private final VelocityTemplateEngine templateEngine; /** Ejb Configuration object */ protected final EjbConfig config; --- 50,54 ---- // For now, we are forcing to use velocity, maybe sometime, we may need to // pull down to a EjbVelocityJavaGeneratingPlugin, for example ! private final MergeableVelocityTemplateEngine templateEngine; /** Ejb Configuration object */ protected final EjbConfig config; *************** *** 71,75 **** protected String packagereplace; ! public EjbJavaGeneratingPlugin(VelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { super(templateEngine, metadataProvider, writerMapper); --- 71,75 ---- protected String packagereplace; ! public EjbJavaGeneratingPlugin(MergeableVelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { super(templateEngine, metadataProvider, writerMapper); *************** *** 233,249 **** /** * A method called right before generation is called (one time if multiOutput is false, several otherwise). ! * Allows for late setting of directorios for example in MergeableVelocityTemplateEngine * * @see MergeableVelocityTemplateEngine#addPath(String) */ protected void preGenerate() { ! // Pending GRA-4 ! // if ((mergeDir != null) && mergeDir.isDirectory()) { ! // try { ! // templateEngine.addPath(mergeDir.getPath()); ! // } catch (Exception e) { ! // throw new Error(e); ! // } ! // } } --- 233,248 ---- /** * A method called right before generation is called (one time if multiOutput is false, several otherwise). ! * Allows for late setting of directories for example in MergeableVelocityTemplateEngine * * @see MergeableVelocityTemplateEngine#addPath(String) */ protected void preGenerate() { ! if ((mergeDir != null) && mergeDir.isDirectory()) { ! try { ! templateEngine.addPath(mergeDir.getPath()); ! } catch (Exception e) { ! throw new Error(e); ! } ! } } *************** *** 286,299 **** public File getMergeFile(String mergeFile) { if ((mergeFile != null) && (mergeDir != null) && mergeDir.isDirectory()) { ! // The listing of mergeDir's files avoid possibly security issues in path resolving (paranoid?) ! File[] files = mergeDir.listFiles(); ! ! for (int i = 0; i < files.length; i++) { ! if (mergeFile.trim().equals(files[i].getName())) { ! return files[i]; ! } ! } } return null; } --- 285,303 ---- public File getMergeFile(String mergeFile) { if ((mergeFile != null) && (mergeDir != null) && mergeDir.isDirectory()) { ! File retVal = new File(mergeDir, mergeFile); ! return isIn(retVal, mergeDir) ? retVal : null; } + // if ((mergeFile != null) && (mergeDir != null) && mergeDir.isDirectory()) { + // // The listing of mergeDir's files avoid possibly security issues in path resolving (paranoid?) + // File[] files = mergeDir.listFiles(); + // + // for (int i = 0; i < files.length; i++) { + // if (mergeFile.trim().equals(files[i].getName())) { + // return files[i]; + // } + // } + // } + return null; } Index: EjbUtils.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/EjbUtils.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** EjbUtils.java 13 Dec 2005 03:34:50 -0000 1.14 --- EjbUtils.java 7 Jun 2006 01:42:34 -0000 1.15 *************** *** 44,48 **** --- 44,50 ---- import org.xdoclet.plugin.ejb.qtags.EjbResourceEnvRefTag; import org.xdoclet.plugin.ejb.qtags.EjbResourceRefTag; + import org.xdoclet.plugin.ejb.qtags.EjbTransactionMethodTag; import org.xdoclet.plugin.ejb.qtags.EjbTransactionTag; + import org.xdoclet.plugin.ejb.qtags.TagLibrary; import org.xdoclet.plugin.ejb.qtags.parameter.RoleList; import org.xdoclet.plugin.ejb.util.DuplicatedJavaMethod; *************** *** 176,180 **** public String getEjbName(JavaClass clazz) { ! String result = clazz.getNamedParameter("ejb.bean", "name"); if (result == null) { --- 178,182 ---- public String getEjbName(JavaClass clazz) { ! String result = clazz.getNamedParameter(TagLibrary.EJB_BEAN, "name"); if (result == null) { *************** *** 221,230 **** int retVal = 0; ! if (method.getTagByName("ejb.interface-method") != null) { retVal = IFACE_METHOD_COMPONENT; ! } else if (method.getName().equals("ejbCreate") && (method.getTagByName("ejb.create-method") != null)) { retVal = IFACE_METHOD_CREATE; } else if (method.getName().startsWith("ejbHome") && (method.getName().length() > "ejbHome".length()) && ! (method.getTagByName("ejb.home-method") != null)) { retVal = IFACE_METHOD_HOME; } else if (method.getName().equals("ejbRemove")) { --- 223,232 ---- int retVal = 0; ! if (method.getTagByName(TagLibrary.EJB_INTERFACE_METHOD) != null) { retVal = IFACE_METHOD_COMPONENT; ! } else if (method.getName().equals("ejbCreate") && (method.getTagByName(TagLibrary.EJB_CREATE_METHOD) != null)) { retVal = IFACE_METHOD_CREATE; } else if (method.getName().startsWith("ejbHome") && (method.getName().length() > "ejbHome".length()) && ! (method.getTagByName(TagLibrary.EJB_HOME_METHOD) != null)) { retVal = IFACE_METHOD_HOME; } else if (method.getName().equals("ejbRemove")) { *************** *** 274,290 **** public int getMethodMetadata(JavaClass javaClass, JavaMethod method) { int retVal = getMethodType(method); ! EjbBeanTag beanTag = (EjbBeanTag) javaClass.getTagByName("ejb.bean"); DocletTag tag; ! if ((tag = method.getTagByName("ejb.persistence-field")) != null) { if ((method.isPropertyAccessor() /*|| method.isPropertyMutator()*/)) { retVal |= METADATA_METHOD_PERSISTENCE_FIELD; } else { if (log.isWarnEnabled()) { ! log.warn("Ignoring ejb.persistence-field tag. It should be place on property accessor. " + // or property mutator." + method.getDeclarationSignature(true) + " - " + EjbUtils.tagToString(tag)); } } ! } else if ((tag = method.getTagByName("ejb.relation")) != null) { // METADATA_METHOD_RELATION_FIELD isn't compatible with METADATA_METHOD_PERSISTENCE_FIELD ?? if (method.isPropertyAccessor()) { --- 276,292 ---- public int getMethodMetadata(JavaClass javaClass, JavaMethod method) { int retVal = getMethodType(method); ! EjbBeanTag beanTag = (EjbBeanTag) javaClass.getTagByName(TagLibrary.EJB_BEAN); DocletTag tag; ! if ((tag = method.getTagByName(TagLibrary.EJB_PERSISTENCE_FIELD)) != null) { if ((method.isPropertyAccessor() /*|| method.isPropertyMutator()*/)) { retVal |= METADATA_METHOD_PERSISTENCE_FIELD; } else { if (log.isWarnEnabled()) { ! log.warn("Ignoring " + TagLibrary.EJB_PERSISTENCE_FIELD + " tag. It should be place on property accessor. " + // or property mutator." + method.getDeclarationSignature(true) + " - " + EjbUtils.tagToString(tag)); } } ! } else if ((tag = method.getTagByName(TagLibrary.EJB_RELATION)) != null) { // METADATA_METHOD_RELATION_FIELD isn't compatible with METADATA_METHOD_PERSISTENCE_FIELD ?? if (method.isPropertyAccessor()) { *************** *** 294,298 **** } else { if (log.isWarnEnabled()) { ! log.warn("Ignoring ejb.relation tag. It should be place on property accessor." + method.getDeclarationSignature(true) + " - " + EjbUtils.tagToString(tag)); } --- 296,300 ---- } else { if (log.isWarnEnabled()) { ! log.warn("Ignoring " + TagLibrary.EJB_RELATION + " tag. It should be place on property accessor." + method.getDeclarationSignature(true) + " - " + EjbUtils.tagToString(tag)); } *************** *** 317,321 **** throw e; } ! } else if ((tag = method.getTagByName("ejb.pk-field")) != null) { // try { // method must be a property acessor --- 319,323 ---- throw e; } ! } else if ((tag = method.getTagByName(TagLibrary.EJB_PK_FIELD)) != null) { // try { // method must be a property acessor *************** *** 326,330 **** } else { if (log.isWarnEnabled()) { ! log.warn("Ignoring ejb.pk-field tag. It should be place on property accessor." + method.getDeclarationSignature(true) + " - " + EjbUtils.tagToString(tag)); } --- 328,332 ---- } else { if (log.isWarnEnabled()) { ! log.warn("Ignoring " + TagLibrary.EJB_PK_FIELD + " tag. It should be place on property accessor." + method.getDeclarationSignature(true) + " - " + EjbUtils.tagToString(tag)); } *************** *** 435,439 **** JavaClass javaClass = (JavaClass) metadata; boolean isEjb = isEJB(javaClass); ! EjbBeanTag beanTag = (EjbBeanTag) javaClass.getTagByName("ejb.bean"); boolean ignore = (beanTag != null) && !beanTag.isGenerate(); return isEjb && !ignore; --- 437,441 ---- JavaClass javaClass = (JavaClass) metadata; boolean isEjb = isEJB(javaClass); ! EjbBeanTag beanTag = (EjbBeanTag) javaClass.getTagByName(TagLibrary.EJB_BEAN); boolean ignore = (beanTag != null) && !beanTag.isGenerate(); return isEjb && !ignore; *************** *** 450,454 **** public String description(JavaClass javaClass) { ! String description = javaClass.getNamedParameter("ejb.bean", "description"); if (description == null) { --- 452,456 ---- public String description(JavaClass javaClass) { ! String description = javaClass.getNamedParameter(TagLibrary.EJB_BEAN, "description"); if (description == null) { *************** *** 571,575 **** public int getViewType(JavaClass javaClass) { EjbVersion version = config.getEjbVersion(); ! String viewType = javaClass.getNamedParameter("ejb.bean", "view-type"); if (!version.greaterOrEquals(EjbVersion.EJB_2_0)) { --- 573,577 ---- public int getViewType(JavaClass javaClass) { EjbVersion version = config.getEjbVersion(); ! String viewType = javaClass.getNamedParameter(TagLibrary.EJB_BEAN, "view-type"); if (!version.greaterOrEquals(EjbVersion.EJB_2_0)) { *************** *** 595,599 **** switch (methodType) { case IFACE_METHOD_COMPONENT: ! viewType = method.getNamedParameter("ejb.interface-method", "view-type"); retVal = (viewType != null) ? getViewType(viewType) : beanViewType; --- 597,601 ---- switch (methodType) { case IFACE_METHOD_COMPONENT: ! viewType = method.getNamedParameter(TagLibrary.EJB_INTERFACE_METHOD, "view-type"); retVal = (viewType != null) ? getViewType(viewType) : beanViewType; *************** *** 604,608 **** case IFACE_METHOD_CREATE: ! viewType = method.getNamedParameter("ejb.create-method", "view-type"); retVal = (viewType != null) ? getViewType(viewType) : beanViewType; --- 606,610 ---- case IFACE_METHOD_CREATE: ! viewType = method.getNamedParameter(TagLibrary.EJB_CREATE_METHOD, "view-type"); retVal = (viewType != null) ? getViewType(viewType) : beanViewType; *************** *** 613,617 **** case IFACE_METHOD_HOME: ! viewType = method.getNamedParameter("ejb.home-method", "view-type"); retVal = (viewType != null) ? getViewType(viewType) : beanViewType; --- 615,619 ---- case IFACE_METHOD_HOME: ! viewType = method.getNamedParameter(TagLibrary.EJB_HOME_METHOD, "view-type"); retVal = (viewType != null) ? getViewType(viewType) : beanViewType; *************** *** 676,680 **** public int getBeanType(JavaClass javaClass) { EjbVersion version = config.getEjbVersion(); ! String beanType = javaClass.getNamedParameter("ejb.bean", "type"); int retVal = 0; --- 678,682 ---- public int getBeanType(JavaClass javaClass) { EjbVersion version = config.getEjbVersion(); ! String beanType = javaClass.getNamedParameter(TagLibrary.EJB_BEAN, "type"); int retVal = 0; *************** *** 708,712 **** public String reentrant(JavaClass javaClass) { EjbVersion version = config.getEjbVersion(); ! String reentrant = javaClass.getNamedParameter("ejb.bean", "reentrant"); String retVal = Boolean.valueOf(reentrant).toString(); --- 710,714 ---- public String reentrant(JavaClass javaClass) { EjbVersion version = config.getEjbVersion(); ! String reentrant = javaClass.getNamedParameter(TagLibrary.EJB_BEAN, "reentrant"); String retVal = Boolean.valueOf(reentrant).toString(); *************** *** 797,803 **** public boolean hasActivationConfig(JavaClass javaClass) { ! EjbBeanTag beanTag = (EjbBeanTag) javaClass.getTagByName("ejb.bean"); EjbActivationConfigPropertyTag actTag = (EjbActivationConfigPropertyTag) javaClass.getTagByName( ! "ejb.activation-config-property"); boolean retVal = false; --- 799,805 ---- public boolean hasActivationConfig(JavaClass javaClass) { ! EjbBeanTag beanTag = (EjbBeanTag) javaClass.getTagByName(TagLibrary.EJB_BEAN); EjbActivationConfigPropertyTag actTag = (EjbActivationConfigPropertyTag) javaClass.getTagByName( ! TagLibrary.EJB_ACTIVATION_CONFIG_PROPERTY); boolean retVal = false; *************** *** 814,818 **** public boolean isUseSoftLocking(JavaClass javaClass) { ! EjbBeanTag beanTag = (EjbBeanTag) javaClass.getTagByName("ejb.bean"); return (beanTag != null) && beanTag.isUseSoftLocking(); } --- 816,820 ---- public boolean isUseSoftLocking(JavaClass javaClass) { ! EjbBeanTag beanTag = (EjbBeanTag) javaClass.getTagByName(TagLibrary.EJB_BEAN); return (beanTag != null) && beanTag.isUseSoftLocking(); } *************** *** 1031,1035 **** // Class level tag if (refClass != null) { ! ejbRefName = ejbJndiName(refClass, isRemoteEjbRef(viewType, refClass) ? REMOTE : LOCAL); } else { throw getErrorWithTagLocation(tag, "'" + paramName + "' is mandatory for class level tag"); --- 1033,1037 ---- // Class level tag if (refClass != null) { ! ejbRefName = getComponentName(refClass, isRemoteEjbRef(viewType, refClass) ? REMOTE : LOCAL, true); } else { throw getErrorWithTagLocation(tag, "'" + paramName + "' is mandatory for class level tag"); *************** *** 1051,1066 **** } ! public String ejbJndiName(JavaClass clazz, int viewType) { StringBuffer retName = new StringBuffer(); - retName.append("ejb/"); - retName.append(jndiName(clazz, viewType)); - return retName.toString(); - } - - public String jndiName(JavaClass clazz, int viewType) { - String ejbName = getEjbName(clazz); - ejbName = ejbName.replace('.', '/'); - StringBuffer retName = new StringBuffer(ejbName); if (viewType == LOCAL) { retName.append("Local"); --- 1053,1064 ---- } ! public String getComponentName(JavaClass clazz, int viewType, boolean prependEjb) { StringBuffer retName = new StringBuffer(); + String ejbName = getEjbName(clazz).replace('.', '/'); + if (prependEjb && !ejbName.startsWith("ejb/")) { + retName.append("ejb/"); + } + retName.append(ejbName); if (viewType == LOCAL) { retName.append("Local"); *************** *** 1072,1075 **** --- 1070,1088 ---- } + public String getJndiName(JavaClass clazz, int viewType) { + EjbBeanTag beanTag = (EjbBeanTag)clazz.getTagByName(TagLibrary.EJB_BEAN); + + String jndiName = null; + if ((beanTag != null) && (viewType == LOCAL)) { + jndiName = beanTag.getLocalJndiName(); + } else if ((beanTag != null) && (viewType == REMOTE)) { + jndiName = beanTag.getJndiName(); + } + if (jndiName == null) { + jndiName = getComponentName(clazz, viewType, false); + } + return jndiName; + } + public boolean isLocalEjbRef(String viewType, JavaClass refClass) { return isEjbRefType(viewType, refClass, LOCAL); *************** *** 1159,1188 **** for (Iterator iter = ejbBeans.iterator(); iter.hasNext();) { JavaClass javaClass = (JavaClass) iter.next(); ! roleTags.addAll(Arrays.asList(javaClass.getTagsByName("ejb.permission"))); JavaMethod[] methods = javaClass.getMethods(); for (int i = 0; i < methods.length; i++) { ! if (methods[i].getTagByName("ejb.permission") != null) { int methodType = getMethodType(methods[i]); if ((methodType != IFACE_METHOD_CREATE) && (methodType != IFACE_METHOD_COMPONENT)) { ! throw getErrorWithTagLocation(methods[i].getTagByName("ejb.permission"), "Can't mark a method permission on a non interface or create method"); } } ! roleTags.addAll(Arrays.asList(methods[i].getTagsByName("ejb.permission"))); } if (isEntityBean(javaClass)) { // get roles from finders ! roleTags.addAll(Arrays.asList(javaClass.getTagsByName("ejb.finder"))); // and from pk field ( if any ) ! roleTags.addAll(Arrays.asList(javaClass.getTagsByName("ejb.pk"))); } // and from extra security roles ! roleTags.addAll(Arrays.asList(javaClass.getTagsByName("ejb.security-roles"))); } --- 1172,1201 ---- for (Iterator iter = ejbBeans.iterator(); iter.hasNext();) { JavaClass javaClass = (JavaClass) iter.next(); ! roleTags.addAll(Arrays.asList(javaClass.getTagsByName(TagLibrary.EJB_PERMISSION))); JavaMethod[] methods = javaClass.getMethods(); for (int i = 0; i < methods.length; i++) { ! if (methods[i].getTagByName(TagLibrary.EJB_PERMISSION) != null) { int methodType = getMethodType(methods[i]); if ((methodType != IFACE_METHOD_CREATE) && (methodType != IFACE_METHOD_COMPONENT)) { ! throw getErrorWithTagLocation(methods[i].getTagByName(TagLibrary.EJB_PERMISSION), "Can't mark a method permission on a non interface or create method"); } } ! roleTags.addAll(Arrays.asList(methods[i].getTagsByName(TagLibrary.EJB_PERMISSION))); } if (isEntityBean(javaClass)) { // get roles from finders ! roleTags.addAll(Arrays.asList(javaClass.getTagsByName(TagLibrary.EJB_FINDER))); // and from pk field ( if any ) ! roleTags.addAll(Arrays.asList(javaClass.getTagsByName(TagLibrary.EJB_PK))); } // and from extra security roles ! roleTags.addAll(Arrays.asList(javaClass.getTagsByName(TagLibrary.EJB_SECURITY_ROLES))); } *************** *** 1813,1817 **** // having a method getAccounts. // For now, i am not seeing any problem... ! manager.manage((EjbRelationTag) methods[i].getTagByName("ejb.relation"), methods[i], javaClass); } } --- 1826,1830 ---- // having a method getAccounts. // For now, i am not seeing any problem... ! manager.manage((EjbRelationTag) methods[i].getTagByName(TagLibrary.EJB_RELATION), methods[i], javaClass); } } *************** *** 1886,1890 **** // Let dig into class level ejb.permission tags ! tags = javaClass.getTagsByName("ejb.permission"); for (int i = 0; i < tags.length; i++) { --- 1899,1903 ---- // Let dig into class level ejb.permission tags ! tags = javaClass.getTagsByName(TagLibrary.EJB_PERMISSION); for (int i = 0; i < tags.length; i++) { *************** *** 1932,1936 **** for (int j = 0; j < methods.length; j++) { ! tags = (method = methods[j]).getTagsByName("ejb.permission"); for (int k = 0; k < tags.length; k++) { --- 1945,1949 ---- for (int j = 0; j < methods.length; j++) { ! tags = (method = methods[j]).getTagsByName(TagLibrary.EJB_PERMISSION); for (int k = 0; k < tags.length; k++) { *************** *** 1982,1986 **** if (isEntityBean(javaClass)) { ! tags = javaClass.getTagsByName("ejb.finder"); // Let dig into class level ejb.finder tags --- 1995,1999 ---- if (isEntityBean(javaClass)) { ! tags = javaClass.getTagsByName(TagLibrary.EJB_FINDER); // Let dig into class level ejb.finder tags *************** *** 2025,2029 **** } ! EjbPkTag pkTag = (EjbPkTag) javaClass.getTagByName("ejb.pk"); if (pkTag != null) { --- 2038,2042 ---- } ! EjbPkTag pkTag = (EjbPkTag) javaClass.getTagByName(TagLibrary.EJB_PK); if (pkTag != null) { *************** *** 2068,2072 **** } ! public Collection getContainerTransaction(JavaClass javaClass) { Collection retLst = new ArrayList(); DocletTag[] tags; --- 2081,2085 ---- } ! public Collection getContainerTransactions(JavaClass javaClass) { Collection retLst = new ArrayList(); DocletTag[] tags; *************** *** 2077,2085 **** // Let dig into class level ejb.transaction tags ! tags = javaClass.getTagsByName("ejb.transaction"); for (int i = 0; i < tags.length; i++) { EjbTransactionTag transTag = (EjbTransactionTag) tags[i]; ! int permType = getViewType(javaClass); // ------------------------------------------------------- --- 2090,2099 ---- // Let dig into class level ejb.transaction tags ! tags = javaClass.getTagsByName(TagLibrary.EJB_TRANSACTION); for (int i = 0; i < tags.length; i++) { EjbTransactionTag transTag = (EjbTransactionTag) tags[i]; ! int permType = 0; ! //int permType = getViewType(javaClass); // ------------------------------------------------------- *************** *** 2087,2097 **** // that are compatible with the bean // HUMM: Is this valid ? ! if (permType == 0) { ! throw getErrorWithTagLocation(transTag, ! "Couldn't resolve a compatible interface type reference. Maybe bean/view-type/version doesn't support it!"); } // Lets expand by permission for interface type ! retLst.addAll(ContainerTransaction.unroll(permType, transTag.getType())); } --- 2101,2127 ---- // that are compatible with the bean // HUMM: Is this valid ? ! if (transTag.getMethodIntf() != null) { ! permType = getViewType(javaClass); ! permType &= getInterfaceType(transTag.getMethodIntf()); ! if (permType == 0) { ! throw getErrorWithTagLocation(transTag, ! "Couldn't resolve a compatible interface type reference. Maybe bean/view-type/version doesn't support it!"); ! } ! // Lets expand by permission for interface type ! // Only one entry should be present ! retLst.addAll(ContainerTransaction.unroll(permType, transTag.getType())); ! } else { ! // No permission was set ! retLst.add(new ContainerTransaction(transTag.getType())); } + // if (permType == 0) { + // throw getErrorWithTagLocation(transTag, + // "Couldn't resolve a compatible interface type reference. Maybe bean/view-type/version doesn't support it!"); + // } + + // Lets expand by permission for interface type ! // retLst.addAll(ContainerTransaction.unroll(permType, transTag.getType())); } *************** *** 2101,2108 **** for (int j = 0; j < methods.length; j++) { ! tags = (method = methods[j]).getTagsByName("ejb.transaction"); for (int k = 0; k < tags.length; k++) { ! EjbTransactionTag transTag = (EjbTransactionTag) tags[k]; int methodType = getMethodType(method); --- 2131,2138 ---- for (int j = 0; j < methods.length; j++) { ! tags = (method = methods[j]).getTagsByName(TagLibrary.EJB_TRANSACTION_METHOD); for (int k = 0; k < tags.length; k++) { ! EjbTransactionMethodTag transTag = (EjbTransactionMethodTag) tags[k]; int methodType = getMethodType(method); *************** *** 2129,2133 **** if (isEntityBean(javaClass)) { ! tags = javaClass.getTagsByName("ejb.finder"); // Let dig into class level ejb.finder tags --- 2159,2163 ---- if (isEntityBean(javaClass)) { ! tags = javaClass.getTagsByName(TagLibrary.EJB_FINDER); // Let dig into class level ejb.finder tags *************** *** 2273,2276 **** --- 2303,2311 ---- // class level - applies to all methods + public ContainerTransaction(String transType) { + this(null, null, transType); + } + + // class level - applies to all methods public ContainerTransaction(String ifaceType, String transType) { this(ifaceType, null, transType); Index: EjbHomeUtils.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/EjbHomeUtils.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** EjbHomeUtils.java 13 Dec 2005 03:34:50 -0000 1.3 --- EjbHomeUtils.java 7 Jun 2006 01:42:34 -0000 1.4 *************** *** 18,21 **** --- 18,22 ---- import org.xdoclet.plugin.ejb.entity.PrimaryKeyClassPlugin; import org.xdoclet.plugin.ejb.qtags.EjbFinderTag; + import org.xdoclet.plugin.ejb.qtags.TagLibrary; import org.xdoclet.plugin.ejb.util.DuplicatedJavaMethod; *************** *** 167,171 **** Collection finderMethodsBySignature = CollectionUtils.select(Arrays.asList(javaClass.getTagsByName( ! "ejb.finder", true)), new Predicate() { public boolean evaluate(Object object) { --- 168,172 ---- Collection finderMethodsBySignature = CollectionUtils.select(Arrays.asList(javaClass.getTagsByName( ! TagLibrary.EJB_FINDER, true)), new Predicate() { public boolean evaluate(Object object) { Index: EjbIds.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/EjbIds.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EjbIds.java 6 Oct 2005 13:47:17 -0000 1.2 --- EjbIds.java 7 Jun 2006 01:42:34 -0000 1.3 *************** *** 1,71 **** ! /* ! * Copyright (c) 2005 ! * XDoclet Team ! * All rights reserved. ! */ ! package org.xdoclet.plugin.ejb; ! ! import java.util.HashMap; ! import java.util.Map; ! ! /** ! * Singleton for ID generation ! * ! * @author Diogo Quintela ! * @version $Revision$ ! * ! * TODO: After all we aren't going to need to remember id's that we've returned. ! * Maybe EjbRuntime can also be used ! */ ! public class EjbIds { ! private static EjbIds instance = new EjbIds(); ! private Map idManagers = new HashMap(); ! ! private EjbIds() { ! // Empty ! } ! ! public static EjbIds get() { ! return instance; ! } ! ! private synchronized IdManager getManager(String prefix) { ! IdManager manager = (IdManager) idManagers.get(prefix); ! ! if (manager == null) { ! manager = new IdManager(prefix); ! idManagers.put(prefix, manager); ! } ! ! return manager; ! } ! ! public static String escapeId(String id) { ! String retVal = id.replace(' ', '_'); ! retVal = retVal.replace('-', '_'); ! retVal = retVal.replace('/', '_'); ! return retVal; ! } ! ! public String prefixedId(String prefix) { ! IdManager manager = getManager(prefix); ! return manager.getId(); ! } ! ! private final class IdManager { ! private int count = 0; ! private String prefix; ! ! public IdManager(String prefix) { ! this.prefix = prefix; ! } ! ! private synchronized int inc() { ! return ++count; ! } ! ! public String getId() { ! return escapeId(prefix + ' ' + inc()); ! } ! } } \ No newline at end of file --- 1,71 ---- ! /* ! * Copyright (c) 2005 ! * XDoclet Team ! * All rights reserved. ! */ ! package org.xdoclet.plugin.ejb; ! ! import java.util.HashMap; ! import java.util.Map; ! ! /** ! * Singleton for ID generation ! * ! * @author Diogo Quintela ! * @version $Revision$ ! * ! * TODO: After all we aren't going to need to remember id's that we've returned (?). ! * Maybe EjbRuntime can also be used ! */ ! public class EjbIds { ! private static EjbIds instance = new EjbIds(); ! private Map idManagers = new HashMap(); ! ! private EjbIds() { ! // Empty ! } ! ! public static EjbIds get() { ! return instance; ! } ! ! private synchronized IdManager getManager(String prefix) { ! IdManager manager = (IdManager) idManagers.get(prefix); ! ! if (manager == null) { ! manager = new IdManager(prefix); ! idManagers.put(prefix, manager); ! } ! ! return manager; ! } ! ! public static String escapeId(String id) { ! String retVal = id.replace(' ', '_'); ! retVal = retVal.replace('-', '_'); ! retVal = retVal.replace('/', '_'); ! return retVal; ! } ! ! public String prefixedId(String prefix) { ! IdManager manager = getManager(prefix); ! return manager.getId(); ! } ! ! private final class IdManager { ! private int count = 0; ! private String prefix; ! ! public IdManager(String prefix) { ! this.prefix = prefix; ! } ! ! private synchronized int inc() { ! return ++count; ! } ! ! public String getId() { ! return escapeId(prefix + ' ' + inc()); ! } ! } } \ No newline at end of file |
From: Diogo Q. <dqu...@us...> - 2006-06-07 22:14:05
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-xwork/src/main/java/org/xdoclet/plugin/xwork/dtd In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv27122/plugin-xwork/src/main/java/org/xdoclet/plugin/xwork/dtd Log Message: Directory /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-xwork/src/main/java/org/xdoclet/plugin/xwork/dtd added to the repository |
From: Diogo Q. <dqu...@us...> - 2006-06-07 22:13:51
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/interfaces In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25729/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/interfaces Modified Files: LocalHomeInterfacePlugin.java LocalInterfaceBase.java RemoteHomeInterfacePlugin.java RemoteInterfacePlugin.java ServiceEndpointPlugin.java LocalInterfacePlugin.java RemoteInterfaceBase.java Log Message: Fix bugs. Index: RemoteInterfaceBase.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/interfaces/RemoteInterfaceBase.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** RemoteInterfaceBase.java 13 Dec 2005 03:37:45 -0000 1.6 --- RemoteInterfaceBase.java 7 Jun 2006 01:42:34 -0000 1.7 *************** *** 6,11 **** package org.xdoclet.plugin.ejb.interfaces; import org.generama.QDoxCapableMetadataProvider; - import org.generama.VelocityTemplateEngine; import org.generama.WriterMapper; --- 6,11 ---- package org.xdoclet.plugin.ejb.interfaces; + import org.generama.MergeableVelocityTemplateEngine; import org.generama.QDoxCapableMetadataProvider; import org.generama.WriterMapper; *************** *** 33,37 **** * @throws ClassNotFoundException TODO: DOCUMENT ME! */ ! public RemoteInterfaceBase(VelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { super(templateEngine, metadataProvider, writerMapper, config); --- 33,37 ---- * @throws ClassNotFoundException TODO: DOCUMENT ME! */ ! public RemoteInterfaceBase(MergeableVelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { super(templateEngine, metadataProvider, writerMapper, config); Index: RemoteInterfacePlugin.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/interfaces/RemoteInterfacePlugin.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** RemoteInterfacePlugin.java 5 Jun 2006 00:02:50 -0000 1.18 --- RemoteInterfacePlugin.java 7 Jun 2006 01:42:34 -0000 1.19 *************** *** 13,18 **** import java.util.Iterator; import org.generama.QDoxCapableMetadataProvider; - import org.generama.VelocityTemplateEngine; import org.generama.WriterMapper; --- 13,18 ---- import java.util.Iterator; + import org.generama.MergeableVelocityTemplateEngine; import org.generama.QDoxCapableMetadataProvider; import org.generama.WriterMapper; *************** *** 23,26 **** --- 23,27 ---- import org.xdoclet.plugin.ejb.EjbUtils; import org.xdoclet.plugin.ejb.qtags.EjbInterfaceTag; + import org.xdoclet.plugin.ejb.qtags.TagLibrary; import org.xdoclet.plugin.ejb.util.DuplicatedJavaMethod; *************** *** 38,43 **** // TODO: Support ejb:bean remote-business-interface ! // TODO: Needs new patch at generama (GRA-4) ! public RemoteInterfacePlugin(VelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { super(templateEngine, metadataProvider, writerMapper, config); --- 39,43 ---- // TODO: Support ejb:bean remote-business-interface ! public RemoteInterfacePlugin(MergeableVelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { super(templateEngine, metadataProvider, writerMapper, config); *************** *** 84,88 **** public String[] getExtends(JavaClass javaClass) { Collection extendsLst = new ArrayList(); ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) javaClass.getTagByName("ejb.interface"); if ((interfaceTag != null) && (interfaceTag.getExtends() != null)) { --- 84,88 ---- public String[] getExtends(JavaClass javaClass) { Collection extendsLst = new ArrayList(); ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) javaClass.getTagByName(TagLibrary.EJB_INTERFACE); if ((interfaceTag != null) && (interfaceTag.getExtends() != null)) { *************** *** 99,103 **** public boolean shouldGenerate(Object metadata) { JavaClass javaClass = (JavaClass) metadata; ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) javaClass.getTagByName("ejb.interface"); boolean generate = super.shouldGenerate(metadata); generate = generate && ((interfaceTag == null) || Arrays.asList(interfaceTag.getGenerate()).contains("remote")); --- 99,103 ---- public boolean shouldGenerate(Object metadata) { JavaClass javaClass = (JavaClass) metadata; ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) javaClass.getTagByName(TagLibrary.EJB_INTERFACE); boolean generate = super.shouldGenerate(metadata); generate = generate && ((interfaceTag == null) || Arrays.asList(interfaceTag.getGenerate()).contains("remote")); *************** *** 106,115 **** protected String getLocalyDefinedFullClassName(JavaClass clazz) { ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) clazz.getTagByName("ejb.interface"); return interfaceTag != null ? interfaceTag.getRemoteClass() : super.getLocalyDefinedFullClassName(clazz); } protected String getLocalyDefinedPackageName(JavaClass clazz) { ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) clazz.getTagByName("ejb.interface"); String definedPackage = null; --- 106,115 ---- protected String getLocalyDefinedFullClassName(JavaClass clazz) { ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) clazz.getTagByName(TagLibrary.EJB_INTERFACE); return interfaceTag != null ? interfaceTag.getRemoteClass() : super.getLocalyDefinedFullClassName(clazz); } protected String getLocalyDefinedPackageName(JavaClass clazz) { ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) clazz.getTagByName(TagLibrary.EJB_INTERFACE); String definedPackage = null; *************** *** 126,130 **** protected String getPatternBasedUnqualifiedName(JavaClass clazz) { ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) clazz.getTagByName("ejb.interface"); String pattern = null; --- 126,130 ---- protected String getPatternBasedUnqualifiedName(JavaClass clazz) { ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) clazz.getTagByName(TagLibrary.EJB_INTERFACE); String pattern = null; Index: RemoteHomeInterfacePlugin.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/interfaces/RemoteHomeInterfacePlugin.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** RemoteHomeInterfacePlugin.java 5 Jun 2006 00:02:50 -0000 1.9 --- RemoteHomeInterfacePlugin.java 7 Jun 2006 01:42:34 -0000 1.10 *************** *** 14,19 **** import java.util.Map; import org.generama.QDoxCapableMetadataProvider; - import org.generama.VelocityTemplateEngine; import org.generama.WriterMapper; --- 14,19 ---- import java.util.Map; + import org.generama.MergeableVelocityTemplateEngine; import org.generama.QDoxCapableMetadataProvider; import org.generama.WriterMapper; *************** *** 24,27 **** --- 24,28 ---- import org.xdoclet.plugin.ejb.EjbUtils; import org.xdoclet.plugin.ejb.qtags.EjbHomeTag; + import org.xdoclet.plugin.ejb.qtags.TagLibrary; import org.xdoclet.plugin.ejb.util.DuplicatedJavaMethod; *************** *** 51,55 **** * @throws ClassNotFoundException in case of error */ ! public RemoteHomeInterfacePlugin(VelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { super(templateEngine, metadataProvider, writerMapper, config); --- 52,56 ---- * @throws ClassNotFoundException in case of error */ ! public RemoteHomeInterfacePlugin(MergeableVelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { super(templateEngine, metadataProvider, writerMapper, config); *************** *** 120,124 **** public String[] getExtends(JavaClass javaClass) { Collection extendsLst = new ArrayList(); ! EjbHomeTag homeTag = (EjbHomeTag) javaClass.getTagByName("ejb.home"); if ((homeTag != null) && (homeTag.getExtends() != null)) { --- 121,125 ---- public String[] getExtends(JavaClass javaClass) { Collection extendsLst = new ArrayList(); ! EjbHomeTag homeTag = (EjbHomeTag) javaClass.getTagByName(TagLibrary.EJB_HOME); if ((homeTag != null) && (homeTag.getExtends() != null)) { *************** *** 134,147 **** public String ejbJndiName(JavaClass clazz) { ! return ejbUtils.ejbJndiName(clazz, EjbUtils.REMOTE); } public String jndiName(JavaClass clazz) { ! return ejbUtils.jndiName(clazz, EjbUtils.REMOTE); } public boolean shouldGenerate(Object metadata) { JavaClass javaClass = (JavaClass) metadata; ! EjbHomeTag homeTag = (EjbHomeTag) javaClass.getTagByName("ejb.home"); boolean generate = super.shouldGenerate(metadata); generate = generate && ((homeTag == null) || Arrays.asList(homeTag.getGenerate()).contains("remote")); --- 135,148 ---- public String ejbJndiName(JavaClass clazz) { ! return ejbUtils.getComponentName(clazz, EjbUtils.REMOTE, true); } public String jndiName(JavaClass clazz) { ! return ejbUtils.getJndiName(clazz, EjbUtils.REMOTE); } public boolean shouldGenerate(Object metadata) { JavaClass javaClass = (JavaClass) metadata; ! EjbHomeTag homeTag = (EjbHomeTag) javaClass.getTagByName(TagLibrary.EJB_HOME); boolean generate = super.shouldGenerate(metadata); generate = generate && ((homeTag == null) || Arrays.asList(homeTag.getGenerate()).contains("remote")); *************** *** 150,159 **** protected String getLocalyDefinedFullClassName(JavaClass clazz) { ! EjbHomeTag homeTag = (EjbHomeTag) clazz.getTagByName("ejb.home"); return homeTag != null ? homeTag.getRemoteClass() : super.getLocalyDefinedFullClassName(clazz); } protected String getLocalyDefinedPackageName(JavaClass clazz) { ! EjbHomeTag homeTag = (EjbHomeTag) clazz.getTagByName("ejb.home"); String definedPackage = null; --- 151,160 ---- protected String getLocalyDefinedFullClassName(JavaClass clazz) { ! EjbHomeTag homeTag = (EjbHomeTag) clazz.getTagByName(TagLibrary.EJB_HOME); return homeTag != null ? homeTag.getRemoteClass() : super.getLocalyDefinedFullClassName(clazz); } protected String getLocalyDefinedPackageName(JavaClass clazz) { ! EjbHomeTag homeTag = (EjbHomeTag) clazz.getTagByName(TagLibrary.EJB_HOME); String definedPackage = null; *************** *** 170,174 **** protected String getPatternBasedUnqualifiedName(JavaClass clazz) { ! EjbHomeTag homeTag = (EjbHomeTag) clazz.getTagByName("ejb.home"); String pattern = null; --- 171,175 ---- protected String getPatternBasedUnqualifiedName(JavaClass clazz) { ! EjbHomeTag homeTag = (EjbHomeTag) clazz.getTagByName(TagLibrary.EJB_HOME); String pattern = null; Index: LocalHomeInterfacePlugin.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/interfaces/LocalHomeInterfacePlugin.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** LocalHomeInterfacePlugin.java 5 Jun 2006 00:02:50 -0000 1.8 --- LocalHomeInterfacePlugin.java 7 Jun 2006 01:42:34 -0000 1.9 *************** *** 12,17 **** import java.util.Map; import org.generama.QDoxCapableMetadataProvider; - import org.generama.VelocityTemplateEngine; import org.generama.WriterMapper; --- 12,17 ---- import java.util.Map; + import org.generama.MergeableVelocityTemplateEngine; import org.generama.QDoxCapableMetadataProvider; import org.generama.WriterMapper; *************** *** 22,25 **** --- 22,26 ---- import org.xdoclet.plugin.ejb.EjbUtils; import org.xdoclet.plugin.ejb.qtags.EjbHomeTag; + import org.xdoclet.plugin.ejb.qtags.TagLibrary; import org.xdoclet.plugin.ejb.util.DuplicatedJavaMethod; *************** *** 50,54 **** * @throws ClassNotFoundException in case of error */ ! public LocalHomeInterfacePlugin(VelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { super(templateEngine, metadataProvider, writerMapper, config); --- 51,55 ---- * @throws ClassNotFoundException in case of error */ ! public LocalHomeInterfacePlugin(MergeableVelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { super(templateEngine, metadataProvider, writerMapper, config); *************** *** 120,124 **** public String[] getExtends(JavaClass javaClass) { Collection extendsLst = new ArrayList(); ! EjbHomeTag homeTag = (EjbHomeTag) javaClass.getTagByName("ejb.home"); if ((homeTag != null) && (homeTag.getLocalExtends() != null)) { --- 121,125 ---- public String[] getExtends(JavaClass javaClass) { Collection extendsLst = new ArrayList(); ! EjbHomeTag homeTag = (EjbHomeTag) javaClass.getTagByName(TagLibrary.EJB_HOME); if ((homeTag != null) && (homeTag.getLocalExtends() != null)) { *************** *** 134,147 **** public String ejbJndiName(JavaClass clazz) { ! return ejbUtils.ejbJndiName(clazz, EjbUtils.LOCAL); } public String jndiName(JavaClass clazz) { ! return ejbUtils.jndiName(clazz, EjbUtils.LOCAL); } public boolean shouldGenerate(Object metadata) { JavaClass javaClass = (JavaClass) metadata; ! EjbHomeTag homeTag = (EjbHomeTag) javaClass.getTagByName("ejb.home"); boolean generate = super.shouldGenerate(metadata); generate = generate && ((homeTag == null) || Arrays.asList(homeTag.getGenerate()).contains("local")); --- 135,148 ---- public String ejbJndiName(JavaClass clazz) { ! return ejbUtils.getComponentName(clazz, EjbUtils.LOCAL, true); } public String jndiName(JavaClass clazz) { ! return ejbUtils.getJndiName(clazz, EjbUtils.LOCAL); } public boolean shouldGenerate(Object metadata) { JavaClass javaClass = (JavaClass) metadata; ! EjbHomeTag homeTag = (EjbHomeTag) javaClass.getTagByName(TagLibrary.EJB_HOME); boolean generate = super.shouldGenerate(metadata); generate = generate && ((homeTag == null) || Arrays.asList(homeTag.getGenerate()).contains("local")); *************** *** 150,159 **** protected String getLocalyDefinedFullClassName(JavaClass clazz) { ! EjbHomeTag homeTag = (EjbHomeTag) clazz.getTagByName("ejb.home"); return (homeTag != null) ? homeTag.getLocalClass() : super.getLocalyDefinedFullClassName(clazz); } protected String getLocalyDefinedPackageName(JavaClass clazz) { ! EjbHomeTag homeTag = (EjbHomeTag) clazz.getTagByName("ejb.home"); String definedPackage = null; --- 151,160 ---- protected String getLocalyDefinedFullClassName(JavaClass clazz) { ! EjbHomeTag homeTag = (EjbHomeTag) clazz.getTagByName(TagLibrary.EJB_HOME); return (homeTag != null) ? homeTag.getLocalClass() : super.getLocalyDefinedFullClassName(clazz); } protected String getLocalyDefinedPackageName(JavaClass clazz) { ! EjbHomeTag homeTag = (EjbHomeTag) clazz.getTagByName(TagLibrary.EJB_HOME); String definedPackage = null; *************** *** 170,174 **** protected String getPatternBasedUnqualifiedName(JavaClass clazz) { ! EjbHomeTag homeTag = (EjbHomeTag) clazz.getTagByName("ejb.home"); String pattern = null; --- 171,175 ---- protected String getPatternBasedUnqualifiedName(JavaClass clazz) { ! EjbHomeTag homeTag = (EjbHomeTag) clazz.getTagByName(TagLibrary.EJB_HOME); String pattern = null; Index: LocalInterfaceBase.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/interfaces/LocalInterfaceBase.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** LocalInterfaceBase.java 13 Dec 2005 03:37:45 -0000 1.6 --- LocalInterfaceBase.java 7 Jun 2006 01:42:34 -0000 1.7 *************** *** 6,11 **** package org.xdoclet.plugin.ejb.interfaces; import org.generama.QDoxCapableMetadataProvider; - import org.generama.VelocityTemplateEngine; import org.generama.WriterMapper; import org.xdoclet.plugin.ejb.EjbConfig; --- 6,11 ---- package org.xdoclet.plugin.ejb.interfaces; + import org.generama.MergeableVelocityTemplateEngine; import org.generama.QDoxCapableMetadataProvider; import org.generama.WriterMapper; import org.xdoclet.plugin.ejb.EjbConfig; *************** *** 32,36 **** * @throws ClassNotFoundException */ ! public LocalInterfaceBase(VelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { super(templateEngine, metadataProvider, writerMapper, config); --- 32,36 ---- * @throws ClassNotFoundException */ ! public LocalInterfaceBase(MergeableVelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { super(templateEngine, metadataProvider, writerMapper, config); Index: LocalInterfacePlugin.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/interfaces/LocalInterfacePlugin.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** LocalInterfacePlugin.java 5 Jun 2006 00:02:50 -0000 1.19 --- LocalInterfacePlugin.java 7 Jun 2006 01:42:34 -0000 1.20 *************** *** 11,16 **** import java.util.Iterator; import org.generama.QDoxCapableMetadataProvider; - import org.generama.VelocityTemplateEngine; import org.generama.WriterMapper; --- 11,16 ---- import java.util.Iterator; + import org.generama.MergeableVelocityTemplateEngine; import org.generama.QDoxCapableMetadataProvider; import org.generama.WriterMapper; *************** *** 21,28 **** import org.xdoclet.plugin.ejb.EjbUtils; import org.xdoclet.plugin.ejb.qtags.EjbInterfaceTag; import org.xdoclet.plugin.ejb.util.DuplicatedJavaMethod; import com.thoughtworks.qdox.model.JavaClass; - import com.thoughtworks.qdox.model.JavaField; import com.thoughtworks.qdox.model.JavaMethod; import com.thoughtworks.qdox.model.Type; --- 21,28 ---- import org.xdoclet.plugin.ejb.EjbUtils; import org.xdoclet.plugin.ejb.qtags.EjbInterfaceTag; + import org.xdoclet.plugin.ejb.qtags.TagLibrary; import org.xdoclet.plugin.ejb.util.DuplicatedJavaMethod; import com.thoughtworks.qdox.model.JavaClass; import com.thoughtworks.qdox.model.JavaMethod; import com.thoughtworks.qdox.model.Type; *************** *** 39,43 **** // TODO: Support ejb:bean local-business-interface ! public LocalInterfacePlugin(VelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { super(templateEngine, metadataProvider, writerMapper, config); --- 39,43 ---- // TODO: Support ejb:bean local-business-interface ! public LocalInterfacePlugin(MergeableVelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { super(templateEngine, metadataProvider, writerMapper, config); *************** *** 84,88 **** public String[] getExtends(JavaClass javaClass) { Collection extendsLst = new ArrayList(); ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) javaClass.getTagByName("ejb.interface"); if ((interfaceTag != null) && (interfaceTag.getLocalExtends() != null)) { --- 84,88 ---- public String[] getExtends(JavaClass javaClass) { Collection extendsLst = new ArrayList(); ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) javaClass.getTagByName(TagLibrary.EJB_INTERFACE); if ((interfaceTag != null) && (interfaceTag.getLocalExtends() != null)) { *************** *** 99,103 **** public boolean shouldGenerate(Object metadata) { JavaClass javaClass = (JavaClass) metadata; ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) javaClass.getTagByName("ejb.interface"); boolean generate = super.shouldGenerate(metadata); generate = generate && ((interfaceTag == null) || Arrays.asList(interfaceTag.getGenerate()).contains("local")); --- 99,103 ---- public boolean shouldGenerate(Object metadata) { JavaClass javaClass = (JavaClass) metadata; ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) javaClass.getTagByName(TagLibrary.EJB_INTERFACE); boolean generate = super.shouldGenerate(metadata); generate = generate && ((interfaceTag == null) || Arrays.asList(interfaceTag.getGenerate()).contains("local")); *************** *** 106,115 **** protected String getLocalyDefinedFullClassName(JavaClass clazz) { ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) clazz.getTagByName("ejb.interface"); return interfaceTag != null ? interfaceTag.getLocalClass() : super.getLocalyDefinedFullClassName(clazz); } protected String getLocalyDefinedPackageName(JavaClass clazz) { ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) clazz.getTagByName("ejb.interface"); String definedPackage = null; --- 106,115 ---- protected String getLocalyDefinedFullClassName(JavaClass clazz) { ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) clazz.getTagByName(TagLibrary.EJB_INTERFACE); return interfaceTag != null ? interfaceTag.getLocalClass() : super.getLocalyDefinedFullClassName(clazz); } protected String getLocalyDefinedPackageName(JavaClass clazz) { ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) clazz.getTagByName(TagLibrary.EJB_INTERFACE); String definedPackage = null; *************** *** 126,130 **** protected String getPatternBasedUnqualifiedName(JavaClass clazz) { ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) clazz.getTagByName("ejb.interface"); String pattern = null; --- 126,130 ---- protected String getPatternBasedUnqualifiedName(JavaClass clazz) { ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) clazz.getTagByName(TagLibrary.EJB_INTERFACE); String pattern = null; Index: ServiceEndpointPlugin.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/interfaces/ServiceEndpointPlugin.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ServiceEndpointPlugin.java 5 Jun 2006 00:02:50 -0000 1.5 --- ServiceEndpointPlugin.java 7 Jun 2006 01:42:34 -0000 1.6 *************** *** 13,18 **** import java.util.Iterator; import org.generama.QDoxCapableMetadataProvider; - import org.generama.VelocityTemplateEngine; import org.generama.WriterMapper; --- 13,18 ---- import java.util.Iterator; + import org.generama.MergeableVelocityTemplateEngine; import org.generama.QDoxCapableMetadataProvider; import org.generama.WriterMapper; *************** *** 24,27 **** --- 24,28 ---- import org.xdoclet.plugin.ejb.EjbUtils; import org.xdoclet.plugin.ejb.qtags.EjbInterfaceTag; + import org.xdoclet.plugin.ejb.qtags.TagLibrary; import org.xdoclet.plugin.ejb.util.DuplicatedJavaMethod; *************** *** 39,43 **** // TODO: Support ejb:bean service-endpoint-business-interface ! public ServiceEndpointPlugin(VelocityTemplateEngine velocityTemplateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { super(velocityTemplateEngine, metadataProvider, writerMapper, config); --- 40,44 ---- // TODO: Support ejb:bean service-endpoint-business-interface ! public ServiceEndpointPlugin(MergeableVelocityTemplateEngine velocityTemplateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { super(velocityTemplateEngine, metadataProvider, writerMapper, config); *************** *** 84,88 **** public String[] getExtends(JavaClass javaClass) { Collection extendsLst = new ArrayList(); ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) javaClass.getTagByName("ejb.interface"); if ((interfaceTag != null) && (interfaceTag.getServiceEndpointExtends() != null)) { --- 85,89 ---- public String[] getExtends(JavaClass javaClass) { Collection extendsLst = new ArrayList(); ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) javaClass.getTagByName(TagLibrary.EJB_INTERFACE); if ((interfaceTag != null) && (interfaceTag.getServiceEndpointExtends() != null)) { *************** *** 113,117 **** public boolean shouldGenerate(Object metadata) { JavaClass javaClass = (JavaClass) metadata; ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) javaClass.getTagByName("ejb.interface"); boolean generate = ejbUtils.shouldGenerate(metadata); generate = generate && EjbUtils.hasFlag(ejbUtils.getViewType(javaClass), EjbUtils.SERVICE_END_POINT); --- 114,118 ---- public boolean shouldGenerate(Object metadata) { JavaClass javaClass = (JavaClass) metadata; ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) javaClass.getTagByName(TagLibrary.EJB_INTERFACE); boolean generate = ejbUtils.shouldGenerate(metadata); generate = generate && EjbUtils.hasFlag(ejbUtils.getViewType(javaClass), EjbUtils.SERVICE_END_POINT); *************** *** 123,132 **** protected String getLocalyDefinedFullClassName(JavaClass clazz) { ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) clazz.getTagByName("ejb.interface"); return interfaceTag != null ? interfaceTag.getServiceEndpointClass() : super.getLocalyDefinedFullClassName(clazz); } protected String getLocalyDefinedPackageName(JavaClass clazz) { ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) clazz.getTagByName("ejb.interface"); String definedPackage = null; --- 124,133 ---- protected String getLocalyDefinedFullClassName(JavaClass clazz) { ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) clazz.getTagByName(TagLibrary.EJB_INTERFACE); return interfaceTag != null ? interfaceTag.getServiceEndpointClass() : super.getLocalyDefinedFullClassName(clazz); } protected String getLocalyDefinedPackageName(JavaClass clazz) { ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) clazz.getTagByName(TagLibrary.EJB_INTERFACE); String definedPackage = null; *************** *** 143,147 **** protected String getPatternBasedUnqualifiedName(JavaClass clazz) { ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) clazz.getTagByName("ejb.interface"); String pattern = null; --- 144,148 ---- protected String getPatternBasedUnqualifiedName(JavaClass clazz) { ! EjbInterfaceTag interfaceTag = (EjbInterfaceTag) clazz.getTagByName(TagLibrary.EJB_INTERFACE); String pattern = null; |
From: Diogo Q. <dqu...@us...> - 2006-06-07 22:13:48
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/entity In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25729/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/entity Modified Files: PrimaryKeyClassPluginTestCase.java AbstractValueObjectPluginTestCase.java AbstractLookupObjectPluginTestCase.java AbstractValueObjectPluginXDocletExampleTestCase.java Log Message: Fix bugs. Index: PrimaryKeyClassPluginTestCase.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/entity/PrimaryKeyClassPluginTestCase.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PrimaryKeyClassPluginTestCase.java 5 Jun 2006 00:02:50 -0000 1.5 --- PrimaryKeyClassPluginTestCase.java 7 Jun 2006 01:42:34 -0000 1.6 *************** *** 12,19 **** import java.net.URL; import org.generama.MetadataProvider; import org.generama.Plugin; import org.generama.QDoxCapableMetadataProvider; - import org.generama.VelocityTemplateEngine; import org.generama.WriterMapper; --- 12,19 ---- import java.net.URL; + import org.generama.MergeableVelocityTemplateEngine; import org.generama.MetadataProvider; import org.generama.Plugin; import org.generama.QDoxCapableMetadataProvider; import org.generama.WriterMapper; *************** *** 53,59 **** QDoxCapableMetadataProvider qdoxCapableMetadataProvider = (QDoxCapableMetadataProvider) metadataProvider; EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! // Pending GRA-4 ! // MergeableVelocityTemplateEngine mergeableVelocityTemplateEngine = new MergeableVelocityTemplateEngine() { ! VelocityTemplateEngine mergeableVelocityTemplateEngine = new VelocityTemplateEngine() { protected String getScriptPath(String scriptName, Class pluginClass) { pluginClass = PrimaryKeyClassPlugin.class; --- 53,57 ---- QDoxCapableMetadataProvider qdoxCapableMetadataProvider = (QDoxCapableMetadataProvider) metadataProvider; EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! MergeableVelocityTemplateEngine mergeableVelocityTemplateEngine = new MergeableVelocityTemplateEngine() { protected String getScriptPath(String scriptName, Class pluginClass) { pluginClass = PrimaryKeyClassPlugin.class; Index: AbstractLookupObjectPluginTestCase.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/entity/AbstractLookupObjectPluginTestCase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AbstractLookupObjectPluginTestCase.java 5 Jun 2006 00:02:50 -0000 1.2 --- AbstractLookupObjectPluginTestCase.java 7 Jun 2006 01:42:34 -0000 1.3 *************** *** 6,13 **** package org.xdoclet.plugin.ejb.entity; import org.generama.MetadataProvider; import org.generama.Plugin; import org.generama.QDoxCapableMetadataProvider; - import org.generama.VelocityTemplateEngine; import org.generama.WriterMapper; import org.xdoclet.plugin.ejb.AbstractEjbJavaClassBuilderTestCase; --- 6,13 ---- package org.xdoclet.plugin.ejb.entity; + import org.generama.MergeableVelocityTemplateEngine; import org.generama.MetadataProvider; import org.generama.Plugin; import org.generama.QDoxCapableMetadataProvider; import org.generama.WriterMapper; import org.xdoclet.plugin.ejb.AbstractEjbJavaClassBuilderTestCase; *************** *** 25,29 **** QDoxCapableMetadataProvider qdoxCapableMetadataProvider = (QDoxCapableMetadataProvider) metadataProvider; EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! return new LookupObjectPlugin(new VelocityTemplateEngine(), qdoxCapableMetadataProvider, writerMapper, config); } } \ No newline at end of file --- 25,29 ---- QDoxCapableMetadataProvider qdoxCapableMetadataProvider = (QDoxCapableMetadataProvider) metadataProvider; EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! return new LookupObjectPlugin(new MergeableVelocityTemplateEngine(), qdoxCapableMetadataProvider, writerMapper, config); } } \ No newline at end of file Index: AbstractValueObjectPluginXDocletExampleTestCase.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/entity/AbstractValueObjectPluginXDocletExampleTestCase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AbstractValueObjectPluginXDocletExampleTestCase.java 5 Jun 2006 00:02:50 -0000 1.2 --- AbstractValueObjectPluginXDocletExampleTestCase.java 7 Jun 2006 01:42:34 -0000 1.3 *************** *** 12,19 **** import java.net.URL; import org.generama.MetadataProvider; import org.generama.Plugin; import org.generama.QDoxCapableMetadataProvider; - import org.generama.VelocityTemplateEngine; import org.generama.WriterMapper; --- 12,19 ---- import java.net.URL; + import org.generama.MergeableVelocityTemplateEngine; import org.generama.MetadataProvider; import org.generama.Plugin; import org.generama.QDoxCapableMetadataProvider; import org.generama.WriterMapper; *************** *** 50,56 **** EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! // Pending GRA-4 ! // MergeableVelocityTemplateEngine mergeableVelocityTemplateEngine = new MergeableVelocityTemplateEngine() { ! VelocityTemplateEngine mergeableVelocityTemplateEngine = new VelocityTemplateEngine() { protected String getScriptPath(String scriptName, Class pluginClass) { pluginClass = ValueObjectPlugin.class; --- 50,54 ---- EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! MergeableVelocityTemplateEngine mergeableVelocityTemplateEngine = new MergeableVelocityTemplateEngine() { protected String getScriptPath(String scriptName, Class pluginClass) { pluginClass = ValueObjectPlugin.class; Index: AbstractValueObjectPluginTestCase.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/entity/AbstractValueObjectPluginTestCase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AbstractValueObjectPluginTestCase.java 5 Jun 2006 00:02:50 -0000 1.2 --- AbstractValueObjectPluginTestCase.java 7 Jun 2006 01:42:34 -0000 1.3 *************** *** 12,19 **** import java.net.URL; import org.generama.MetadataProvider; import org.generama.Plugin; import org.generama.QDoxCapableMetadataProvider; - import org.generama.VelocityTemplateEngine; import org.generama.WriterMapper; --- 12,19 ---- import java.net.URL; + import org.generama.MergeableVelocityTemplateEngine; import org.generama.MetadataProvider; import org.generama.Plugin; import org.generama.QDoxCapableMetadataProvider; import org.generama.WriterMapper; *************** *** 50,56 **** EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! // Pending GRA-4 ! // MergeableVelocityTemplateEngine mergeableVelocityTemplateEngine = new MergeableVelocityTemplateEngine() { ! VelocityTemplateEngine mergeableVelocityTemplateEngine = new VelocityTemplateEngine() { protected String getScriptPath(String scriptName, Class pluginClass) { pluginClass = ValueObjectPlugin.class; --- 50,54 ---- EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! MergeableVelocityTemplateEngine mergeableVelocityTemplateEngine = new MergeableVelocityTemplateEngine() { protected String getScriptPath(String scriptName, Class pluginClass) { pluginClass = ValueObjectPlugin.class; |
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/qtags In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25729/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/qtags Modified Files: EjbTransactionTag.java EjbValueObjectTag.java Added Files: EjbTransactionMethodTag.java BaseTransactionTag.java Log Message: Fix bugs. --- NEW FILE: BaseTransactionTag.java --- /* * Copyright (c) 2005 * XDoclet Team * All rights reserved. */ package org.xdoclet.plugin.ejb.qtags; /** * Base interface defining commons elements for @ejb.transaction and @ejb.transaction-method * * @qtags.ignore */ public interface BaseTransactionTag extends com.thoughtworks.qdox.model.DocletTag { /** * Define the type of transactional behaviour. * * @qtags.allowed-value NotSupported * @qtags.allowed-value Supports * @qtags.allowed-value Required * @qtags.allowed-value RequiresNew * @qtags.allowed-value Mandatory * @qtags.allowed-value Never * * @qtags.default Supports */ String getType(); } Index: EjbValueObjectTag.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/qtags/EjbValueObjectTag.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** EjbValueObjectTag.java 13 Dec 2005 03:38:27 -0000 1.5 --- EjbValueObjectTag.java 7 Jun 2006 01:42:34 -0000 1.6 *************** *** 110,114 **** * @qtags.default false */ ! boolean isGeneratePKConstructor(); /** --- 110,114 ---- * @qtags.default false */ ! boolean isGeneratePkConstructor(); /** --- NEW FILE: EjbTransactionMethodTag.java --- /* * Copyright (c) 2005 * XDoclet Team * All rights reserved. */ package org.xdoclet.plugin.ejb.qtags; /** * Defines the transactional behaviour for this method.<br> * Applicable to methods with @ejb.create-method and @ejb.interface-method tags.<br> * If used on class level applies to all interface methods unless overridden * * @qtags.location method * @qtags.once */ public interface EjbTransactionMethodTag extends BaseTransactionTag { } Index: EjbTransactionTag.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/qtags/EjbTransactionTag.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** EjbTransactionTag.java 13 Dec 2005 03:38:27 -0000 1.6 --- EjbTransactionTag.java 7 Jun 2006 01:42:34 -0000 1.7 *************** *** 11,31 **** * If used on class level applies to all interface methods unless overridden * - * @qtags.location method * @qtags.location class * @qtags.once */ ! public interface EjbTransactionTag extends com.thoughtworks.qdox.model.DocletTag { /** ! * Define the type of transactional behaviour. ! * ! * @qtags.allowed-value NotSupported ! * @qtags.allowed-value Supports ! * @qtags.allowed-value Required ! * @qtags.allowed-value RequiresNew ! * @qtags.allowed-value Mandatory ! * @qtags.allowed-value Never * ! * @qtags.required */ ! String getType(); } --- 11,30 ---- * If used on class level applies to all interface methods unless overridden * * @qtags.location class * @qtags.once */ ! public interface EjbTransactionTag extends BaseTransactionTag { /** ! * Session and Entity beans, EJB 2.0+<br> ! * Indicates the method-interfaces for which this container transaction applies.<br> ! * The type "ServiceEndpoint" is only applicable to EJB2.1 session beans.<br> ! * Default value(s): all interfaces which are supported by the bean / method * ! * @qtags.allowed-value Remote ! * @qtags.allowed-value Home ! * @qtags.allowed-value Local ! * @qtags.allowed-value LocalHome ! * @qtags.allowed-value ServiceEndpoint */ ! String getMethodIntf(); } |
From: Diogo Q. <dqu...@us...> - 2006-06-07 22:11:39
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-xwork/src/main/java/org/xdoclet/plugin/xwork/dtd In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv27208/plugin-xwork/src/main/java/org/xdoclet/plugin/xwork/dtd Added Files: xwork-1.1.1.dtd Log Message: Plugin validation. Offline validation --- NEW FILE: xwork-1.1.1.dtd --- <?xml version="1.0" encoding="UTF-8"?> <!-- START SNIPPET: xworkDtd --> <!-- XWork configuration DTD. Use the following DOCTYPE <!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.1.1//EN" "http://www.opensymphony.com/xwork/xwork-1.1.1.dtd"> --> <!ELEMENT xwork (package|include)*> <!ELEMENT package (result-types?, interceptors?, default-interceptor-ref?, default-action-ref?, global-results?, global-exception-mappings?, action*)> <!ATTLIST package name CDATA #REQUIRED extends CDATA #IMPLIED namespace CDATA #IMPLIED abstract CDATA #IMPLIED externalReferenceResolver NMTOKEN #IMPLIED > <!ELEMENT result-types (result-type+)> <!ELEMENT result-type (param*)> <!ATTLIST result-type name CDATA #REQUIRED class CDATA #REQUIRED default (true|false) "false" > <!ELEMENT interceptors (interceptor|interceptor-stack)+> <!ELEMENT interceptor (param*)> <!ATTLIST interceptor name CDATA #REQUIRED class CDATA #REQUIRED > <!ELEMENT interceptor-stack (interceptor-ref+)> <!ATTLIST interceptor-stack name CDATA #REQUIRED > <!ELEMENT interceptor-ref (param*)> <!ATTLIST interceptor-ref name CDATA #REQUIRED > <!ELEMENT default-interceptor-ref (param*)> <!ATTLIST default-interceptor-ref name CDATA #REQUIRED > <!ELEMENT default-action-ref (param*)> <!ATTLIST default-action-ref name CDATA #REQUIRED > <!ELEMENT external-ref (#PCDATA)> <!ATTLIST external-ref name NMTOKEN #REQUIRED required (true|false) "true" > <!ELEMENT global-results (result+)> <!ELEMENT global-exception-mappings (exception-mapping+)> <!ELEMENT action (param|result|interceptor-ref|exception-mapping|external-ref)*> <!ATTLIST action name CDATA #REQUIRED class CDATA #IMPLIED method CDATA #IMPLIED converter CDATA #IMPLIED > <!ELEMENT param (#PCDATA)> <!ATTLIST param name CDATA #REQUIRED > <!ELEMENT result (#PCDATA|param)*> <!ATTLIST result name CDATA #IMPLIED type CDATA #IMPLIED > <!ELEMENT exception-mapping (#PCDATA|param)*> <!ATTLIST exception-mapping name CDATA #IMPLIED exception CDATA #REQUIRED result CDATA #REQUIRED > <!ELEMENT include (#PCDATA)> <!ATTLIST include file CDATA #REQUIRED > <!-- END SNIPPET: xworkDtd --> |
From: Diogo Q. <dqu...@us...> - 2006-06-07 22:11:39
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-spring In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv24711/plugin-spring Added Files: .cvsignore Log Message: --- NEW FILE: .cvsignore --- target velocity.log* maven.log* junit*.properties *.ipr *.iws *.iml .classpath .project |
From: Diogo Q. <dqu...@us...> - 2006-06-07 22:11:36
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/descriptor In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25729/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/descriptor Modified Files: asm-descriptor.jelly Log Message: Fix bugs. Index: asm-descriptor.jelly =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/descriptor/asm-descriptor.jelly,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** asm-descriptor.jelly 7 Sep 2005 01:13:08 -0000 1.4 --- asm-descriptor.jelly 7 Jun 2006 01:42:34 -0000 1.5 *************** *** 79,83 **** <j:forEach var="bean" items="${util.getBeans(metadata)}"> ! <j:forEach var="containerTransaction" items="${util.getContainerTransaction(bean)}"> <container-transaction id="${plugin.prefixedId('MethodTransaction')}"> <description>Description not supported yet</description> --- 79,83 ---- <j:forEach var="bean" items="${util.getBeans(metadata)}"> ! <j:forEach var="containerTransaction" items="${util.getContainerTransactions(bean)}"> <container-transaction id="${plugin.prefixedId('MethodTransaction')}"> <description>Description not supported yet</description> *************** *** 85,89 **** <description>Description not supported yet</description> <ejb-name>${util.getEjbName(bean)}</ejb-name> ! <method-intf>${containerTransaction.ifaceType}</method-intf> <j:choose> <j:when test="${containerTransaction.method != null}"> --- 85,91 ---- <description>Description not supported yet</description> <ejb-name>${util.getEjbName(bean)}</ejb-name> ! <j:if test="${!empty(containerTransaction.ifaceType)}"> ! <method-intf>${containerTransaction.ifaceType}</method-intf> ! </j:if> <j:choose> <j:when test="${containerTransaction.method != null}"> *************** *** 119,123 **** <j:forEach var="bean" items="${util.getMessageDrivenBeans(metadata)}"> <j:set var="ejbMessageDestinationTag" value="${bean.getTagByName('ejb.message-destination')}"/> ! <j:if test="${ejbMessageDestinationTag != null}"> <message-destination> <j:if test="${!empty(ejbMessageDestinationTag.description)}"> --- 121,125 ---- <j:forEach var="bean" items="${util.getMessageDrivenBeans(metadata)}"> <j:set var="ejbMessageDestinationTag" value="${bean.getTagByName('ejb.message-destination')}"/> ! <j:if test="${ejbMessageDestinationTag != null}"> <message-destination> <j:if test="${!empty(ejbMessageDestinationTag.description)}"> |
From: Diogo Q. <dqu...@us...> - 2006-06-07 22:11:36
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/interfaces In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25729/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/interfaces Modified Files: AbstractRemoteHomeInterfacePluginTestCase.java AbstractRemoteInterfacePluginTestCase.java AbstractLocalHomeInterfacePluginTestCase.java AbstractLocalInterfacePluginTestCase.java ServiceEndpointPluginTestCase.java Log Message: Fix bugs. Index: AbstractRemoteInterfacePluginTestCase.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/interfaces/AbstractRemoteInterfacePluginTestCase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AbstractRemoteInterfacePluginTestCase.java 5 Jun 2006 00:02:50 -0000 1.2 --- AbstractRemoteInterfacePluginTestCase.java 7 Jun 2006 01:42:34 -0000 1.3 *************** *** 6,15 **** package org.xdoclet.plugin.ejb.interfaces; import org.generama.MetadataProvider; import org.generama.Plugin; import org.generama.QDoxCapableMetadataProvider; - import org.generama.VelocityTemplateEngine; import org.generama.WriterMapper; - import org.xdoclet.AbstractJavaGeneratingPluginTestCase; import org.xdoclet.plugin.ejb.AbstractEjbJavaClassBuilderTestCase; import org.xdoclet.plugin.ejb.EjbConfig; --- 6,14 ---- package org.xdoclet.plugin.ejb.interfaces; + import org.generama.MergeableVelocityTemplateEngine; import org.generama.MetadataProvider; import org.generama.Plugin; import org.generama.QDoxCapableMetadataProvider; import org.generama.WriterMapper; import org.xdoclet.plugin.ejb.AbstractEjbJavaClassBuilderTestCase; import org.xdoclet.plugin.ejb.EjbConfig; *************** *** 24,30 **** QDoxCapableMetadataProvider qdoxCapableMetadataProvider = (QDoxCapableMetadataProvider) metadataProvider; EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! // Pending GRA-4 ! // return new RemoteInterfacePlugin(new MergeableVelocityTemplateEngine(), qdoxCapableMetadataProvider, writerMapper, config); ! return new RemoteInterfacePlugin(new VelocityTemplateEngine(), qdoxCapableMetadataProvider, writerMapper, config); } } \ No newline at end of file --- 23,27 ---- QDoxCapableMetadataProvider qdoxCapableMetadataProvider = (QDoxCapableMetadataProvider) metadataProvider; EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! return new RemoteInterfacePlugin(new MergeableVelocityTemplateEngine(), qdoxCapableMetadataProvider, writerMapper, config); } } \ No newline at end of file Index: ServiceEndpointPluginTestCase.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/interfaces/ServiceEndpointPluginTestCase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ServiceEndpointPluginTestCase.java 5 Jun 2006 00:02:50 -0000 1.2 --- ServiceEndpointPluginTestCase.java 7 Jun 2006 01:42:34 -0000 1.3 *************** *** 12,22 **** import java.net.URL; import org.generama.MetadataProvider; import org.generama.Plugin; import org.generama.QDoxCapableMetadataProvider; - import org.generama.VelocityTemplateEngine; import org.generama.WriterMapper; - import org.xdoclet.AbstractJavaGeneratingPluginTestCase; import org.xdoclet.QDoxMetadataProvider; --- 12,21 ---- import java.net.URL; + import org.generama.MergeableVelocityTemplateEngine; import org.generama.MetadataProvider; import org.generama.Plugin; import org.generama.QDoxCapableMetadataProvider; import org.generama.WriterMapper; import org.xdoclet.QDoxMetadataProvider; *************** *** 48,52 **** EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); config.setVersion(EjbVersion.EJB_2_1); ! return new ServiceEndpointPlugin(new VelocityTemplateEngine(), qdoxCapableMetadataProvider, writerMapper, config); } } --- 47,51 ---- EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); config.setVersion(EjbVersion.EJB_2_1); ! return new ServiceEndpointPlugin(new MergeableVelocityTemplateEngine(), qdoxCapableMetadataProvider, writerMapper, config); } } Index: AbstractLocalInterfacePluginTestCase.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/interfaces/AbstractLocalInterfacePluginTestCase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AbstractLocalInterfacePluginTestCase.java 5 Jun 2006 00:02:50 -0000 1.2 --- AbstractLocalInterfacePluginTestCase.java 7 Jun 2006 01:42:34 -0000 1.3 *************** *** 6,17 **** package org.xdoclet.plugin.ejb.interfaces; import org.generama.MetadataProvider; import org.generama.Plugin; import org.generama.QDoxCapableMetadataProvider; - import org.generama.VelocityTemplateEngine; import org.generama.WriterMapper; - import org.xdoclet.AbstractJavaGeneratingPluginTestCase; - import org.xdoclet.plugin.ejb.AbstractEjbJavaClassBuilderTestCase; import org.xdoclet.plugin.ejb.EjbConfig; --- 6,15 ---- package org.xdoclet.plugin.ejb.interfaces; + import org.generama.MergeableVelocityTemplateEngine; import org.generama.MetadataProvider; import org.generama.Plugin; import org.generama.QDoxCapableMetadataProvider; import org.generama.WriterMapper; import org.xdoclet.plugin.ejb.AbstractEjbJavaClassBuilderTestCase; import org.xdoclet.plugin.ejb.EjbConfig; *************** *** 25,32 **** QDoxCapableMetadataProvider qdoxCapableMetadataProvider = (QDoxCapableMetadataProvider) metadataProvider; EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! // Pending GRA-4 ! // return new LocalInterfacePlugin(new MergeableVelocityTemplateEngine(), qdoxCapableMetadataProvider, ! // writerMapper, config); ! return new LocalInterfacePlugin(new VelocityTemplateEngine(), qdoxCapableMetadataProvider, writerMapper, config); } --- 23,27 ---- QDoxCapableMetadataProvider qdoxCapableMetadataProvider = (QDoxCapableMetadataProvider) metadataProvider; EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! return new LocalInterfacePlugin(new MergeableVelocityTemplateEngine(), qdoxCapableMetadataProvider, writerMapper, config); } Index: AbstractLocalHomeInterfacePluginTestCase.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/interfaces/AbstractLocalHomeInterfacePluginTestCase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AbstractLocalHomeInterfacePluginTestCase.java 5 Jun 2006 00:02:50 -0000 1.2 --- AbstractLocalHomeInterfacePluginTestCase.java 7 Jun 2006 01:42:34 -0000 1.3 *************** *** 6,17 **** package org.xdoclet.plugin.ejb.interfaces; import org.generama.MetadataProvider; import org.generama.Plugin; import org.generama.QDoxCapableMetadataProvider; - import org.generama.VelocityTemplateEngine; import org.generama.WriterMapper; - import org.xdoclet.AbstractJavaGeneratingPluginTestCase; - import org.xdoclet.plugin.ejb.AbstractEjbJavaClassBuilderTestCase; import org.xdoclet.plugin.ejb.EjbConfig; --- 6,15 ---- package org.xdoclet.plugin.ejb.interfaces; + import org.generama.MergeableVelocityTemplateEngine; import org.generama.MetadataProvider; import org.generama.Plugin; import org.generama.QDoxCapableMetadataProvider; import org.generama.WriterMapper; import org.xdoclet.plugin.ejb.AbstractEjbJavaClassBuilderTestCase; import org.xdoclet.plugin.ejb.EjbConfig; *************** *** 25,32 **** QDoxCapableMetadataProvider qdoxCapableMetadataProvider = (QDoxCapableMetadataProvider) metadataProvider; EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! // Pending GRA-4 ! // return new LocalHomeInterfacePlugin(new MergeableVelocityTemplateEngine(), qdoxCapableMetadataProvider, ! // writerMapper, config); ! return new LocalHomeInterfacePlugin(new VelocityTemplateEngine(), qdoxCapableMetadataProvider, writerMapper, config); } --- 23,27 ---- QDoxCapableMetadataProvider qdoxCapableMetadataProvider = (QDoxCapableMetadataProvider) metadataProvider; EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! return new LocalHomeInterfacePlugin(new MergeableVelocityTemplateEngine(), qdoxCapableMetadataProvider, writerMapper, config); } Index: AbstractRemoteHomeInterfacePluginTestCase.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/interfaces/AbstractRemoteHomeInterfacePluginTestCase.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AbstractRemoteHomeInterfacePluginTestCase.java 5 Jun 2006 00:02:50 -0000 1.2 --- AbstractRemoteHomeInterfacePluginTestCase.java 7 Jun 2006 01:42:34 -0000 1.3 *************** *** 6,17 **** package org.xdoclet.plugin.ejb.interfaces; import org.generama.MetadataProvider; import org.generama.Plugin; import org.generama.QDoxCapableMetadataProvider; - import org.generama.VelocityTemplateEngine; import org.generama.WriterMapper; - import org.xdoclet.AbstractJavaGeneratingPluginTestCase; - import org.xdoclet.plugin.ejb.AbstractEjbJavaClassBuilderTestCase; import org.xdoclet.plugin.ejb.EjbConfig; --- 6,15 ---- package org.xdoclet.plugin.ejb.interfaces; + import org.generama.MergeableVelocityTemplateEngine; import org.generama.MetadataProvider; import org.generama.Plugin; import org.generama.QDoxCapableMetadataProvider; import org.generama.WriterMapper; import org.xdoclet.plugin.ejb.AbstractEjbJavaClassBuilderTestCase; import org.xdoclet.plugin.ejb.EjbConfig; *************** *** 26,33 **** QDoxCapableMetadataProvider qdoxCapableMetadataProvider = (QDoxCapableMetadataProvider) metadataProvider; EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! // Pending GRA-4 ! // return new RemoteHomeInterfacePlugin(new MergeableVelocityTemplateEngine(), qdoxCapableMetadataProvider, ! // writerMapper, config); ! return new RemoteHomeInterfacePlugin(new VelocityTemplateEngine(), qdoxCapableMetadataProvider, writerMapper, config); } --- 24,28 ---- QDoxCapableMetadataProvider qdoxCapableMetadataProvider = (QDoxCapableMetadataProvider) metadataProvider; EjbConfig config = new EjbConfig(qdoxCapableMetadataProvider, writerMapper); ! return new RemoteHomeInterfacePlugin(new MergeableVelocityTemplateEngine(), qdoxCapableMetadataProvider, writerMapper, config); } |
From: Diogo Q. <dqu...@us...> - 2006-06-07 22:11:34
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/descriptor/expected In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25729/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/descriptor/expected Modified Files: ejb-jar-v11.xml ejb-jar-v21.xml ejb-jar-v20.xml Log Message: Fix bugs. Index: ejb-jar-v20.xml =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/descriptor/expected/ejb-jar-v20.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ejb-jar-v20.xml 13 Dec 2005 03:45:22 -0000 1.8 --- ejb-jar-v20.xml 7 Jun 2006 01:42:34 -0000 1.9 *************** *** 591,596 **** <description>Description not supported yet</description> <ejb-name>Account</ejb-name> ! <method-intf>LocalHome</method-intf> ! <method-name>findAll</method-name> </method> <trans-attribute>Supports</trans-attribute> --- 591,596 ---- <description>Description not supported yet</description> <ejb-name>Account</ejb-name> ! <method-intf>Remote</method-intf> ! <method-name>*</method-name> </method> <trans-attribute>Supports</trans-attribute> *************** *** 601,604 **** --- 601,634 ---- <description>Description not supported yet</description> <ejb-name>Account</ejb-name> + <method-intf>Remote</method-intf> + <method-name>getOwners</method-name> + </method> + <trans-attribute>Required</trans-attribute> + </container-transaction> + <container-transaction id="MethodTransaction_3"> + <description>Description not supported yet</description> + <method id="MethodElement_20"> + <description>Description not supported yet</description> + <ejb-name>Account</ejb-name> + <method-intf>Local</method-intf> + <method-name>getOwners</method-name> + </method> + <trans-attribute>Required</trans-attribute> + </container-transaction> + <container-transaction id="MethodTransaction_4"> + <description>Description not supported yet</description> + <method id="MethodElement_21"> + <description>Description not supported yet</description> + <ejb-name>Account</ejb-name> + <method-intf>LocalHome</method-intf> + <method-name>findAll</method-name> + </method> + <trans-attribute>Supports</trans-attribute> + </container-transaction> + <container-transaction id="MethodTransaction_5"> + <description>Description not supported yet</description> + <method id="MethodElement_22"> + <description>Description not supported yet</description> + <ejb-name>Account</ejb-name> <method-intf>Home</method-intf> <method-name>findAll</method-name> *************** *** 609,612 **** --- 639,651 ---- <trans-attribute>Required</trans-attribute> </container-transaction> + <container-transaction id="MethodTransaction_6"> + <description>Description not supported yet</description> + <method id="MethodElement_23"> + <description>Description not supported yet</description> + <ejb-name>Client</ejb-name> + <method-name>*</method-name> + </method> + <trans-attribute>Supports</trans-attribute> + </container-transaction> </assembly-descriptor> </ejb-jar> \ No newline at end of file Index: ejb-jar-v21.xml =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/descriptor/expected/ejb-jar-v21.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ejb-jar-v21.xml 13 Dec 2005 03:45:22 -0000 1.8 --- ejb-jar-v21.xml 7 Jun 2006 01:42:34 -0000 1.9 *************** *** 632,637 **** <description>Description not supported yet</description> <ejb-name>Account</ejb-name> ! <method-intf>LocalHome</method-intf> ! <method-name>findAll</method-name> </method> <trans-attribute>Supports</trans-attribute> --- 632,637 ---- <description>Description not supported yet</description> <ejb-name>Account</ejb-name> ! <method-intf>Remote</method-intf> ! <method-name>*</method-name> </method> <trans-attribute>Supports</trans-attribute> *************** *** 642,645 **** --- 642,675 ---- <description>Description not supported yet</description> <ejb-name>Account</ejb-name> + <method-intf>Remote</method-intf> + <method-name>getOwners</method-name> + </method> + <trans-attribute>Required</trans-attribute> + </container-transaction> + <container-transaction id="MethodTransaction_3"> + <description>Description not supported yet</description> + <method id="MethodElement_20"> + <description>Description not supported yet</description> + <ejb-name>Account</ejb-name> + <method-intf>Local</method-intf> + <method-name>getOwners</method-name> + </method> + <trans-attribute>Required</trans-attribute> + </container-transaction> + <container-transaction id="MethodTransaction_4"> + <description>Description not supported yet</description> + <method id="MethodElement_21"> + <description>Description not supported yet</description> + <ejb-name>Account</ejb-name> + <method-intf>LocalHome</method-intf> + <method-name>findAll</method-name> + </method> + <trans-attribute>Supports</trans-attribute> + </container-transaction> + <container-transaction id="MethodTransaction_5"> + <description>Description not supported yet</description> + <method id="MethodElement_22"> + <description>Description not supported yet</description> + <ejb-name>Account</ejb-name> <method-intf>Home</method-intf> <method-name>findAll</method-name> *************** *** 650,653 **** <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> ! </ejb-jar> \ No newline at end of file --- 680,692 ---- <trans-attribute>Required</trans-attribute> </container-transaction> + <container-transaction id="MethodTransaction_6"> + <description>Description not supported yet</description> + <method id="MethodElement_23"> + <description>Description not supported yet</description> + <ejb-name>Client</ejb-name> + <method-name>*</method-name> + </method> + <trans-attribute>Supports</trans-attribute> + </container-transaction> </assembly-descriptor> ! </ejb-jar> Index: ejb-jar-v11.xml =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/descriptor/expected/ejb-jar-v11.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ejb-jar-v11.xml 13 Dec 2005 03:45:22 -0000 1.8 --- ejb-jar-v11.xml 7 Jun 2006 01:42:34 -0000 1.9 *************** *** 278,283 **** <description>Description not supported yet</description> <ejb-name>Account</ejb-name> ! <method-intf>LocalHome</method-intf> ! <method-name>findAll</method-name> </method> <trans-attribute>Supports</trans-attribute> --- 278,283 ---- <description>Description not supported yet</description> <ejb-name>Account</ejb-name> ! <method-intf>Remote</method-intf> ! <method-name>*</method-name> </method> <trans-attribute>Supports</trans-attribute> *************** *** 288,291 **** --- 288,311 ---- <description>Description not supported yet</description> <ejb-name>Account</ejb-name> + <method-intf>Remote</method-intf> + <method-name>getOwners</method-name> + </method> + <trans-attribute>Required</trans-attribute> + </container-transaction> + <container-transaction id="MethodTransaction_3"> + <description>Description not supported yet</description> + <method id="MethodElement_15"> + <description>Description not supported yet</description> + <ejb-name>Account</ejb-name> + <method-intf>LocalHome</method-intf> + <method-name>findAll</method-name> + </method> + <trans-attribute>Supports</trans-attribute> + </container-transaction> + <container-transaction id="MethodTransaction_4"> + <description>Description not supported yet</description> + <method id="MethodElement_16"> + <description>Description not supported yet</description> + <ejb-name>Account</ejb-name> <method-intf>Home</method-intf> <method-name>findAll</method-name> *************** *** 296,299 **** --- 316,328 ---- <trans-attribute>Required</trans-attribute> </container-transaction> + <container-transaction id="MethodTransaction_5"> + <description>Description not supported yet</description> + <method id="MethodElement_17"> + <description>Description not supported yet</description> + <ejb-name>Client</ejb-name> + <method-name>*</method-name> + </method> + <trans-attribute>Supports</trans-attribute> + </container-transaction> </assembly-descriptor> </ejb-jar> \ No newline at end of file |
From: Diogo Q. <dqu...@us...> - 2006-06-07 22:11:20
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-xwork/src/main/java/org/xdoclet/plugin/xwork In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv27208/plugin-xwork/src/main/java/org/xdoclet/plugin/xwork Modified Files: XWorkXMLPlugin.java Log Message: Plugin validation. Offline validation Index: XWorkXMLPlugin.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-xwork/src/main/java/org/xdoclet/plugin/xwork/XWorkXMLPlugin.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** XWorkXMLPlugin.java 12 Apr 2006 18:45:19 -0000 1.7 --- XWorkXMLPlugin.java 7 Jun 2006 01:43:49 -0000 1.8 *************** *** 8,13 **** --- 8,15 ---- import java.io.File; import java.util.ArrayList; + import java.util.HashMap; import java.util.Iterator; import java.util.List; + import java.util.Map; import org.generama.JellyTemplateEngine; *************** *** 15,18 **** --- 17,21 ---- import org.generama.WriterMapper; import org.generama.defaults.QDoxPlugin; + import org.generama.defaults.XMLOutputValidator; import org.xdoclet.plugin.xwork.model.Action; import org.xdoclet.plugin.xwork.model.ExceptionMapping; *************** *** 34,46 **** /** * plugin producing xwork mapping declarations. ! * * this plugin will produce mapping declarations for single package. resulting * xml file can be included into master configuration. ! * * for now it processes only action classes ( which are just a POJOs and do not * require any superclasses / interfaces ) ! * * interceptor stuff etc shall be merged in. ! * * @author Jose Peleteiro * @author Konstantin Pribluda --- 37,49 ---- /** * plugin producing xwork mapping declarations. ! * * this plugin will produce mapping declarations for single package. resulting * xml file can be included into master configuration. ! * * for now it processes only action classes ( which are just a POJOs and do not * require any superclasses / interfaces ) ! * * interceptor stuff etc shall be merged in. ! * * @author Jose Peleteiro * @author Konstantin Pribluda *************** *** 74,77 **** --- 77,83 ---- // it generates just one file, classes by default xwork.xml this.setMultioutput(false); + Map dtds = new HashMap(); + dtds.put("http://www.opensymphony.com/xwork/xwork-1.1.1.dtd", getClass().getResource("dtd/xwork-1.1.1.dtd")); + setOutputValidator(new XMLOutputValidator(dtds)); } *************** *** 117,121 **** /** * parent of this package ! * * @return */ --- 123,127 ---- /** * parent of this package ! * * @return */ *************** *** 126,130 **** /** * destination file name ! * * @return */ --- 132,136 ---- /** * destination file name ! * * @return */ *************** *** 135,139 **** /** * merge file for basic setings ! * * @return */ --- 141,145 ---- /** * merge file for basic setings ! * * @return */ *************** *** 144,148 **** /** * namespace of pckage ! * * @return */ --- 150,154 ---- /** * namespace of pckage ! * * @return */ *************** *** 153,157 **** /** * package name ! * * @return */ --- 159,163 ---- /** * package name ! * * @return */ *************** *** 216,220 **** /** ! * whether generated package shall be declared as abstract * @generama.property * @param _abstract --- 222,226 ---- /** ! * whether generated package shall be declared as abstract * @generama.property * @param _abstract |
From: Diogo Q. <dqu...@us...> - 2006-06-07 22:11:20
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/testapp-ejb In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv27879/testapp-ejb Modified Files: maven.xml Log Message: Fix bugs. Index: maven.xml =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/testapp-ejb/maven.xml,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** maven.xml 13 Dec 2005 12:29:24 -0000 1.14 --- maven.xml 7 Jun 2006 01:44:13 -0000 1.15 *************** *** 34,37 **** --- 34,40 ---- <component classname="org.generama.JellyTemplateEngine"/> --> + <!-- Need this for now... Need to check why...--> + <component classname="org.generama.MergeableVelocityTemplateEngine"/> + <component classname="org.generama.JellyTemplateEngine"/> <component |
From: Diogo Q. <dqu...@us...> - 2006-06-07 22:10:40
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/entity In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv31117/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/entity Modified Files: PrimaryKeyClassPlugin.java LookupObjectPlugin.java ValueObjectPlugin.java Log Message: EjbJavaGenerating plugin now support in memory generation of artifacts. This will be important for not needing second passes like xd1 does. A better management of hierarchy of from related tags is still needed to prepare PluginCMP and PluginBMP. Index: PrimaryKeyClassPlugin.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/entity/PrimaryKeyClassPlugin.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PrimaryKeyClassPlugin.java 13 Dec 2005 03:36:17 -0000 1.6 --- PrimaryKeyClassPlugin.java 5 Jun 2006 00:02:50 -0000 1.7 *************** *** 23,26 **** --- 23,27 ---- import org.xdoclet.plugin.ejb.EjbConfig; + import org.xdoclet.plugin.ejb.EjbJavaClassBuilder; import org.xdoclet.plugin.ejb.EjbJavaGeneratingPlugin; import org.xdoclet.plugin.ejb.EjbJavaType; *************** *** 28,35 **** --- 29,39 ---- import org.xdoclet.plugin.ejb.EjbUtils; import org.xdoclet.plugin.ejb.qtags.EjbPkTag; + import org.xdoclet.plugin.ejb.util.QDoxCachedMetadataProvider; import com.thoughtworks.qdox.model.BeanProperty; import com.thoughtworks.qdox.model.JavaClass; + import com.thoughtworks.qdox.model.JavaField; import com.thoughtworks.qdox.model.JavaMethod; + import com.thoughtworks.qdox.model.JavaParameter; import com.thoughtworks.qdox.model.Type; *************** *** 40,44 **** * @version $Revision$ */ ! public class PrimaryKeyClassPlugin extends EjbJavaGeneratingPlugin { /** Cache for hierarchy resolver */ private Map pkHierarchyCache = new HashMap(); --- 44,48 ---- * @version $Revision$ */ ! public class PrimaryKeyClassPlugin extends EjbJavaGeneratingPlugin implements EjbJavaClassBuilder { /** Cache for hierarchy resolver */ private Map pkHierarchyCache = new HashMap(); *************** *** 46,50 **** public PrimaryKeyClassPlugin(VelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { ! super(templateEngine, metadataProvider, writerMapper, config); EjbRuntime.setPlugin(this); setPackageregex("beans"); --- 50,54 ---- public PrimaryKeyClassPlugin(VelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { ! super(templateEngine, new QDoxCachedMetadataProvider(metadataProvider), writerMapper, config); EjbRuntime.setPlugin(this); setPackageregex("beans"); *************** *** 89,92 **** --- 93,188 ---- } + /** + * JavaClass that describes the generated artifacts + * + * @return The generated artifacts JavaClass otherwise null + */ + public JavaClass[] buildFor(JavaClass metadata) { + if (!shouldGenerate(metadata)) { + return null; + } + + JavaField field; + JavaMethod method; + JavaClass retVal = createDynamicJavaClass(getDestinationClassname(metadata), getDestinationPackage(metadata), null, getMetadataProvider()); + retVal.setModifiers(new String[] { "public" }); + + PkMetadata metaPk = getMetaPk(metadata); + String extendz = getExtends(metadata); + + JavaClass parentBuilded[]; + JavaClass parent = metadata.getSuperJavaClass(); + while (parent != null) { + parentBuilded = buildFor(parent); + if ((parentBuilded != null) && (parentBuilded[0].getFullyQualifiedName().equals(extendz))) { + retVal.setSuperClass(parentBuilded[0].asType()); + break; + } + parent = parent.getSuperJavaClass(); + } + String[] implementz = getImplements(metadata); + Type[] implementzTypes = new Type[implementz.length]; + for (int i = 0; i < implementz.length; i++) { + implementzTypes[i] = new Type(implementz[i]); + } + retVal.setImplementz(implementzTypes); + + BeanProperty[] properties = metaPk.getProperties(); + for (int i = 0; (properties != null) && (i < properties.length); i++) { + field = new JavaField(properties[i].getType(), properties[i].getName()); + field.setModifiers(new String[] { "public" }); + retVal.addField(field); + } + + method = new JavaMethod(getDestinationClassname(metadata)); + method.setConstructor(true); + method.setModifiers(new String[] { "public" }); + retVal.addMethod(method); + + BeanProperty[] parentProperties = metaPk.getParentProperties(); + if ((properties != null && properties.length > 0) + || (parentProperties != null && parentProperties.length > 0)) { + method = new JavaMethod(getDestinationClassname(metadata)); + method.setConstructor(true); + method.setModifiers(new String[] { "public" }); + + JavaParameter[] params = new JavaParameter[((properties != null) ? properties.length : 0) + ((parentProperties != null) ? parentProperties.length : 0)]; + int idx = 0; + for (int i = 0; (properties != null) && (i < properties.length); i++) { + params[idx++] = new JavaParameter(properties[i].getType(), properties[i].getName()); + } + for (int i = 0; (parentProperties != null) && (i < parentProperties.length); i++) { + params[idx++] = new JavaParameter(parentProperties[i].getType(), parentProperties[i].getName()); + } + method.setParameters(params); + retVal.addMethod(method); + } + + for (int i = 0; (properties != null) && (i < properties.length); i++) { + method = new JavaMethod(getSetterName(properties[i])); + method.setModifiers(new String[] { "public" }); + method.setParameters(new JavaParameter[]{new JavaParameter(properties[i].getType(), properties[i].getName())}); + retVal.addMethod(method); + method = new JavaMethod(properties[i].getType(), getGetterName(properties[i])); + method.setModifiers(new String[] { "public" }); + retVal.addMethod(method); + } + + method = new JavaMethod(new Type("int"), "hashCode"); + method.setModifiers(new String[] { "public" }); + retVal.addMethod(method); + + method = new JavaMethod(new Type("boolean"), "equals"); + method.setModifiers(new String[] { "public" }); + method.setParameters(new JavaParameter[]{new JavaParameter(new Type("java.lang.Object"), "other")}); + retVal.addMethod(method); + + method = new JavaMethod(new Type("java.lang.String"), "toString"); + method.setModifiers(new String[] { "public" }); + retVal.addMethod(method); + + return new JavaClass[]{retVal}; + } + public boolean shouldGenerate(Object metadata) { JavaClass javaClass = (JavaClass) metadata; Index: ValueObjectPlugin.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/entity/ValueObjectPlugin.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ValueObjectPlugin.java 13 Dec 2005 03:36:17 -0000 1.1 --- ValueObjectPlugin.java 5 Jun 2006 00:02:50 -0000 1.2 *************** *** 31,34 **** --- 31,35 ---- import org.xdoclet.plugin.ejb.EjbBeanResolver; import org.xdoclet.plugin.ejb.EjbConfig; + import org.xdoclet.plugin.ejb.EjbJavaClassBuilder; import org.xdoclet.plugin.ejb.EjbJavaGeneratingPlugin; import org.xdoclet.plugin.ejb.EjbRuntime; *************** *** 46,49 **** --- 47,51 ---- import com.thoughtworks.qdox.model.DocletTag; import com.thoughtworks.qdox.model.JavaClass; + import com.thoughtworks.qdox.model.JavaField; import com.thoughtworks.qdox.model.JavaMethod; import com.thoughtworks.qdox.model.JavaParameter; *************** *** 55,59 **** * @author Diogo Quintela */ ! public class ValueObjectPlugin extends EjbJavaGeneratingPlugin { public static final Type SET_TYPE = new Type(Set.class.getName()); public static final Type COLLECTION_TYPE = new Type(Collection.class.getName()); --- 57,61 ---- * @author Diogo Quintela */ ! public class ValueObjectPlugin extends EjbJavaGeneratingPlugin implements EjbJavaClassBuilder { public static final Type SET_TYPE = new Type(Set.class.getName()); public static final Type COLLECTION_TYPE = new Type(Collection.class.getName()); *************** *** 91,94 **** --- 93,99 ---- private final RelationManager relationManager; + /** Cache for value object resolver */ + private Map metaVoCache = new HashMap(); + public ValueObjectPlugin(VelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { *************** *** 124,127 **** --- 129,632 ---- } + /** + * JavaClass that describes the generated artifacts + * + * @return The generated artifacts JavaClass otherwise null + */ + public JavaClass[] buildFor(JavaClass metadata_) { + JavaClass[] expandedClasses = expandClass(metadata_); + + List retLst = new ArrayList(); + + for (int i = 0; i < expandedClasses.length; i++) { + JavaClass metadata = expandedClasses[i]; + if (!shouldGenerate(metadata)) { + continue; + } + ValueObjectMetadata metaVo = getMetaVO(metadata); + BeanProperty pkProperty = metaVo.getPkProperty(); + + JavaField field; + JavaMethod method; + JavaClass retVal = createDynamicJavaClass(getDestinationClassname(metadata), getDestinationPackage(metadata), null, getMetadataProvider()); + String[] modifiers = new String[isAbstract(metadata) ? 2 : 1]; + modifiers[0] = "public"; + if (isAbstract(metadata)) { + modifiers[1] = "abstract"; + } + retVal.setModifiers(modifiers); + retVal.setSuperClass(new Type(getExtends(metadata))); + + String[] implementz = getImplements(metadata); + Type[] implementzTypes = new Type[implementz.length]; + for (int j = 0; j < implementz.length; j++) { + implementzTypes[j] = new Type(implementz[j]); + } + retVal.setImplementz(implementzTypes); + + if (getEjbUtils().isUseSoftLocking(metadata)) { + field = new JavaField(new Type("int"), "_version"); + field.setModifiers(new String[] { "private" }); + retVal.addField(field); + } + + ValueObjectFieldMetadata[] nonPkFields = metaVo.getNonPkFields(); + for (int j = 0; j < nonPkFields.length; j++) { + ValueObjectFieldMetadata vField = nonPkFields[j]; + field = new JavaField(vField.getProperty().getType(), vField.getProperty().getName()); + field.setModifiers(new String[] { "private" }); + retVal.addField(field); + field = new JavaField(new Type("boolean"), vField.getProperty().getName()+"HasBeenSet"); + field.setModifiers(new String[] { "private" }); + retVal.addField(field); + } + + ValueObjectFieldMetadata[] pkFields = metaVo.getPkFields(); + for (int j = 0; j < pkFields.length; j++) { + ValueObjectFieldMetadata vField = pkFields[j]; + field = new JavaField(vField.getProperty().getType(), vField.getProperty().getName()); + field.setModifiers(new String[] { "private" }); + retVal.addField(field); + field = new JavaField(new Type("boolean"), vField.getProperty().getName()+"HasBeenSet"); + field.setModifiers(new String[] { "private" }); + retVal.addField(field); + } + + ValueObjectRelationMetadata[] nonCollectionRel = metaVo.getNonCollectionRelations(); + for (int j = 0; j < nonCollectionRel.length; j++) { + ValueObjectRelationMetadata vRelation = nonCollectionRel[j]; + field = new JavaField(vRelation.getProperty().getType(), vRelation.getProperty().getName()); + field.setModifiers(new String[] { "private" }); + retVal.addField(field); + field = new JavaField(new Type("boolean"), vRelation.getProperty().getName()+"HasBeenSet"); + field.setModifiers(new String[] { "private" }); + retVal.addField(field); + } + ValueObjectRelationMetadata[] collectionRel = metaVo.getCollectionRelations(); + for (int j = 0; j < collectionRel.length; j++) { + ValueObjectRelationMetadata vRelation = collectionRel[j]; + field = new JavaField(vRelation.getProperty().getType(), vRelation.getProperty().getName()); + field.setModifiers(new String[] { "private" }); + retVal.addField(field); + } + + method = new JavaMethod(getDestinationClassname(metadata)); + method.setConstructor(true); + method.setModifiers(new String[] { "public" }); + retVal.addMethod(method); + + if (metaVo.isGeneratePKConstructor() && metaVo.hasPk()) { + if(!isEmpty(nonPkFields) || !metaVo.isSimplePkProperty()) { + method = new JavaMethod(getDestinationClassname(metadata)); + method.setConstructor(true); + method.setModifiers(new String[] { "public" }); + method.setParameters(new JavaParameter[]{new JavaParameter(pkProperty.getType(), pkProperty.getName())}); + retVal.addMethod(method); + } + if(!isEmpty(nonPkFields) && !metaVo.isSimplePkProperty()) { + method = new JavaMethod(getDestinationClassname(metadata)); + method.setConstructor(true); + method.setModifiers(new String[] { "public" }); + JavaParameter[] params = new JavaParameter[nonPkFields.length + 1]; + params[0] = new JavaParameter(pkProperty.getType(), pkProperty.getName()); + for (int j = 0; j < nonPkFields.length; j++) { + ValueObjectFieldMetadata nonPkField = nonPkFields[j]; + params[j+1] = new JavaParameter(nonPkField.getProperty().getType(), nonPkField.getProperty().getName()); + } + method.setParameters(params); + retVal.addMethod(method); + } + } + + ValueObjectFieldMetadata[] fields = metaVo.getFields(); + if (!isEmpty(fields)) { + method = new JavaMethod(getDestinationClassname(metadata)); + method.setConstructor(true); + method.setModifiers(new String[] { "public" }); + JavaParameter[] params = new JavaParameter[fields.length]; + for (int j = 0; j < fields.length; j++) { + ValueObjectFieldMetadata vField = fields[j]; + params[j] = new JavaParameter(vField.getProperty().getType(), vField.getProperty().getName()); + } + method.setParameters(params); + retVal.addMethod(method); + } + + if (metaVo.hasPk() && !metaVo.isSimplePkProperty()) { + method = new JavaMethod(pkProperty.getType(), pkProperty.getAccessor().getName()); + modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1]; + modifiers[0] = "public"; + if (metaVo.isFullSynchronization()) { + modifiers[1] = "synchronized"; + } + method.setModifiers(modifiers); + retVal.addMethod(method); + + method = new JavaMethod(pkProperty.getMutator().getName()); + modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1]; + modifiers[0] = "public"; + if (metaVo.isFullSynchronization()) { + modifiers[1] = "synchronized"; + } + method.setModifiers(modifiers); + method.setParameters(new JavaParameter[]{new JavaParameter(pkProperty.getType(), pkProperty.getName())}); + retVal.addMethod(method); + } + + if (getEjbUtils().isUseSoftLocking(metadata)) { + method = new JavaMethod(new Type("int"), "getVersion"); + modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1]; + modifiers[0] = "public"; + if (metaVo.isFullSynchronization()) { + modifiers[1] = "synchronized"; + } + method.setModifiers(modifiers); + retVal.addMethod(method); + + method = new JavaMethod("setVersion"); + modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1]; + modifiers[0] = "public"; + if (metaVo.isFullSynchronization()) { + modifiers[1] = "synchronized"; + } + method.setModifiers(modifiers); + method.setParameters(new JavaParameter[]{new JavaParameter(new Type("int"), "version")}); + retVal.addMethod(method); + } + + for (int j = 0; (fields != null) && (j < fields.length); j++) { + ValueObjectFieldMetadata vField = fields[j]; + method = new JavaMethod(vField.getProperty().getType(), vField.getProperty().getAccessor().getName()); + modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1]; + modifiers[0] = "public"; + if (metaVo.isFullSynchronization()) { + modifiers[1] = "synchronized"; + } + method.setModifiers(modifiers); + retVal.addMethod(method); + + method = new JavaMethod(vField.getProperty().getMutator().getName()); + modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1]; + modifiers[0] = "public"; + if (metaVo.isFullSynchronization()) { + modifiers[1] = "synchronized"; + } + method.setModifiers(modifiers); + method.setParameters(new JavaParameter[]{new JavaParameter(vField.getProperty().getType(), vField.getProperty().getName())}); + retVal.addMethod(method); + + method = new JavaMethod(new Type("boolean"), vField.getProperty().getName()+"HasBeenSet"); + modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1]; + modifiers[0] = "public"; + if (metaVo.isFullSynchronization()) { + modifiers[1] = "synchronized"; + } + method.setModifiers(modifiers); + retVal.addMethod(method); + } + + for (int k = 0; k < nonCollectionRel.length; k++) { + ValueObjectRelationMetadata nonColRel = nonCollectionRel[k]; + + method = new JavaMethod(nonColRel.getProperty().getType(), nonColRel.getProperty().getAccessor().getName()); + modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1]; + modifiers[0] = "public"; + if (metaVo.isFullSynchronization()) { + modifiers[1] = "synchronized"; + } + method.setModifiers(modifiers); + retVal.addMethod(method); + + method = new JavaMethod(nonColRel.getProperty().getMutator().getName()); + modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1]; + modifiers[0] = "public"; + if (metaVo.isFullSynchronization()) { + modifiers[1] = "synchronized"; + } + method.setModifiers(modifiers); + method.setParameters(new JavaParameter[]{new JavaParameter(nonColRel.getProperty().getType(), nonColRel.getProperty().getName())}); + retVal.addMethod(method); + + method = new JavaMethod(new Type("boolean"), nonColRel.getProperty().getName()+"HasBeenSet"); + modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1]; + modifiers[0] = "public"; + if (metaVo.isFullSynchronization()) { + modifiers[1] = "synchronized"; + } + method.setModifiers(modifiers); + retVal.addMethod(method); + } + + for (int k = 0; k < collectionRel.length; k++) { + ValueObjectRelationMetadata colRel = collectionRel[k]; + + field = new JavaField(colRel.getProperty().getType(), "added" + colRel.getProperty().getName()); + field.setModifiers(new String[]{"protected"}); + retVal.addField(field); + field = new JavaField(colRel.getProperty().getType(), "onceAdded" + colRel.getProperty().getName()); + field.setModifiers(new String[]{"protected"}); + retVal.addField(field); + field = new JavaField(colRel.getProperty().getType(), "removed" + colRel.getProperty().getName()); + field.setModifiers(new String[]{"protected"}); + retVal.addField(field); + field = new JavaField(colRel.getProperty().getType(), "updated" + colRel.getProperty().getName()); + field.setModifiers(new String[]{"protected"}); + retVal.addField(field); + + method = new JavaMethod(colRel.getProperty().getType(), "getAdded" + colRel.getProperty().getName()); + method.setModifiers(new String[]{"public"}); + retVal.addMethod(method); + method = new JavaMethod(colRel.getProperty().getType(), "getOnceAdded" + colRel.getProperty().getName()); + method.setModifiers(new String[]{"public"}); + retVal.addMethod(method); + method = new JavaMethod(colRel.getProperty().getType(), "getRemoved" + colRel.getProperty().getName()); + method.setModifiers(new String[]{"public"}); + retVal.addMethod(method); + method = new JavaMethod(colRel.getProperty().getType(), "getUpdated" + colRel.getProperty().getName()); + method.setModifiers(new String[]{"public"}); + retVal.addMethod(method); + + method = new JavaMethod(colRel.getProperty().getType(), colRel.getProperty().getAccessor().getName()+"Collection"); + method.setModifiers(new String[]{"public"}); + retVal.addMethod(method); + + method = new JavaMethod(new Type(colRel.getAggregate(),1), colRel.getProperty().getAccessor().getName()); + modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1]; + modifiers[0] = "public"; + if (metaVo.isFullSynchronization()) { + modifiers[1] = "synchronized"; + } + method.setModifiers(modifiers); + retVal.addMethod(method); + + method = new JavaMethod(colRel.getProperty().getMutator().getName()); + modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1]; + modifiers[0] = "public"; + if (metaVo.isFullSynchronization()) { + modifiers[1] = "synchronized"; + } + method.setModifiers(modifiers); + method.setParameters(new JavaParameter[]{new JavaParameter(new Type(colRel.getAggregate(),1), colRel.getProperty().getName())}); + retVal.addMethod(method); + + method = new JavaMethod("clear"+colRel.getProperty().getName()); + modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1]; + modifiers[0] = "public"; + if (metaVo.isFullSynchronization()) { + modifiers[1] = "synchronized"; + } + method.setModifiers(modifiers); + retVal.addMethod(method); + + method = new JavaMethod("add"+colRel.getAggregateName()); + modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1]; + modifiers[0] = "public"; + if (metaVo.isFullSynchronization()) { + modifiers[1] = "synchronized"; + } + method.setModifiers(modifiers); + method.setParameters(new JavaParameter[]{new JavaParameter(new Type(colRel.getAggregate()), "other")}); + retVal.addMethod(method); + + method = new JavaMethod("remove"+colRel.getAggregateName()); + modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1]; + modifiers[0] = "public"; + if (metaVo.isFullSynchronization()) { + modifiers[1] = "synchronized"; + } + method.setModifiers(modifiers); + method.setParameters(new JavaParameter[]{new JavaParameter(new Type(colRel.getAggregate()), "other")}); + retVal.addMethod(method); + + method = new JavaMethod("update"+colRel.getAggregateName()); + modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1]; + modifiers[0] = "public"; + if (metaVo.isFullSynchronization()) { + modifiers[1] = "synchronized"; + } + method.setModifiers(modifiers); + method.setParameters(new JavaParameter[]{new JavaParameter(new Type(colRel.getAggregate()), "other")}); + retVal.addMethod(method); + + method = new JavaMethod("clean"+colRel.getAggregateName()); + modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1]; + modifiers[0] = "public"; + if (metaVo.isFullSynchronization()) { + modifiers[1] = "synchronized"; + } + method.setModifiers(modifiers); + retVal.addMethod(method); + + method = new JavaMethod("copy"+colRel.getProperty().getName()+"From"); + modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1]; + modifiers[0] = "public"; + if (metaVo.isFullSynchronization()) { + modifiers[1] = "synchronized"; + } + method.setModifiers(modifiers); + method.setParameters(new JavaParameter[]{new JavaParameter(new Type(getDestinationFullyQualifiedClassName(metadata)), "other")}); + retVal.addMethod(method); + } + + method = new JavaMethod(new Type("java.lang.String"), "toString"); + modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1]; + modifiers[0] = "public"; + if (metaVo.isFullSynchronization()) { + modifiers[1] = "synchronized"; + } + method.setModifiers(modifiers); + retVal.addMethod(method); + + method = new JavaMethod(new Type("boolean"), "hasIdentity"); + modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1]; + modifiers[0] = "protected"; + if (metaVo.isFullSynchronization()) { + modifiers[1] = "synchronized"; + } + method.setModifiers(modifiers); + retVal.addMethod(method); + + method = new JavaMethod(new Type("boolean"), "equals"); + method.setModifiers(new String[]{"public"}); + method.setParameters(new JavaParameter[]{new JavaParameter(new Type("java.lang.Object"), "other")}); + retVal.addMethod(method); + + if (metaVo.isStrictOrdering()) { + method = new JavaMethod(new Type("int"), "compareTo"); + method.setModifiers(new String[]{"public"}); + method.setParameters(new JavaParameter[]{new JavaParameter(new Type("java.lang.Object"), "other")}); + retVal.addMethod(method); + } + + method = new JavaMethod(new Type("java.lang.Object"), "clone"); + modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1]; + modifiers[0] = "public"; + if (metaVo.isFullSynchronization()) { + modifiers[1] = "synchronized"; + } + method.setModifiers(modifiers); + retVal.addMethod(method); + + method = new JavaMethod(new Type("int"), "hashCode"); + modifiers = new String[metaVo.isFullSynchronization() ? 2 : 1]; + modifiers[0] = "public"; + if (metaVo.isFullSynchronization()) { + modifiers[1] = "synchronized"; + } + method.setModifiers(modifiers); + retVal.addMethod(method); + + JavaClass innerClass = createDynamicJavaClass("ReadOnly" + getDestinationClassname(metadata), getDestinationPackage(metadata), null, getMetadataProvider()); + innerClass.setModifiers(new String[]{"final","private"}); + retVal.addClass(innerClass); + + method = new JavaMethod(innerClass.asType(), "getReadOnly"+getDestinationClassname(metadata)); + method.setModifiers(new String[]{"public"}); + retVal.addMethod(method); + + method = new JavaMethod(new Type("java.util.Collection"), "wrapCollection"); + method.setModifiers(new String[]{"private", "static"}); + method.setParameters(new JavaParameter[]{new JavaParameter(new Type("java.util.Collection"), "input")}); + retVal.addMethod(method); + + method = new JavaMethod(new Type("java.util.Set"), "wrapCollection"); + method.setModifiers(new String[]{"private", "static"}); + method.setParameters(new JavaParameter[]{new JavaParameter(new Type("java.util.Set"), "input")}); + retVal.addMethod(method); + + method = new JavaMethod(new Type("java.util.Collection"), "wrapReadOnly"); + method.setModifiers(new String[]{"private", "static"}); + method.setParameters(new JavaParameter[]{new JavaParameter(new Type("java.util.Collection"), "input")}); + retVal.addMethod(method); + + method = new JavaMethod(new Type("java.util.Set"), "wrapReadOnly"); + method.setModifiers(new String[]{"private", "static"}); + method.setParameters(new JavaParameter[]{new JavaParameter(new Type("java.util.Set"), "input")}); + retVal.addMethod(method); + + // handle inner class + + implementz = getImplements(metadata); + implementzTypes = new Type[implementz.length]; + for (int j = 0; j < implementz.length; j++) { + implementzTypes[j] = new Type(implementz[j]); + } + innerClass.setImplementz(implementzTypes); + + method = new JavaMethod(retVal.asType(), "underlying"); + method.setModifiers(new String[]{"private"}); + innerClass.addMethod(method); + + for (int j = 0; (fields != null) && (j < fields.length); j++) { + ValueObjectFieldMetadata vField = fields[j]; + method = new JavaMethod(vField.getProperty().getType(), vField.getProperty().getAccessor().getName()); + method.setModifiers(new String[]{"public"}); + innerClass.addMethod(method); + + method = new JavaMethod(new Type("boolean"), vField.getProperty().getName()+"HasBeenSet"); + method.setModifiers(new String[]{"public"}); + innerClass.addMethod(method); + } + + for (int k = 0; k < nonCollectionRel.length; k++) { + ValueObjectRelationMetadata nonColRel = nonCollectionRel[k]; + + method = new JavaMethod(nonColRel.getProperty().getType(), nonColRel.getProperty().getAccessor().getName()); + method.setModifiers(new String[]{"public"}); + innerClass.addMethod(method); + + method = new JavaMethod(new Type("boolean"), nonColRel.getProperty().getName()+"HasBeenSet"); + method.setModifiers(new String[]{"public"}); + innerClass.addMethod(method); + } + + for (int k = 0; k < collectionRel.length; k++) { + ValueObjectRelationMetadata colRel = collectionRel[k]; + + method = new JavaMethod(colRel.getProperty().getType(), "getAdded" + colRel.getProperty().getName()); + method.setModifiers(new String[]{"public"}); + innerClass.addMethod(method); + method = new JavaMethod(colRel.getProperty().getType(), "getOnceAdded" + colRel.getProperty().getName()); + method.setModifiers(new String[]{"public"}); + innerClass.addMethod(method); + method = new JavaMethod(colRel.getProperty().getType(), "getRemoved" + colRel.getProperty().getName()); + method.setModifiers(new String[]{"public"}); + innerClass.addMethod(method); + method = new JavaMethod(colRel.getProperty().getType(), "getUpdated" + colRel.getProperty().getName()); + method.setModifiers(new String[]{"public"}); + innerClass.addMethod(method); + + method = new JavaMethod(colRel.getProperty().getType(), colRel.getProperty().getAccessor().getName()+"Collection"); + method.setModifiers(new String[]{"public"}); + innerClass.addMethod(method); + + method = new JavaMethod(new Type(colRel.getAggregate(),1), colRel.getProperty().getAccessor().getName()); + method.setModifiers(new String[]{"public"}); + innerClass.addMethod(method); + } + + method = new JavaMethod(new Type("int"), "hashCode"); + method.setModifiers(new String[]{"public"}); + innerClass.addMethod(method); + + method = new JavaMethod(new Type("boolean"), "equals"); + method.setModifiers(new String[]{"public"}); + method.setParameters(new JavaParameter[]{new JavaParameter(new Type("java.lang.Object"), "other")}); + innerClass.addMethod(method); + + if (metaVo.isStrictOrdering()) { + method = new JavaMethod(new Type("int"), "compareTo"); + method.setModifiers(new String[]{"public"}); + method.setParameters(new JavaParameter[]{new JavaParameter(new Type("java.lang.Object"), "other")}); + innerClass.addMethod(method); + } + + // add to list + retLst.add(retVal); + } + + return (retLst.size() == 0) ? null : (JavaClass[])retLst.toArray(new JavaClass[0]); + } + private QDoxValueObjectExpanderFilterMetadataProvider getValueObjectMetadataProvider() { return (QDoxValueObjectExpanderFilterMetadataProvider) getMetadataProvider(); *************** *** 514,680 **** if (valueTags.length > 0) { - // By the use of MyQDoxFilterMetadataProvider, we are sure that if a ejb.value-object tag exists - // It can only be one (at least in the normal run of this plugin - EjbValueObjectTag valueTag = (EjbValueObjectTag) valueTags[0]; - retVal = new ValueObjectMetadata(javaClass, valueTag, - EjbRuntime.getPrimaryKeyClassPlugin().collectPkHierarchy(javaClass)); - - // Lets start rolling - // retVal.setUpdatable(valueTag.isUpdatable()); - // TODO: Are we supporting hierarchaly generated files - // similar to PrimaryKeys ? - JavaMethod[] methods = javaClass.getMethods(true); - JavaMethod method; - - for (int i = 0; i < methods.length; i++) { - method = methods[i]; ! if (log.isTraceEnabled()) { ! // log.trace(method.getName() + " = " + method); ! log.trace(method.getName() + " seeing if this is a value-object-field"); } ! // Obtain extra method flags ! int metaFlags = ejbUtils.getMethodMetadata(javaClass, method); ! if (EjbUtils.hasFlag(metaFlags, EjbUtils.METADATA_METHOD_PRIMARY_KEY_FIELD) || ! EjbUtils.hasFlag(metaFlags, EjbUtils.METADATA_METHOD_PERSISTENCE_FIELD) || ! EjbUtils.hasFlag(metaFlags, EjbUtils.METADATA_METHOD_RELATION_FIELD)) { ! if (log.isDebugEnabled()) { ! log.debug(method.getName() + ! " is candidate for checking. It's a persistence field, relation field or primary key field"); ! } ! // Por aqui o resto das validações e lógica ! boolean isValueObjectField = isSelectedValueObjectField(valueTag.getMatch(), method); ! // Primary key field must ALLWAYS be included ! (or then they must be checked if ....) ! isValueObjectField = isValueObjectField || ! EjbUtils.hasFlag(metaFlags, EjbUtils.METADATA_METHOD_PRIMARY_KEY_FIELD); ! if (isValueObjectField) { ! EjbValueObjectFieldTag vTag = findMatchedTag(valueTag.getMatch(), method); ! BeanProperty prop = javaClass.getBeanProperty(method.getPropertyName(), true); if (log.isDebugEnabled()) { ! log.debug(method.getName() + " is a value-object-field: matches or is a pk-field."); } ! // XXX: Todo, if we have a relation found by the RelationManager, then we must have ! // it's treatment as such, or should be ignored ! // Maybe just check if is a EjbUtils.METADATA_METHOD_RELATION_FIELD ! Relation relation = relationManager.getRelationFor(method, javaClass); ! if ((relation != null) || ! ((vTag != null) && ((vTag.getAggregate() != null) || (vTag.getCompose() != null)))) { ! // This is a value-object relation ! // vTag must be non-null, because we need values from it ! if ((vTag != null) && ((vTag.getAggregate() != null) ^ (vTag.getCompose() != null))) { ! JavaClass relationEjb = null; ! Type collectionType = null; ! if (relation != null) { ! if (!method.equals(relation.getLeftMethod())) { ! log.debug( ! "Current method doesn't match relations' left method. Reversing relation"); ! relation = relation.reverse(); ! if (log.isDebugEnabled()) { ! log.debug("Reversed relation is relation=" + relation); ! } ! } ! if (log.isDebugEnabled()) { ! log.debug("Using relation information. relation=" + relation); ! log.debug("1# Left bean=" + ! ((relation.getLeftBean() != null) ! ? relation.getLeftBean().getFullyQualifiedName() : null)); ! log.debug("1# Rigth bean=" + ! ((relation.getRightBean() != null) ! ? relation.getRightBean().getFullyQualifiedName() : null)); ! } ! String relationEjbName = relation.getRightEJBName(); ! relationEjb = beanResolver.findEjbByName(relationEjbName); ! collectionType = relation.getLeftMethod().getReturns(); ! } else { ! log.debug("We don't have relation information for this method"); ! Type returnType = method.getReturns(); ! Type relationType = null; ! if (returnType.isA(COLLECTION_TYPE) || returnType.isA(SET_TYPE)) { ! String members = vTag.getMembers(); if (log.isDebugEnabled()) { ! log.debug(returnType + ": Is a Set or Collection. Using members='" + ! members + "'"); } ! if (members == null) { ! if (log.isWarnEnabled()) { ! log.warn(EjbUtils.getMessageWithTagLocation(vTag, ! "members is null. Skipping.")); } ! continue; ! } ! relationType = new Type(members); ! collectionType = returnType.isA(COLLECTION_TYPE) ? COLLECTION_TYPE : SET_TYPE; ! } else { ! if (log.isDebugEnabled()) { ! log.debug(returnType + ": Using it to find it's match!"); } ! relationType = returnType; } ! relationEjb = findBeanByInterface(getOriginalMetadata(), relationType); ! } ! if (relationEjb == null) { ! log.warn("Couldn't find the related Ejb! Skipping."); ! continue; ! } ! ValueObjectRelationMetadata vObjRelation = new ValueObjectRelationMetadata(relationEjb, ! collectionType, (vTag.getAggregate() != null), vTag); ! if (log.isDebugEnabled()) { ! log.debug("Relation is " + vObjRelation); ! } ! if (vObjRelation.getAggregateName() == null) { ! String aggName = vObjRelation.isAggregate() ? "aggregate" : "compose"; ! if (log.isWarnEnabled()) { log.warn(EjbUtils.getMessageWithTagLocation(vTag, ! aggName + "-name can't be null. Ignoring.")); } ! // Ignore field continue; } - - // add it - retVal.addRelation(vObjRelation); } else { ! // It can only be an aggregate or a composition. Not both! ! if (vTag != null && log.isWarnEnabled()) { ! log.warn(EjbUtils.getMessageWithTagLocation(vTag, ! "Can't be an aggregate and a composition simultaneous! Skipping.")); ! } ! ! // Skip to next method ! continue; } - } else { - // Simple value-object property - ValueObjectFieldMetadata vObjField = new ValueObjectFieldMetadata(prop.getType(), - prop.getName(), metaFlags); - retVal.addField(vObjField); } } } } } --- 1019,1206 ---- if (valueTags.length > 0) { ! String cacheKey = javaClass.getFullyQualifiedName() + "-" + getDestinationClassname(javaClass); ! if (log.isDebugEnabled()) { ! log.debug("I'll be using cacheKey='"+cacheKey+"' for VO of "+javaClass.getFullyQualifiedName()); ! } ! if (metaVoCache.containsKey(cacheKey)) { ! if (log.isDebugEnabled()) { ! log.debug("I found cache entry for cacheKey='"+cacheKey+"'"); ! } ! retVal = (ValueObjectMetadata) metaVoCache.get(cacheKey); ! } else { ! if (log.isDebugEnabled()) { ! log.debug("I DIDN't found cache entry for cacheKey='"+cacheKey+"'"); } ! // By the use of MyQDoxFilterMetadataProvider, we are sure that if a ejb.value-object tag exists ! // It can only be one (at least in the normal run of this plugin ! EjbValueObjectTag valueTag = (EjbValueObjectTag) valueTags[0]; ! retVal = new ValueObjectMetadata(javaClass, valueTag, ! EjbRuntime.getPrimaryKeyClassPlugin().collectPkHierarchy(javaClass)); ! // Lets start rolling ! // retVal.setUpdatable(valueTag.isUpdatable()); ! // TODO: Are we supporting hierarchaly generated files ! // similar to PrimaryKeys ? ! JavaMethod[] methods = javaClass.getMethods(true); ! JavaMethod method; ! for (int i = 0; i < methods.length; i++) { ! method = methods[i]; ! if (log.isTraceEnabled()) { ! // log.trace(method.getName() + " = " + method); ! log.trace(method.getName() + " seeing if this is a value-object-field"); ! } ! // Obtain extra method flags ! int metaFlags = ejbUtils.getMethodMetadata(javaClass, method); + if (EjbUtils.hasFlag(metaFlags, EjbUtils.METADATA_METHOD_PRIMARY_KEY_FIELD) || + EjbUtils.hasFlag(metaFlags, EjbUtils.METADATA_METHOD_PERSISTENCE_FIELD) || + EjbUtils.hasFlag(metaFlags, EjbUtils.METADATA_METHOD_RELATION_FIELD)) { if (log.isDebugEnabled()) { ! log.debug(method.getName() + ! " is candidate for checking. It's a persistence field, relation field or primary key field"); } ! // Por aqui o resto das validações e lógica ! boolean isValueObjectField = isSelectedValueObjectField(valueTag.getMatch(), method); ! // Primary key field must ALLWAYS be included ! (or then they must be checked if ....) ! isValueObjectField = isValueObjectField || ! EjbUtils.hasFlag(metaFlags, EjbUtils.METADATA_METHOD_PRIMARY_KEY_FIELD); ! if (isValueObjectField) { ! EjbValueObjectFieldTag vTag = findMatchedTag(valueTag.getMatch(), method); ! BeanProperty prop = javaClass.getBeanProperty(method.getPropertyName(), true); ! if (log.isDebugEnabled()) { ! log.debug(method.getName() + " is a value-object-field: matches or is a pk-field."); ! } ! // XXX: Todo, if we have a relation found by the RelationManager, then we must have ! // it's treatment as such, or should be ignored ! // Maybe just check if is a EjbUtils.METADATA_METHOD_RELATION_FIELD ! Relation relation = relationManager.getRelationFor(method, javaClass); ! if ((relation != null) || ! ((vTag != null) && ((vTag.getAggregate() != null) || (vTag.getCompose() != null)))) { ! // This is a value-object relation ! // vTag must be non-null, because we need values from it ! if ((vTag != null) && ((vTag.getAggregate() != null) ^ (vTag.getCompose() != null))) { ! JavaClass relationEjb = null; ! Type collectionType = null; ! if (relation != null) { ! if (!method.equals(relation.getLeftMethod())) { ! log.debug( ! "Current method doesn't match relations' left method. Reversing relation"); ! relation = relation.reverse(); ! ! if (log.isDebugEnabled()) { ! log.debug("Reversed relation is relation=" + relation); ! } ! } if (log.isDebugEnabled()) { ! log.debug("Using relation information. relation=" + relation); ! log.debug("1# Left bean=" + ! ((relation.getLeftBean() != null) ! ? relation.getLeftBean().getFullyQualifiedName() : null)); ! log.debug("1# Rigth bean=" + ! ((relation.getRightBean() != null) ! ? relation.getRightBean().getFullyQualifiedName() : null)); } ! String relationEjbName = relation.getRightEJBName(); ! relationEjb = beanResolver.findEjbByName(relationEjbName); ! collectionType = relation.getLeftMethod().getReturns(); ! } else { ! log.debug("We don't have relation information for this method"); ! Type returnType = method.getReturns(); ! Type relationType = null; ! ! if (returnType.isA(COLLECTION_TYPE) || returnType.isA(SET_TYPE)) { ! String members = vTag.getMembers(); ! ! if (log.isDebugEnabled()) { ! log.debug(returnType + ": Is a Set or Collection. Using members='" + ! members + "'"); } ! if (members == null) { ! if (log.isWarnEnabled()) { ! log.warn(EjbUtils.getMessageWithTagLocation(vTag, ! "members is null. Skipping.")); ! } ! continue; ! } ! ! relationType = new Type(members); ! collectionType = returnType.isA(COLLECTION_TYPE) ? COLLECTION_TYPE : SET_TYPE; ! } else { ! if (log.isDebugEnabled()) { ! log.debug(returnType + ": Using it to find it's match!"); ! } ! ! relationType = returnType; } ! relationEjb = findBeanByInterface(getOriginalMetadata(), relationType); } ! if (relationEjb == null) { ! log.warn("Couldn't find the related Ejb! Skipping."); ! continue; ! } ! ValueObjectRelationMetadata vObjRelation = new ValueObjectRelationMetadata(relationEjb, ! collectionType, (vTag.getAggregate() != null), vTag); ! if (log.isDebugEnabled()) { ! log.debug("Relation is " + vObjRelation); ! } ! if (vObjRelation.getAggregateName() == null) { ! String aggName = vObjRelation.isAggregate() ? "aggregate" : "compose"; ! if (log.isWarnEnabled()) { ! log.warn(EjbUtils.getMessageWithTagLocation(vTag, ! aggName + "-name can't be null. Ignoring.")); ! } ! // Ignore field ! continue; ! } ! ! // add it ! retVal.addRelation(vObjRelation); ! } else { ! // It can only be an aggregate or a composition. Not both! ! if (vTag != null && log.isWarnEnabled()) { log.warn(EjbUtils.getMessageWithTagLocation(vTag, ! "Can't be an aggregate and a composition simultaneous! Skipping.")); } ! // Skip to next method continue; } } else { ! // Simple value-object property ! ValueObjectFieldMetadata vObjField = new ValueObjectFieldMetadata(prop.getType(), ! prop.getName(), metaFlags); ! retVal.addField(vObjField); } } } } + + if (log.isDebugEnabled()) { + log.debug("I am setting a cache entry for cacheKey='"+cacheKey+"'."); + } + metaVoCache.put(cacheKey, retVal); } } Index: LookupObjectPlugin.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/entity/LookupObjectPlugin.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** LookupObjectPlugin.java 13 Dec 2005 03:36:17 -0000 1.2 --- LookupObjectPlugin.java 5 Jun 2006 00:02:50 -0000 1.3 *************** *** 13,16 **** --- 13,17 ---- import org.xdoclet.plugin.ejb.EjbConfig; import org.xdoclet.plugin.ejb.EjbHomeUtils; + import org.xdoclet.plugin.ejb.EjbJavaClassBuilder; import org.xdoclet.plugin.ejb.EjbJavaGeneratingPlugin; import org.xdoclet.plugin.ejb.EjbRuntime; *************** *** 19,24 **** --- 20,30 ---- import org.xdoclet.plugin.ejb.interfaces.RemoteHomeInterfacePlugin; import org.xdoclet.plugin.ejb.qtags.EjbUtilTag; + import org.xdoclet.plugin.ejb.util.QDoxCachedMetadataProvider; import com.thoughtworks.qdox.model.JavaClass; + import com.thoughtworks.qdox.model.JavaField; + import com.thoughtworks.qdox.model.JavaMethod; + import com.thoughtworks.qdox.model.JavaParameter; + import com.thoughtworks.qdox.model.Type; /** *************** *** 28,32 **** * @version $Revision$ */ ! public class LookupObjectPlugin extends EjbJavaGeneratingPlugin { /** Home utils */ protected EjbHomeUtils ejbHomeUtils; --- 34,38 ---- * @version $Revision$ */ ! public class LookupObjectPlugin extends EjbJavaGeneratingPlugin implements EjbJavaClassBuilder { /** Home utils */ protected EjbHomeUtils ejbHomeUtils; *************** *** 39,43 **** public LookupObjectPlugin(VelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { ! super(templateEngine, metadataProvider, writerMapper, config); // EjbRuntime.setPlugin(this); --- 45,49 ---- public LookupObjectPlugin(VelocityTemplateEngine templateEngine, QDoxCapableMetadataProvider metadataProvider, WriterMapper writerMapper, EjbConfig config) { ! super(templateEngine, new QDoxCachedMetadataProvider(metadataProvider), writerMapper, config); // EjbRuntime.setPlugin(this); *************** *** 85,88 **** --- 91,259 ---- } + /** + * JavaClass that describes the generated artifacts + * + * @return The generated artifacts JavaClass otherwise null + */ + public JavaClass[] buildFor(JavaClass metadata) { + if (!shouldGenerate(metadata)) { + return null; + } + + JavaField field; + JavaMethod method; + JavaClass retVal = createDynamicJavaClass(getDestinationClassname(metadata), + getDestinationPackage(metadata), null, getMetadataProvider()); + retVal.setModifiers(new String[] { "public" }); + if (getEjbUtils().isMessageDrivenBean(metadata)) { + field = new JavaField(new Type(String.class.getName()), "DESTINATION_JNDI_NAME"); + field.setModifiers(new String[] { "private", "final"... [truncated message content] |
From: Diogo Q. <dqu...@us...> - 2006-06-07 22:10:40
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/entity In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv31117/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/entity Modified Files: PrimaryKeyClassPluginTestCase.java AbstractValueObjectPluginTestCase.java AbstractLookupObjectPluginTestCase.java AbstractValueObjectPluginXDocletExampleTestCase.java Log Message: EjbJavaGenerating plugin now support in memory generation of artifacts. This will be important for not needing second passes like xd1 does. A better management of hierarchy of from related tags is still needed to prepare PluginCMP and PluginBMP. Index: PrimaryKeyClassPluginTestCase.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/entity/PrimaryKeyClassPluginTestCase.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PrimaryKeyClassPluginTestCase.java 11 Oct 2005 09:22:26 -0000 1.4 --- PrimaryKeyClassPluginTestCase.java 5 Jun 2006 00:02:50 -0000 1.5 *************** *** 18,24 **** import org.generama.WriterMapper; - import org.xdoclet.AbstractJavaGeneratingPluginTestCase; import org.xdoclet.QDoxMetadataProvider; import org.xdoclet.plugin.ejb.EjbConfig; --- 18,24 ---- import org.generama.WriterMapper; import org.xdoclet.QDoxMetadataProvider; + import org.xdoclet.plugin.ejb.AbstractEjbJavaClassBuilderTestCase; import org.xdoclet.plugin.ejb.EjbConfig; *************** *** 35,39 **** * */ ! public class PrimaryKeyClassPluginTestCase extends AbstractJavaGeneratingPluginTestCase { protected URL getExpected() throws FileNotFoundException, MalformedURLException { String basedir = System.getProperty("xdoclet.ejb.home"); --- 35,39 ---- * */ ! public class PrimaryKeyClassPluginTestCase extends AbstractEjbJavaClassBuilderTestCase { protected URL getExpected() throws FileNotFoundException, MalformedURLException { String basedir = System.getProperty("xdoclet.ejb.home"); Index: AbstractLookupObjectPluginTestCase.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/entity/AbstractLookupObjectPluginTestCase.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AbstractLookupObjectPluginTestCase.java 11 Oct 2005 09:22:26 -0000 1.1 --- AbstractLookupObjectPluginTestCase.java 5 Jun 2006 00:02:50 -0000 1.2 *************** *** 11,15 **** import org.generama.VelocityTemplateEngine; import org.generama.WriterMapper; ! import org.xdoclet.AbstractJavaGeneratingPluginTestCase; import org.xdoclet.plugin.ejb.EjbConfig; --- 11,15 ---- import org.generama.VelocityTemplateEngine; import org.generama.WriterMapper; ! import org.xdoclet.plugin.ejb.AbstractEjbJavaClassBuilderTestCase; import org.xdoclet.plugin.ejb.EjbConfig; *************** *** 20,24 **** * @version $Revision$ */ ! public abstract class AbstractLookupObjectPluginTestCase extends AbstractJavaGeneratingPluginTestCase { protected Plugin createPlugin(MetadataProvider metadataProvider, WriterMapper writerMapper) throws Exception { --- 20,24 ---- * @version $Revision$ */ ! public abstract class AbstractLookupObjectPluginTestCase extends AbstractEjbJavaClassBuilderTestCase { protected Plugin createPlugin(MetadataProvider metadataProvider, WriterMapper writerMapper) throws Exception { Index: AbstractValueObjectPluginXDocletExampleTestCase.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/entity/AbstractValueObjectPluginXDocletExampleTestCase.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AbstractValueObjectPluginXDocletExampleTestCase.java 13 Dec 2005 03:47:16 -0000 1.1 --- AbstractValueObjectPluginXDocletExampleTestCase.java 5 Jun 2006 00:02:50 -0000 1.2 *************** *** 18,24 **** import org.generama.WriterMapper; - import org.xdoclet.AbstractJavaGeneratingPluginTestCase; import org.xdoclet.QDoxMetadataProvider; import org.xdoclet.plugin.ejb.EjbConfig; import org.xdoclet.plugin.ejb.entity.ValueObjectPlugin; --- 18,24 ---- import org.generama.WriterMapper; import org.xdoclet.QDoxMetadataProvider; + import org.xdoclet.plugin.ejb.AbstractEjbJavaClassBuilderTestCase; import org.xdoclet.plugin.ejb.EjbConfig; import org.xdoclet.plugin.ejb.entity.ValueObjectPlugin; *************** *** 31,35 **** * @author Diogo Quintela */ ! public abstract class AbstractValueObjectPluginXDocletExampleTestCase extends AbstractJavaGeneratingPluginTestCase { protected URL getExpected() throws FileNotFoundException, MalformedURLException { String basedir = System.getProperty("xdoclet.ejb.home"); --- 31,35 ---- * @author Diogo Quintela */ ! public abstract class AbstractValueObjectPluginXDocletExampleTestCase extends AbstractEjbJavaClassBuilderTestCase { protected URL getExpected() throws FileNotFoundException, MalformedURLException { String basedir = System.getProperty("xdoclet.ejb.home"); Index: AbstractValueObjectPluginTestCase.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/test/java/org/xdoclet/plugin/ejb/entity/AbstractValueObjectPluginTestCase.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AbstractValueObjectPluginTestCase.java 13 Dec 2005 03:47:16 -0000 1.1 --- AbstractValueObjectPluginTestCase.java 5 Jun 2006 00:02:50 -0000 1.2 *************** *** 18,24 **** import org.generama.WriterMapper; - import org.xdoclet.AbstractJavaGeneratingPluginTestCase; import org.xdoclet.QDoxMetadataProvider; import org.xdoclet.plugin.ejb.EjbConfig; import org.xdoclet.plugin.ejb.entity.ValueObjectPlugin; --- 18,24 ---- import org.generama.WriterMapper; import org.xdoclet.QDoxMetadataProvider; + import org.xdoclet.plugin.ejb.AbstractEjbJavaClassBuilderTestCase; import org.xdoclet.plugin.ejb.EjbConfig; import org.xdoclet.plugin.ejb.entity.ValueObjectPlugin; *************** *** 31,35 **** * @author Diogo Quintela */ ! public abstract class AbstractValueObjectPluginTestCase extends AbstractJavaGeneratingPluginTestCase { protected URL getExpected() throws FileNotFoundException, MalformedURLException { String basedir = System.getProperty("xdoclet.ejb.home"); --- 31,35 ---- * @author Diogo Quintela */ ! public abstract class AbstractValueObjectPluginTestCase extends AbstractEjbJavaClassBuilderTestCase { protected URL getExpected() throws FileNotFoundException, MalformedURLException { String basedir = System.getProperty("xdoclet.ejb.home"); |
From: Diogo Q. <dqu...@us...> - 2006-06-07 21:55:07
|
Update of /cvsroot/xdoclet-plugins/xdoclet-plugins/testapp-ejb/src/main/java/org/xdoclet/testapp/ejb/beans In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv27879/testapp-ejb/src/main/java/org/xdoclet/testapp/ejb/beans Modified Files: ClientBean.java AccountBean.java Log Message: Fix bugs. Index: ClientBean.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/testapp-ejb/src/main/java/org/xdoclet/testapp/ejb/beans/ClientBean.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ClientBean.java 6 Oct 2005 13:49:09 -0000 1.3 --- ClientBean.java 7 Jun 2006 01:44:13 -0000 1.4 *************** *** 1,31 **** ! /* ! * Copyright (c) 2005 ! * XDoclet Team ! * All rights reserved. ! */ ! package org.xdoclet.testapp.ejb.beans; ! ! import java.util.Collection; ! ! import javax.ejb.EntityBean; ! ! /** ! * This is part of the common test application for all ejb-related ! * XDoclet plugin. Vendor-specific tags should be added herein. ! * ! * @ejb.pk pattern="{0}PrimaryKey" ! * @ejb.home local-pattern="{0}LocalHomeIFace" remote-pattern="{0}RemoteHomeIFace" ! * @ejb.interface local-pattern="{0}LocalIFace" pattern="{0}IFace" ! * ! * @author Diogo Quintela ! * @version $Revision$ ! */ ! public abstract class ClientBean extends BaseClientBean implements EntityBean { ! /** ! * @ejb.interface-method view-type="local" ! * @ejb.relation name="user-accounts" role-name="user" ! * ! * @return Collection of {@link AccountLocal} ! */ ! public abstract Collection getAccounts(); } \ No newline at end of file --- 1,32 ---- ! /* ! * Copyright (c) 2005 ! * XDoclet Team ! * All rights reserved. ! */ ! package org.xdoclet.testapp.ejb.beans; ! ! import java.util.Collection; ! ! import javax.ejb.EntityBean; ! ! /** ! * This is part of the common test application for all ejb-related ! * XDoclet plugin. Vendor-specific tags should be added herein. ! * ! * @ejb.pk pattern="{0}PrimaryKey" ! * @ejb.home local-pattern="{0}LocalHomeIFace" remote-pattern="{0}RemoteHomeIFace" ! * @ejb.interface local-pattern="{0}LocalIFace" pattern="{0}IFace" ! * @ejb.transaction type="Supports" ! * ! * @author Diogo Quintela ! * @version $Revision$ ! */ ! public abstract class ClientBean extends BaseClientBean implements EntityBean { ! /** ! * @ejb.interface-method view-type="local" ! * @ejb.relation name="user-accounts" role-name="user" ! * ! * @return Collection of {@link AccountLocal} ! */ ! public abstract Collection getAccounts(); } \ No newline at end of file Index: AccountBean.java =================================================================== RCS file: /cvsroot/xdoclet-plugins/xdoclet-plugins/testapp-ejb/src/main/java/org/xdoclet/testapp/ejb/beans/AccountBean.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** AccountBean.java 13 Dec 2005 03:55:38 -0000 1.12 --- AccountBean.java 7 Jun 2006 01:44:13 -0000 1.13 *************** *** 32,38 **** * unchecked="true" role-names="admin" * @ejb.permission role-names="normal-role" view-type="both" * * @ejb.interface extends="org.xdoclet.testapp.ejb.interfaces.Dummy" ! * * @ejb.value-object name="Account" */ --- 32,39 ---- * unchecked="true" role-names="admin" * @ejb.permission role-names="normal-role" view-type="both" + * @ejb.transaction type="Supports" method-intf="Remote" * * @ejb.interface extends="org.xdoclet.testapp.ejb.interfaces.Dummy" ! * * @ejb.value-object name="Account" */ *************** *** 40,43 **** --- 41,45 ---- /** * @ejb.interface-method view-type="both" + * @ejb.transaction-method type="Required" * @ejb.relation name="user-accounts" role-name="admin" * @ejb.permission role-names="admin" view-type="both" |