Update of
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/interfaces
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13143/plugin-ejb/src/main/java/org/xdoclet/plugin/ejb/interfaces
Modified Files:
LocalHomeInterfacePlugin.java RemoteInterfacePlugin.java
ServiceEndpointPlugin.java LocalInterfaceBase.java
RemoteHomeInterfacePlugin.java RemoteInterfaceBase.java
LocalInterfacePlugin.java
Log Message:
* Various refactorings
* Completed ValueObjectPlugin
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.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** RemoteInterfaceBase.java 11 Oct 2005 09:22:26 -0000 1.5
--- RemoteInterfaceBase.java 13 Dec 2005 03:37:45 -0000 1.6
***************
*** 6,19 ****
package org.xdoclet.plugin.ejb.interfaces;
- import java.util.Map;
-
import org.generama.QDoxCapableMetadataProvider;
import org.generama.VelocityTemplateEngine;
import org.generama.WriterMapper;
import org.xdoclet.plugin.ejb.EjbConfig;
import org.xdoclet.plugin.ejb.EjbJavaGeneratingPlugin;
import org.xdoclet.plugin.ejb.EjbUtils;
- import org.xdoclet.plugin.ejb.EjbVersion;
- import org.xdoclet.plugin.ejb.qtags.TagLibrary;
import com.thoughtworks.qdox.model.JavaClass;
--- 6,16 ----
package org.xdoclet.plugin.ejb.interfaces;
import org.generama.QDoxCapableMetadataProvider;
import org.generama.VelocityTemplateEngine;
import org.generama.WriterMapper;
+
import org.xdoclet.plugin.ejb.EjbConfig;
import org.xdoclet.plugin.ejb.EjbJavaGeneratingPlugin;
import org.xdoclet.plugin.ejb.EjbUtils;
import com.thoughtworks.qdox.model.JavaClass;
***************
*** 27,34 ****
*/
public abstract class RemoteInterfaceBase extends EjbJavaGeneratingPlugin {
- /** TODO: DOCUMENT ME! */
- protected EjbUtils ejbUtils;
- protected EjbConfig config;
-
/**
* DOCUMENT ME!
--- 24,27 ----
***************
*** 40,74 ****
* @throws ClassNotFoundException TODO: DOCUMENT ME!
*/
! public RemoteInterfaceBase(VelocityTemplateEngine templateEngine,
! QDoxCapableMetadataProvider metadataProvider, WriterMapper
writerMapper, EjbConfig config)
! throws ClassNotFoundException {
! super(templateEngine, metadataProvider, writerMapper);
! this.config = config;
! this.ejbUtils = new EjbUtils();
! new TagLibrary(metadataProvider);
! }
!
! protected void populateContextMap(Map map) {
! super.populateContextMap(map);
! map.put("util", getEjbUtils());
! map.put("version", getVersion());
! }
!
! public EjbVersion getVersion() {
! return getConfig().getEjbVersion();
! }
!
! public EjbUtils getEjbUtils() {
! return ejbUtils;
}
public boolean shouldGenerate(Object metadata) {
JavaClass javaClass = (JavaClass) metadata;
! return ejbUtils.shouldGenerate(metadata) &&
EjbUtils.hasFlag(ejbUtils.getViewType(javaClass), EjbUtils.REMOTE) &&
! !ejbUtils.isMessageDrivenBean(javaClass);
! }
!
! public EjbConfig getConfig() {
! return this.config;
}
! }
\ No newline at end of file
--- 33,47 ----
* @throws ClassNotFoundException TODO: DOCUMENT ME!
*/
! public RemoteInterfaceBase(VelocityTemplateEngine templateEngine,
QDoxCapableMetadataProvider metadataProvider,
! WriterMapper writerMapper, EjbConfig config) {
! super(templateEngine, metadataProvider, writerMapper, config);
}
public boolean shouldGenerate(Object metadata) {
JavaClass javaClass = (JavaClass) metadata;
! boolean generate = ejbUtils.shouldGenerate(metadata);
! generate = generate &&
EjbUtils.hasFlag(ejbUtils.getViewType(javaClass), EjbUtils.REMOTE);
! generate = generate && !ejbUtils.isMessageDrivenBean(javaClass);
! return generate;
}
! }
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.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** RemoteInterfacePlugin.java 11 Oct 2005 09:22:26 -0000 1.16
--- RemoteInterfacePlugin.java 13 Dec 2005 03:37:45 -0000 1.17
***************
*** 8,13 ****
import java.rmi.RemoteException;
- import java.text.MessageFormat;
-
import java.util.ArrayList;
import java.util.Arrays;
--- 8,11 ----
***************
*** 18,23 ****
import org.generama.WriterMapper;
- import org.xdoclet.plugin.ejb.EjbConfig;
import org.xdoclet.plugin.ejb.EjbBusinessUtils;
import org.xdoclet.plugin.ejb.EjbRuntime;
import org.xdoclet.plugin.ejb.EjbUtils;
--- 16,21 ----
import org.generama.WriterMapper;
import org.xdoclet.plugin.ejb.EjbBusinessUtils;
+ import org.xdoclet.plugin.ejb.EjbConfig;
import org.xdoclet.plugin.ejb.EjbRuntime;
import org.xdoclet.plugin.ejb.EjbUtils;
***************
*** 36,42 ****
// 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)
! throws ClassNotFoundException {
super(templateEngine, metadataProvider, writerMapper, config);
EjbRuntime.setPlugin(this);
--- 34,39 ----
// 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);
EjbRuntime.setPlugin(this);
***************
*** 53,57 ****
EjbInterfaceTag interfaceTag = (EjbInterfaceTag)
javaClass.getTagByName("ejb.interface");
! if (interfaceTag != null && interfaceTag.getExtends() != null) {
extendsLst.addAll(Arrays.asList(interfaceTag.getExtends()));
}
--- 50,54 ----
EjbInterfaceTag interfaceTag = (EjbInterfaceTag)
javaClass.getTagByName("ejb.interface");
! if ((interfaceTag != null) && (interfaceTag.getExtends() != null)) {
extendsLst.addAll(Arrays.asList(interfaceTag.getExtends()));
}
***************
*** 68,72 ****
EjbInterfaceTag interfaceTag = (EjbInterfaceTag)
javaClass.getTagByName("ejb.interface");
boolean generate = super.shouldGenerate(metadata);
! generate &= (interfaceTag == null) ||
Arrays.asList(interfaceTag.getGenerate()).contains("remote");
return generate;
}
--- 65,69 ----
EjbInterfaceTag interfaceTag = (EjbInterfaceTag)
javaClass.getTagByName("ejb.interface");
boolean generate = super.shouldGenerate(metadata);
! generate = generate && ((interfaceTag == null) ||
Arrays.asList(interfaceTag.getGenerate()).contains("remote"));
return generate;
}
***************
*** 99,109 ****
pattern = interfaceTag.getRemotePattern();
! if (pattern == null && interfaceTag.getPattern() != null) {
pattern = interfaceTag.getPattern() + "Remote";
}
}
! return pattern != null ? MessageFormat.format(pattern, new String[]
{ejbUtils.getEjbName(clazz)})
! : super.getPatternBasedUnqualifiedName(clazz);
}
--- 96,105 ----
pattern = interfaceTag.getRemotePattern();
! if ((pattern == null) && (interfaceTag.getPattern() != null)) {
pattern = interfaceTag.getPattern() + "Remote";
}
}
! return pattern != null ? ejbUtils.expandPattern(pattern, clazz) :
super.getPatternBasedUnqualifiedName(clazz);
}
***************
*** 126,128 ****
RemoteException.class);
}
! }
\ No newline at end of file
--- 122,124 ----
RemoteException.class);
}
! }
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.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** RemoteHomeInterfacePlugin.java 11 Oct 2005 09:22:26 -0000 1.6
--- RemoteHomeInterfacePlugin.java 13 Dec 2005 03:37:45 -0000 1.7
***************
*** 8,13 ****
import java.rmi.RemoteException;
- import java.text.MessageFormat;
-
import java.util.ArrayList;
import java.util.Arrays;
--- 8,11 ----
***************
*** 48,53 ****
*/
public RemoteHomeInterfacePlugin(VelocityTemplateEngine templateEngine,
! QDoxCapableMetadataProvider metadataProvider, WriterMapper
writerMapper, EjbConfig config)
! throws ClassNotFoundException {
super(templateEngine, metadataProvider, writerMapper, config);
EjbRuntime.setPlugin(this);
--- 46,50 ----
*/
public RemoteHomeInterfacePlugin(VelocityTemplateEngine templateEngine,
! QDoxCapableMetadataProvider metadataProvider, WriterMapper
writerMapper, EjbConfig config) {
super(templateEngine, metadataProvider, writerMapper, config);
EjbRuntime.setPlugin(this);
***************
*** 64,68 ****
EjbHomeTag homeTag = (EjbHomeTag) javaClass.getTagByName("ejb.home");
! if (homeTag != null && homeTag.getExtends() != null) {
extendsLst.addAll(Arrays.asList(homeTag.getExtends()));
}
--- 61,65 ----
EjbHomeTag homeTag = (EjbHomeTag) javaClass.getTagByName("ejb.home");
! if ((homeTag != null) && (homeTag.getExtends() != null)) {
extendsLst.addAll(Arrays.asList(homeTag.getExtends()));
}
***************
*** 87,91 ****
EjbHomeTag homeTag = (EjbHomeTag) javaClass.getTagByName("ejb.home");
boolean generate = super.shouldGenerate(metadata);
! generate &= (homeTag == null) ||
Arrays.asList(homeTag.getGenerate()).contains("remote");
return generate;
}
--- 84,88 ----
EjbHomeTag homeTag = (EjbHomeTag) javaClass.getTagByName("ejb.home");
boolean generate = super.shouldGenerate(metadata);
! generate = generate && (homeTag == null) ||
Arrays.asList(homeTag.getGenerate()).contains("remote");
return generate;
}
***************
*** 118,128 ****
pattern = homeTag.getRemotePattern();
! if (pattern == null && homeTag.getPattern() != null) {
pattern = homeTag.getPattern() + "RemoteHome";
}
}
! return pattern != null ? MessageFormat.format(pattern, new String[]
{ejbUtils.getEjbName(clazz)})
! : super.getPatternBasedUnqualifiedName(clazz);
}
--- 115,124 ----
pattern = homeTag.getRemotePattern();
! if ((pattern == null) && (homeTag.getPattern() != null)) {
pattern = homeTag.getPattern() + "RemoteHome";
}
}
! return pattern != null ? ejbUtils.expandPattern(pattern, clazz) :
super.getPatternBasedUnqualifiedName(clazz);
}
***************
*** 150,154 ****
}
! public Collection getCreateMethods(final JavaClass javaClass) throws
ClassNotFoundException {
Collection createMethods = ejbHomeUtils.getCreateMethods(javaClass,
EjbUtils.REMOTE_HOME,
EjbRuntime.getRemoteInterfacePlugin().getVirtualType(javaClass).getType());
--- 146,150 ----
}
! public Collection getCreateMethods(final JavaClass javaClass) {
Collection createMethods = ejbHomeUtils.getCreateMethods(javaClass,
EjbUtils.REMOTE_HOME,
EjbRuntime.getRemoteInterfacePlugin().getVirtualType(javaClass).getType());
***************
*** 156,160 ****
}
! public Collection getFinderMethods(final JavaClass javaClass) throws
ClassNotFoundException {
if (!ejbUtils.isEntityBean(javaClass)) {
throw new Error("This must only be called for Entity Beans");
--- 152,156 ----
}
! public Collection getFinderMethods(final JavaClass javaClass) {
if (!ejbUtils.isEntityBean(javaClass)) {
throw new Error("This must only be called for Entity Beans");
***************
*** 170,172 ****
RemoteException.class);
}
! }
\ No newline at end of file
--- 166,168 ----
RemoteException.class);
}
! }
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.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** LocalHomeInterfacePlugin.java 11 Oct 2005 09:22:26 -0000 1.6
--- LocalHomeInterfacePlugin.java 13 Dec 2005 03:37:45 -0000 1.7
***************
*** 6,11 ****
package org.xdoclet.plugin.ejb.interfaces;
- import java.text.MessageFormat;
-
import java.util.ArrayList;
import java.util.Arrays;
--- 6,9 ----
***************
*** 47,52 ****
*/
public LocalHomeInterfacePlugin(VelocityTemplateEngine templateEngine,
! QDoxCapableMetadataProvider metadataProvider, WriterMapper
writerMapper, EjbConfig config)
! throws ClassNotFoundException {
super(templateEngine, metadataProvider, writerMapper, config);
EjbRuntime.setPlugin(this);
--- 45,49 ----
*/
public LocalHomeInterfacePlugin(VelocityTemplateEngine templateEngine,
! QDoxCapableMetadataProvider metadataProvider, WriterMapper
writerMapper, EjbConfig config) {
super(templateEngine, metadataProvider, writerMapper, config);
EjbRuntime.setPlugin(this);
***************
*** 63,67 ****
EjbHomeTag homeTag = (EjbHomeTag) javaClass.getTagByName("ejb.home");
! if (homeTag != null && homeTag.getLocalExtends() != null) {
extendsLst.addAll(Arrays.asList(homeTag.getLocalExtends()));
}
--- 60,64 ----
EjbHomeTag homeTag = (EjbHomeTag) javaClass.getTagByName("ejb.home");
! if ((homeTag != null) && (homeTag.getLocalExtends() != null)) {
extendsLst.addAll(Arrays.asList(homeTag.getLocalExtends()));
}
***************
*** 86,90 ****
EjbHomeTag homeTag = (EjbHomeTag) javaClass.getTagByName("ejb.home");
boolean generate = super.shouldGenerate(metadata);
! generate &= (homeTag == null) ||
Arrays.asList(homeTag.getGenerate()).contains("local");
return generate;
}
--- 83,87 ----
EjbHomeTag homeTag = (EjbHomeTag) javaClass.getTagByName("ejb.home");
boolean generate = super.shouldGenerate(metadata);
! generate = generate && ((homeTag == null) ||
Arrays.asList(homeTag.getGenerate()).contains("local"));
return generate;
}
***************
*** 92,96 ****
protected String getLocalyDefinedFullClassName(JavaClass clazz) {
EjbHomeTag homeTag = (EjbHomeTag) clazz.getTagByName("ejb.home");
! return homeTag != null ? homeTag.getLocalClass() :
super.getLocalyDefinedFullClassName(clazz);
}
--- 89,93 ----
protected String getLocalyDefinedFullClassName(JavaClass clazz) {
EjbHomeTag homeTag = (EjbHomeTag) clazz.getTagByName("ejb.home");
! return (homeTag != null) ? homeTag.getLocalClass() :
super.getLocalyDefinedFullClassName(clazz);
}
***************
*** 117,127 ****
pattern = homeTag.getLocalPattern();
! if (pattern == null && homeTag.getPattern() != null) {
pattern = homeTag.getPattern() + "LocalHome";
}
}
! return pattern != null ? MessageFormat.format(pattern, new String[]
{ejbUtils.getEjbName(clazz)})
! : super.getPatternBasedUnqualifiedName(clazz);
}
--- 114,123 ----
pattern = homeTag.getLocalPattern();
! if ((pattern == null) && (homeTag.getPattern() != null)) {
pattern = homeTag.getPattern() + "LocalHome";
}
}
! return pattern != null ? ejbUtils.expandPattern(pattern, clazz) :
super.getPatternBasedUnqualifiedName(clazz);
}
***************
*** 149,158 ****
}
! public Collection getCreateMethods(final JavaClass javaClass) throws
ClassNotFoundException {
return ejbHomeUtils.getCreateMethods(javaClass, EjbUtils.LOCAL_HOME,
EjbRuntime.getLocalInterfacePlugin().getVirtualType(javaClass).getType());
}
! public Collection getFinderMethods(final JavaClass javaClass) throws
ClassNotFoundException {
if (!ejbUtils.isEntityBean(javaClass)) {
throw new Error("This must only be called for Entity Beans");
--- 145,154 ----
}
! public Collection getCreateMethods(final JavaClass javaClass) {
return ejbHomeUtils.getCreateMethods(javaClass, EjbUtils.LOCAL_HOME,
EjbRuntime.getLocalInterfacePlugin().getVirtualType(javaClass).getType());
}
! public Collection getFinderMethods(final JavaClass javaClass) {
if (!ejbUtils.isEntityBean(javaClass)) {
throw new Error("This must only be called for Entity Beans");
***************
*** 166,168 ****
return ejbHomeUtils.getHomeMethods(clazz, EjbUtils.LOCAL_HOME);
}
! }
\ No newline at end of file
--- 162,164 ----
return ejbHomeUtils.getHomeMethods(clazz, EjbUtils.LOCAL_HOME);
}
! }
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.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** LocalInterfaceBase.java 11 Oct 2005 09:22:26 -0000 1.5
--- LocalInterfaceBase.java 13 Dec 2005 03:37:45 -0000 1.6
***************
*** 6,20 ****
package org.xdoclet.plugin.ejb.interfaces;
- import java.util.Map;
-
import org.generama.QDoxCapableMetadataProvider;
import org.generama.VelocityTemplateEngine;
import org.generama.WriterMapper;
-
import org.xdoclet.plugin.ejb.EjbConfig;
import org.xdoclet.plugin.ejb.EjbJavaGeneratingPlugin;
import org.xdoclet.plugin.ejb.EjbUtils;
- import org.xdoclet.plugin.ejb.EjbVersion;
- import org.xdoclet.plugin.ejb.qtags.TagLibrary;
import com.thoughtworks.qdox.model.JavaClass;
--- 6,15 ----
***************
*** 28,35 ****
*/
public abstract class LocalInterfaceBase extends EjbJavaGeneratingPlugin {
- /** TODO: DOCUMENT ME! */
- protected EjbUtils ejbUtils;
- protected EjbConfig config;
-
/**
* DOCUMENT ME!
--- 23,26 ----
***************
*** 42,73 ****
*/
public LocalInterfaceBase(VelocityTemplateEngine templateEngine,
QDoxCapableMetadataProvider metadataProvider,
! WriterMapper writerMapper, EjbConfig config) throws
ClassNotFoundException {
! super(templateEngine, metadataProvider, writerMapper);
! this.config = config;
! this.ejbUtils = new EjbUtils();
! new TagLibrary(metadataProvider);
! }
!
! protected void populateContextMap(Map map) {
! super.populateContextMap(map);
! map.put("util", getEjbUtils());
! map.put("version", getVersion());
! }
!
! public EjbVersion getVersion() {
! return getConfig().getEjbVersion();
! }
!
! /**
! * TODO: DOCUMENT ME!
! *
! * @return TODO: DOCUMENT ME!
! */
! public EjbUtils getEjbUtils() {
! return ejbUtils;
! }
!
! public EjbConfig getConfig() {
! return this.config;
}
--- 33,38 ----
*/
public LocalInterfaceBase(VelocityTemplateEngine templateEngine,
QDoxCapableMetadataProvider metadataProvider,
! WriterMapper writerMapper, EjbConfig config) {
! super(templateEngine, metadataProvider, writerMapper, config);
}
***************
*** 81,86 ****
public boolean shouldGenerate(Object metadata) {
JavaClass javaClass = (JavaClass) metadata;
! return ejbUtils.shouldGenerate(metadata) &&
EjbUtils.hasFlag(ejbUtils.getViewType(javaClass), EjbUtils.LOCAL) &&
! !ejbUtils.isMessageDrivenBean(javaClass);
}
! }
\ No newline at end of file
--- 46,53 ----
public boolean shouldGenerate(Object metadata) {
JavaClass javaClass = (JavaClass) metadata;
! boolean generate = ejbUtils.shouldGenerate(metadata);
! generate = generate &&
EjbUtils.hasFlag(ejbUtils.getViewType(javaClass), EjbUtils.LOCAL);
! generate = generate && !ejbUtils.isMessageDrivenBean(javaClass);
! return generate;
}
! }
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.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** LocalInterfacePlugin.java 11 Oct 2005 09:22:26 -0000 1.17
--- LocalInterfacePlugin.java 13 Dec 2005 03:37:45 -0000 1.18
***************
*** 6,10 ****
package org.xdoclet.plugin.ejb.interfaces;
- import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
--- 6,9 ----
***************
*** 14,17 ****
--- 13,17 ----
import org.generama.VelocityTemplateEngine;
import org.generama.WriterMapper;
+
import org.xdoclet.plugin.ejb.EjbBusinessUtils;
import org.xdoclet.plugin.ejb.EjbConfig;
***************
*** 33,39 ****
// TODO: Support ejb:bean local-business-interface
! public LocalInterfacePlugin(VelocityTemplateEngine templateEngine,
! QDoxCapableMetadataProvider metadataProvider, WriterMapper
writerMapper, EjbConfig config)
! throws ClassNotFoundException {
super(templateEngine, metadataProvider, writerMapper, config);
EjbRuntime.setPlugin(this);
--- 33,38 ----
// TODO: Support ejb:bean local-business-interface
! public LocalInterfacePlugin(VelocityTemplateEngine templateEngine,
QDoxCapableMetadataProvider metadataProvider,
! WriterMapper writerMapper, EjbConfig config) {
super(templateEngine, metadataProvider, writerMapper, config);
EjbRuntime.setPlugin(this);
***************
*** 50,54 ****
EjbInterfaceTag interfaceTag = (EjbInterfaceTag)
javaClass.getTagByName("ejb.interface");
! if (interfaceTag != null && interfaceTag.getLocalExtends() != null) {
extendsLst.addAll(Arrays.asList(interfaceTag.getLocalExtends()));
}
--- 49,53 ----
EjbInterfaceTag interfaceTag = (EjbInterfaceTag)
javaClass.getTagByName("ejb.interface");
! if ((interfaceTag != null) && (interfaceTag.getLocalExtends() !=
null)) {
extendsLst.addAll(Arrays.asList(interfaceTag.getLocalExtends()));
}
***************
*** 65,69 ****
EjbInterfaceTag interfaceTag = (EjbInterfaceTag)
javaClass.getTagByName("ejb.interface");
boolean generate = super.shouldGenerate(metadata);
! generate &= (interfaceTag == null) ||
Arrays.asList(interfaceTag.getGenerate()).contains("local");
return generate;
}
--- 64,68 ----
EjbInterfaceTag interfaceTag = (EjbInterfaceTag)
javaClass.getTagByName("ejb.interface");
boolean generate = super.shouldGenerate(metadata);
! generate = generate && ((interfaceTag == null) ||
Arrays.asList(interfaceTag.getGenerate()).contains("local"));
return generate;
}
***************
*** 96,106 ****
pattern = interfaceTag.getLocalPattern();
! if (pattern == null && interfaceTag.getPattern() != null) {
pattern = interfaceTag.getPattern() + "Local";
}
}
! return pattern != null ? MessageFormat.format(pattern, new String[]
{ejbUtils.getEjbName(clazz)})
! : super.getPatternBasedUnqualifiedName(clazz);
}
--- 95,104 ----
pattern = interfaceTag.getLocalPattern();
! if ((pattern == null) && (interfaceTag.getPattern() != null)) {
pattern = interfaceTag.getPattern() + "Local";
}
}
! return pattern != null ? ejbUtils.expandPattern(pattern, clazz) :
super.getPatternBasedUnqualifiedName(clazz);
}
***************
*** 122,124 ****
return ejbBusinessUtils.getInterfaceMethods(clazz, EjbUtils.LOCAL);
}
! }
\ No newline at end of file
--- 120,122 ----
return ejbBusinessUtils.getInterfaceMethods(clazz, EjbUtils.LOCAL);
}
! }
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.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ServiceEndpointPlugin.java 11 Oct 2005 09:22:26 -0000 1.3
--- ServiceEndpointPlugin.java 13 Dec 2005 03:37:45 -0000 1.4
***************
*** 8,17 ****
import java.rmi.RemoteException;
- import java.text.MessageFormat;
-
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
- import java.util.Map;
import org.generama.QDoxCapableMetadataProvider;
--- 8,14 ----
***************
*** 24,30 ****
import org.xdoclet.plugin.ejb.EjbRuntime;
import org.xdoclet.plugin.ejb.EjbUtils;
- import org.xdoclet.plugin.ejb.EjbVersion;
import org.xdoclet.plugin.ejb.qtags.EjbInterfaceTag;
- import org.xdoclet.plugin.ejb.qtags.TagLibrary;
import com.thoughtworks.qdox.model.JavaClass;
--- 21,25 ----
***************
*** 36,48 ****
*/
public class ServiceEndpointPlugin extends EjbJavaGeneratingPlugin {
! private EjbConfig config;
! private EjbUtils ejbUtils;
! private EjbBusinessUtils ejbBusinessUtils;
// TODO: Support ejb:bean service-endpoint-business-interface
public ServiceEndpointPlugin(VelocityTemplateEngine
velocityTemplateEngine,
! QDoxCapableMetadataProvider metadataProvider, WriterMapper
writerMapper, EjbConfig config)
! throws ClassNotFoundException {
! super(velocityTemplateEngine, metadataProvider, writerMapper);
EjbRuntime.setPlugin(this);
setPackageregex("beans");
--- 31,40 ----
*/
public class ServiceEndpointPlugin extends EjbJavaGeneratingPlugin {
! protected EjbBusinessUtils ejbBusinessUtils;
// TODO: Support ejb:bean service-endpoint-business-interface
public ServiceEndpointPlugin(VelocityTemplateEngine
velocityTemplateEngine,
! QDoxCapableMetadataProvider metadataProvider, WriterMapper
writerMapper, EjbConfig config) {
! super(velocityTemplateEngine, metadataProvider, writerMapper, config);
EjbRuntime.setPlugin(this);
setPackageregex("beans");
***************
*** 51,58 ****
setFilereplace("EndPoint");
super.setMultioutput(true);
- this.config = config;
- this.ejbUtils = new EjbUtils();
this.ejbBusinessUtils = new EjbBusinessUtils(this.ejbUtils);
- new TagLibrary(metadataProvider);
}
--- 43,47 ----
***************
*** 61,65 ****
EjbInterfaceTag interfaceTag = (EjbInterfaceTag)
javaClass.getTagByName("ejb.interface");
! if (interfaceTag != null && interfaceTag.getServiceEndpointExtends()
!= null) {
extendsLst.addAll(Arrays.asList(interfaceTag.getServiceEndpointExtends()));
}
--- 50,54 ----
EjbInterfaceTag interfaceTag = (EjbInterfaceTag)
javaClass.getTagByName("ejb.interface");
! if ((interfaceTag != null) &&
(interfaceTag.getServiceEndpointExtends() != null)) {
extendsLst.addAll(Arrays.asList(interfaceTag.getServiceEndpointExtends()));
}
***************
*** 90,96 ****
EjbInterfaceTag interfaceTag = (EjbInterfaceTag)
javaClass.getTagByName("ejb.interface");
boolean generate = ejbUtils.shouldGenerate(metadata);
! generate &= EjbUtils.hasFlag(ejbUtils.getViewType(javaClass),
EjbUtils.SERVICE_END_POINT);
! generate &= ejbUtils.isStateLess(javaClass);
! generate &= (interfaceTag != null) &&
Arrays.asList(interfaceTag.getGenerate()).contains("service-endpoint");
return generate;
}
--- 79,86 ----
EjbInterfaceTag interfaceTag = (EjbInterfaceTag)
javaClass.getTagByName("ejb.interface");
boolean generate = ejbUtils.shouldGenerate(metadata);
! generate = generate &&
EjbUtils.hasFlag(ejbUtils.getViewType(javaClass), EjbUtils.SERVICE_END_POINT);
! generate = generate && ejbUtils.isStateLess(javaClass);
! generate = generate &&
! ((interfaceTag != null) &&
Arrays.asList(interfaceTag.getGenerate()).contains("service-endpoint"));
return generate;
}
***************
*** 123,133 ****
pattern = interfaceTag.getServiceEndpointPattern();
! if (pattern == null && interfaceTag.getPattern() != null) {
pattern = interfaceTag.getPattern() + "EndPoint";
}
}
! return pattern != null ? MessageFormat.format(pattern, new String[]
{ejbUtils.getEjbName(clazz)})
! : super.getPatternBasedUnqualifiedName(clazz);
}
--- 113,122 ----
pattern = interfaceTag.getServiceEndpointPattern();
! if ((pattern == null) && (interfaceTag.getPattern() != null)) {
pattern = interfaceTag.getPattern() + "EndPoint";
}
}
! return pattern != null ? ejbUtils.expandPattern(pattern, clazz) :
super.getPatternBasedUnqualifiedName(clazz);
}
***************
*** 136,156 ****
EjbUtils.SERVICE_END_POINT), RemoteException.class);
}
!
! protected void populateContextMap(Map map) {
! super.populateContextMap(map);
! map.put("util", getEjbUtils());
! map.put("version", getVersion());
! }
!
! public EjbVersion getVersion() {
! return getConfig().getEjbVersion();
! }
!
! public EjbUtils getEjbUtils() {
! return ejbUtils;
! }
!
! public EjbConfig getConfig() {
! return this.config;
! }
! }
\ No newline at end of file
--- 125,127 ----
EjbUtils.SERVICE_END_POINT), RemoteException.class);
}
! }
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
xdoclet-plugins-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-commits