User: ara_e_w
Date: 02/05/26 13:29:53
Modified: modules/ejb/src/xdoclet/modules/ejb/dd Tag:
MODULE_REFACTORING_BRANCH
AbstractEjbDeploymentDescriptorSubTask.java
EjbRefTagsHandler.java RelationTagsHandler.java
SecurityTagsHandler.java
Log:
xjavadoc javabeaninifiction refactoring
Revision Changes Path
No revision
No revision
1.1.2.4 +2 -2
xdoclet/modules/ejb/src/xdoclet/modules/ejb/dd/Attic/AbstractEjbDeploymentDescriptorSubTask.java
Index: AbstractEjbDeploymentDescriptorSubTask.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/dd/Attic/AbstractEjbDeploymentDescriptorSubTask.java,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -w -r1.1.2.3 -r1.1.2.4
--- AbstractEjbDeploymentDescriptorSubTask.java 12 May 2002 13:53:27 -0000
1.1.2.3
+++ AbstractEjbDeploymentDescriptorSubTask.java 26 May 2002 20:29:53 -0000
1.1.2.4
@@ -17,7 +17,7 @@
*
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @created Dec 11, 2001
- * @version $Revision: 1.1.2.3 $
+ * @version $Revision: 1.1.2.4 $
*/
public abstract class AbstractEjbDeploymentDescriptorSubTask extends XmlSubTask
{
@@ -30,7 +30,7 @@
protected boolean atLeastOneCmpEntityBeanExists() throws XDocletException
{
try {
- XClass[] classes = XJavaDoc.getInstance().sourceClasses();
+ XClass[] classes = XJavaDoc.getInstance().getSourceClasses();
for (int i = 0; i < classes.length; i++) {
XClass clazz = classes[i];
1.1.2.8 +4 -4
xdoclet/modules/ejb/src/xdoclet/modules/ejb/dd/Attic/EjbRefTagsHandler.java
Index: EjbRefTagsHandler.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/dd/Attic/EjbRefTagsHandler.java,v
retrieving revision 1.1.2.7
retrieving revision 1.1.2.8
diff -u -w -r1.1.2.7 -r1.1.2.8
--- EjbRefTagsHandler.java 14 May 2002 21:05:33 -0000 1.1.2.7
+++ EjbRefTagsHandler.java 26 May 2002 20:29:53 -0000 1.1.2.8
@@ -74,14 +74,14 @@
HashSet already = new HashSet();
do {
- XTag[] tags = currentClass.doc().tags("ejb:ejb-ref");
+ XTag[] tags = currentClass.getDoc().getTags("ejb:ejb-ref");
for (int i = 0; i < tags.length; i++) {
setCurrentClassTag(tags[i]);
storeReferringClassId();
- String ejbName = getCurrentClassTag().attributeValue("ejb-name");
+ String ejbName = getCurrentClassTag().getAttributeValue("ejb-name");
if (!already.contains(ejbName)) {
already.add(ejbName);
@@ -94,7 +94,7 @@
referringClassId = null;
}
if (superclasses == true) {
- currentClass = currentClass.superclass();
+ currentClass = currentClass.getSuperclass();
}
else {
break;
@@ -125,7 +125,7 @@
protected XClass findEjb(String ejbName) throws XDocletException
{
try {
- XClass[] classes = XJavaDoc.getInstance().sourceClasses();
+ XClass[] classes = XJavaDoc.getInstance().getSourceClasses();
for (int i = 0; i < classes.length; i++) {
if (isEjb(classes[i]) && ejbName.equals(getEjbNameFor(classes[i])))
{
1.1.2.6 +55 -67
xdoclet/modules/ejb/src/xdoclet/modules/ejb/dd/Attic/RelationTagsHandler.java
Index: RelationTagsHandler.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/dd/Attic/RelationTagsHandler.java,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -w -r1.1.2.5 -r1.1.2.6
--- RelationTagsHandler.java 13 May 2002 11:19:23 -0000 1.1.2.5
+++ RelationTagsHandler.java 26 May 2002 20:29:53 -0000 1.1.2.6
@@ -25,12 +25,11 @@
import xdoclet.util.TypeConversionUtil;
/**
- * @author <a href="mailto:[EMAIL PROTECTED]">Aslak
- * Helles�y</a>
+ * @author <a href="mailto:[EMAIL PROTECTED]">Aslak
Helles�y</a>
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @created Oct 15, 2001
* @xdoclet:taghandler namespace="EjbRel"
- * @version $Revision: 1.1.2.5 $
+ * @version $Revision: 1.1.2.6 $
*/
public class RelationTagsHandler extends EjbTagsHandler
{
@@ -40,9 +39,8 @@
protected static Map relationMap = new HashMap();
/**
- * The current relation, set by forAllRelationships and used by
- * forAllRelationshipRoles. It somehow is like the current index for the
- * forAllRelationships loop.
+ * The current relation, set by forAllRelationships and used by
forAllRelationshipRoles. It somehow is like the
+ * current index for the forAllRelationships loop.
*
* @see #forAllRelationships(java.lang.String)
* @see #forAllRelationshipRoles(java.lang.String)
@@ -50,8 +48,7 @@
protected static RelationHolder currentRelation;
/**
- * Evaluates the body if the left side of this relation has
- * cascade-delete=yes
+ * Evaluates the body if the left side of this relation has cascade-delete=yes
*
* @param template The body of the block tag
* @exception XDocletException
@@ -64,9 +61,8 @@
}
/**
- * Evaluates the body if the right side of this relation has
- * cascade-delete=yes, or the left side has target-relation
- * cascade-delete="yes"
+ * Evaluates the body if the right side of this relation has
cascade-delete=yes, or the left side has
+ * target-relation cascade-delete="yes"
*
* @param template The body of the block tag
* @exception XDocletException
@@ -92,7 +88,7 @@
else {
String name = getTagValue(
FOR_METHOD,
- currentRelation.getRightMethod().doc(),
+ currentRelation.getRightMethod().getDoc(),
"ejb:relation",
"target-ejb",
null,
@@ -119,7 +115,7 @@
else {
String name = getTagValue(
FOR_METHOD,
- currentRelation.getLeftMethod().doc(),
+ currentRelation.getLeftMethod().getDoc(),
"ejb:relation",
"target-ejb",
null,
@@ -133,8 +129,7 @@
}
/**
- * Evaluates the body if at least one of the classes has an ejb:relation
- * tag, otherwise not.
+ * Evaluates the body if at least one of the classes has an ejb:relation tag,
otherwise not.
*
* @param template The body of the block tag
* @exception XDocletException
@@ -142,18 +137,18 @@
public void ifHasRelationships(String template) throws XDocletException
{
try {
- XClass[] classes = XJavaDoc.getInstance().sourceClasses();
+ XClass[] classes = XJavaDoc.getInstance().getSourceClasses();
boolean hasRelationships = false;
for (int i = 0; i < classes.length; i++) {
setCurrentClass(classes[i]);
- XMethod[] methods = classes[i].methods();
+ XMethod[] methods = classes[i].getMethods();
for (int j = 0; j < methods.length; j++) {
setCurrentMethod(methods[j]);
- XTag relation = methods[j].doc().tag("ejb:relation");
+ XTag relation = methods[j].getDoc().getTag("ejb:relation");
if (relation != null) {
hasRelationships = true;
@@ -183,8 +178,8 @@
}
/**
- * Evaluates the body block for each relationship. Relations are denoted by
- * ejb:relation for the getter method of the cmr-field.
+ * Evaluates the body block for each relationship. Relations are denoted by
ejb:relation for the getter method of
+ * the cmr-field.
*
* @param template The body of the block tag
* @exception XDocletException
@@ -201,7 +196,7 @@
XClass[] classes = null;
try {
- classes = XJavaDoc.getInstance().sourceClasses();
+ classes = XJavaDoc.getInstance().getSourceClasses();
}
catch (XJavaDocException e) {
throw new XDocletException(e, e.getMessage());
@@ -212,27 +207,27 @@
for (int i = 0; i < classes.length; i++) {
setCurrentClass(classes[i]);
- XMethod[] methods = classes[i].methods();
+ XMethod[] methods = classes[i].getMethods();
for (int j = 0; j < methods.length; j++) {
setCurrentMethod(methods[j]);
- XTag relationTag = methods[j].doc().tag("ejb:relation");
+ XTag relationTag = methods[j].getDoc().getTag("ejb:relation");
if (relationTag != null) {
- String relationName = relationTag.attributeValue("name");
+ String relationName = relationTag.getAttributeValue("name");
if (relationName == null) {
throw new
XDocletException(Translator.getString("xdoclet.modules.ejb.Messages",
- "relation_must_have_name", new
String[]{getCurrentClass().name()}));
+ "relation_must_have_name", new
String[]{getCurrentClass().getName()}));
}
RelationHolder relationHolder = (RelationHolder)
relationMap.get(relationName);
if (relationHolder != null && relationHolder.getLeft() != null
&& relationHolder.getRight() != null) {
- String leftSignature =
relationHolder.getLeftMethod().containingClass().qualifiedName() + "." +
relationHolder.getLeftMethod();
- String rightSignature =
relationHolder.getRightMethod().containingClass().qualifiedName() + "." +
relationHolder.getRightMethod();
- String currentSignature =
methods[j].containingClass().qualifiedName() + "." + methods[j];
+ String leftSignature =
relationHolder.getLeftMethod().getContainingClass().getQualifiedName() + "." +
relationHolder.getLeftMethod();
+ String rightSignature =
relationHolder.getRightMethod().getContainingClass().getQualifiedName() + "." +
relationHolder.getRightMethod();
+ String currentSignature =
methods[j].getContainingClass().getQualifiedName() + "." + methods[j];
throw new
XDocletException(Translator.getString("xdoclet.modules.ejb.Messages",
"relation_too_many_names", new String[]{
@@ -411,8 +406,8 @@
}
/**
- * Evaluates the body block if current method's return type is not a
- * java.util.Collection or java.util.Set. Used by forAllRelationships.
+ * Evaluates the body block if current method's return type is not a
java.util.Collection or java.util.Set. Used by
+ * forAllRelationships.
*
* @param template The body of the block tag
* @exception XDocletException
@@ -437,9 +432,8 @@
}
/**
- * Evaluates the body block if the current relationship is a one to one
- * type, meaning, neither side of the relation returns java.util.Collection
- * or java.util.Set. Used by forAllRelationships.
+ * Evaluates the body block if the current relationship is a one to one type,
meaning, neither side of the relation
+ * returns java.util.Collection or java.util.Set. Used by forAllRelationships.
*
* @param template The body of the block tag
* @exception XDocletException
@@ -454,9 +448,8 @@
}
/**
- * Evaluates the body block if the current relationship IS NOT a one to one
- * type, meaning, at least one side of the relation returns
- * java.util.Collection or java.util.Set. Used by forAllRelationships.
+ * Evaluates the body block if the current relationship IS NOT a one to one
type, meaning, at least one side of the
+ * relation returns java.util.Collection or java.util.Set. Used by
forAllRelationships.
*
* @param template The body of the block tag
* @exception XDocletException
@@ -471,9 +464,8 @@
}
/**
- * Evaluates the body block if the current relationship is a one to many
- * type, meaning, ONLY ONE side of the relation returns java.util.Collection
- * or java.util.Set. Used by forAllRelationships.
+ * Evaluates the body block if the current relationship is a one to many type,
meaning, ONLY ONE side of the
+ * relation returns java.util.Collection or java.util.Set. Used by
forAllRelationships.
*
* @param template The body of the block tag
* @exception XDocletException
@@ -488,9 +480,8 @@
}
/**
- * Evaluates the body block if the current relationship IS NOT a one to many
- * type, meaning, either both sides, or neither side of the relation returns
- * java.util.Collection or java.util.Set. Used by forAllRelationships.
+ * Evaluates the body block if the current relationship IS NOT a one to many
type, meaning, either both sides, or
+ * neither side of the relation returns java.util.Collection or java.util.Set.
Used by forAllRelationships.
*
* @param template The body of the block tag
* @exception XDocletException
@@ -505,9 +496,8 @@
}
/**
- * Evaluates the body block if the current relationship is a many to many
- * type, meaning, both sides of the relation returns java.util.Collection or
- * java.util.Set. Used by forAllRelationships.
+ * Evaluates the body block if the current relationship is a many to many type,
meaning, both sides of the relation
+ * returns java.util.Collection or java.util.Set. Used by forAllRelationships.
*
* @param template The body of the block tag
* @exception XDocletException
@@ -522,9 +512,8 @@
}
/**
- * Evaluates the body block if the current relationship IS NOT a many to
- * many type, meaning, at least one side of the relation does not return
- * java.util.Collection or java.util.Set. Used by forAllRelationships.
+ * Evaluates the body block if the current relationship IS NOT a many to many
type, meaning, at least one side of
+ * the relation does not return java.util.Collection or java.util.Set. Used by
forAllRelationships.
*
* @param template The body of the block tag
* @exception XDocletException
@@ -661,8 +650,7 @@
}
/**
- * Returns true if current method's return type is a java.util.Collection or
- * java.util.Set, false otherwise.
+ * Returns true if current method's return type is a java.util.Collection or
java.util.Set, false otherwise.
*
* @param type Description of Parameter
* @return true if Collection or Set
@@ -828,10 +816,10 @@
String result = null;
if (getLeftMethod() != null) {
- result = getLeftMethod().doc().tagAttributeValue("ejb:relation",
"role-name", false);
+ result =
getLeftMethod().getDoc().getTagAttributeValue("ejb:relation", "role-name", false);
}
else {
- result = getRightMethod().doc().tagAttributeValue("ejb:relation",
"target-role-name", false);
+ result =
getRightMethod().getDoc().getTagAttributeValue("ejb:relation", "target-role-name",
false);
}
return result;
}
@@ -847,10 +835,10 @@
String result = null;
if (getRightMethod() != null) {
- result = getRightMethod().doc().tagAttributeValue("ejb:relation",
"role-name", false);
+ result =
getRightMethod().getDoc().getTagAttributeValue("ejb:relation", "role-name", false);
}
else {
- result = getLeftMethod().doc().tagAttributeValue("ejb:relation",
"target-role-name", false);
+ result =
getLeftMethod().getDoc().getTagAttributeValue("ejb:relation", "target-role-name",
false);
}
return result;
}
@@ -866,10 +854,10 @@
boolean result;
if (getLeftMethod() != null) {
- result =
isSetOrCollection(getLeftMethod().returnType().qualifiedName());
+ result =
isSetOrCollection(getLeftMethod().getReturnType().getQualifiedName());
}
else {
- String targetMultiple =
getRightMethod().doc().tagAttributeValue("ejb:relation", "target-multiple", false);
+ String targetMultiple =
getRightMethod().getDoc().getTagAttributeValue("ejb:relation", "target-multiple",
false);
result = TypeConversionUtil.stringToBoolean(targetMultiple, false);
}
@@ -887,10 +875,10 @@
boolean result;
if (getRightMethod() != null) {
- result =
isSetOrCollection(getRightMethod().returnType().qualifiedName());
+ result =
isSetOrCollection(getRightMethod().getReturnType().getQualifiedName());
}
else {
- String targetMultiple =
getLeftMethod().doc().tagAttributeValue("ejb:relation", "target-multiple", false);
+ String targetMultiple =
getLeftMethod().getDoc().getTagAttributeValue("ejb:relation", "target-multiple",
false);
result = TypeConversionUtil.stringToBoolean(targetMultiple, false);
}
@@ -944,10 +932,10 @@
String result = null;
if (getRightMethod() != null) {
- result = getRightMethod().doc().tagAttributeValue("ejb:relation",
"name", false);
+ result =
getRightMethod().getDoc().getTagAttributeValue("ejb:relation", "name", false);
}
else {
- result = getLeftMethod().doc().tagAttributeValue("ejb:relation",
"name", false);
+ result =
getLeftMethod().getDoc().getTagAttributeValue("ejb:relation", "name", false);
}
return result;
}
@@ -1040,7 +1028,7 @@
cd = getTagValue(
FOR_METHOD,
- method.doc(),
+ method.getDoc(),
"ejb:relation",
tag,
"yes,no,true,false",
1.1.2.5 +20 -25
xdoclet/modules/ejb/src/xdoclet/modules/ejb/dd/Attic/SecurityTagsHandler.java
Index: SecurityTagsHandler.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/modules/ejb/src/xdoclet/modules/ejb/dd/Attic/SecurityTagsHandler.java,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -w -r1.1.2.4 -r1.1.2.5
--- SecurityTagsHandler.java 12 May 2002 14:53:51 -0000 1.1.2.4
+++ SecurityTagsHandler.java 26 May 2002 20:29:53 -0000 1.1.2.5
@@ -26,14 +26,13 @@
* @author Ara Abrahamian ([EMAIL PROTECTED])
* @created Oct 15, 2001
* @xdoclet:taghandler namespace="EjbSec"
- * @version $Revision: 1.1.2.4 $
+ * @version $Revision: 1.1.2.5 $
*/
public class SecurityTagsHandler extends EjbTagsHandler
{
/**
- * The current security role name, set by forAllSecurityRoles and returned
- * by securityRoleName. It somehow is like the current index for the
- * forAllSecurityRoles loop.
+ * The current security role name, set by forAllSecurityRoles and returned by
securityRoleName. It somehow is like
+ * the current index for the forAllSecurityRoles loop.
*
* @see #forAllSecurityRoles(java.lang.String)
* @see #securityRoleName()
@@ -41,8 +40,7 @@
protected transient String currentSecurityRoleName;
/**
- * Returns current security role name set by the containing
- * forAllSecurityRoles.
+ * Returns current security role name set by the containing forAllSecurityRoles.
*
* @return Current security role name
* @exception XDocletException
@@ -55,8 +53,7 @@
}
/**
- * Evaluates the body block for each ejb:permission defined in class level
- * or method level.
+ * Evaluates the body block for each ejb:permission defined in class level or
method level.
*
* @param template The body of the block tag
* @exception XDocletException
@@ -69,7 +66,7 @@
XClass[] classes = null;
try {
- classes = XJavaDoc.getInstance().sourceClasses();
+ classes = XJavaDoc.getInstance().getSourceClasses();
}
catch (XJavaDocException e) {
throw new XDocletException(e, e.getMessage());
@@ -81,11 +78,11 @@
setCurrentClass(classes[i]);
// Get roles from class
- if (hasPermission(getCurrentClass().doc())) {
- XTag[] permissions = getCurrentClass().doc().tags("ejb:permission");
+ if (hasPermission(getCurrentClass().getDoc())) {
+ XTag[] permissions =
getCurrentClass().getDoc().getTags("ejb:permission");
for (int k = 0; k < permissions.length; k++) {
- String roleName = permissions[k].attributeValue("role-name");
+ String roleName = permissions[k].getAttributeValue("role-name");
if (roleName != null) {
roleSet.addAll(Arrays.asList(DocletUtil.tokenizeDelimitedToArray(roleName, ",")));
@@ -95,16 +92,16 @@
}
// Get roles from methods
- XMethod[] methods = getCurrentClass().methods();
+ XMethod[] methods = getCurrentClass().getMethods();
for (int j = 0; j < methods.length; j++) {
setCurrentMethod(methods[j]);
- if (hasPermission(getCurrentMethod().doc()) &&
InterfaceTagsHandler.isInterfaceMethod(getCurrentMethod())) {
- XTag[] permissions =
getCurrentMethod().doc().tags("ejb:permission");
+ if (hasPermission(getCurrentMethod().getDoc()) &&
InterfaceTagsHandler.isInterfaceMethod(getCurrentMethod())) {
+ XTag[] permissions =
getCurrentMethod().getDoc().getTags("ejb:permission");
for (int k = 0; k < permissions.length; k++) {
- String role_name =
permissions[k].attributeValue("role-name");
+ String role_name =
permissions[k].getAttributeValue("role-name");
if (role_name != null) {
roleSet.addAll(Arrays.asList(DocletUtil.tokenizeDelimitedToArray(role_name, ",")));
@@ -115,10 +112,10 @@
}
// get roles from finders
- XTag[] finders = getCurrentClass().doc().tags("ejb:finder");
+ XTag[] finders = getCurrentClass().getDoc().getTags("ejb:finder");
for (int j = 0; j < finders.length; j++) {
- String roleName = finders[j].attributeValue("role-name");
+ String roleName = finders[j].getAttributeValue("role-name");
if (roleName != null) {
roleSet.addAll(Arrays.asList(DocletUtil.tokenizeDelimitedToArray(roleName, ",")));
@@ -126,10 +123,10 @@
}
// and from pk field ( if any )
- XTag pk[] = getCurrentClass().doc().tags("ejb:pk");
+ XTag pk[] = getCurrentClass().getDoc().getTags("ejb:pk");
for (int j = 0; j < pk.length; j++) {
- String roleName = pk[j].attributeValue("role-name");
+ String roleName = pk[j].getAttributeValue("role-name");
if (roleName != null) {
roleSet.addAll(Arrays.asList(DocletUtil.tokenizeDelimitedToArray(roleName, ",")));
@@ -148,14 +145,12 @@
}
/**
- * Returns true if class/method denoted by doc has ejb:permission tag, false
- * otherwise.
+ * Returns true if class/method denoted by doc has ejb:permission tag, false
otherwise.
*
* @param doc Description of Parameter
* @return Description of the Returned Value
* @exception XDocletException
- * @todo Shouldn't this method rather be in
- * SecurityTagsHandler?
+ * @todo Shouldn't this method rather be in
SecurityTagsHandler?
*/
private boolean hasPermission(XDoc doc) throws XDocletException
{
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel