Update of
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-qtags/src/test/java/org/xdoclet/plugin/qtags/impl/test
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30066/plugin-qtags/src/test/java/org/xdoclet/plugin/qtags/impl/test
Modified Files:
FooBarTagImpl.java
Added Files:
BeanUsingOnceQTags.java FooBarOnceTag.java
FooBarOnceTagImpl.java FooBarOnceTagNewImpl.java
Log Message:
fix for XDP-77
--- NEW FILE: FooBarOnceTag.java ---
/*
* Copyright (c) 2005
* XDoclet Team
* All rights reserved.
*/
package org.xdoclet.plugin.qtags.impl.test;
/**
* @qtags.location class
* @qtags.location method
* @qtags.location field
* @qtags.once
*/
public interface FooBarOnceTag extends com.thoughtworks.qdox.model.DocletTag {
}
Index: FooBarTagImpl.java
===================================================================
RCS file:
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-qtags/src/test/java/org/xdoclet/plugin/qtags/impl/test/FooBarTagImpl.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** FooBarTagImpl.java 21 Aug 2005 13:44:29 -0000 1.18
--- FooBarTagImpl.java 3 May 2006 19:18:38 -0000 1.19
***************
*** 266,268 ****
--- 266,272 ----
getGrapeFruitList();
}
+
+ public void validateModel() {
+ // check uniqueness
+ }
}
\ No newline at end of file
--- NEW FILE: FooBarOnceTagImpl.java ---
package org.xdoclet.plugin.qtags.impl.test;
public class FooBarOnceTagImpl extends org.xdoclet.XDocletTag implements
org.xdoclet.plugin.qtags.impl.test.FooBarOnceTag {
public static final String NAME = "foo.bar-once";
private static final java.util.List ALLOWED_PARAMETERS =
java.util.Arrays.asList( new String[] {
""
});
private static final java.util.List ALLOWED_VALUES =
java.util.Arrays.asList( new String[] {
""
});
public FooBarOnceTagImpl(String name, String value,
com.thoughtworks.qdox.model.AbstractJavaEntity entity, int lineNumber) {
super(name, value, entity, lineNumber);
}
protected void validateLocation() {
if(isOnConstructor) {
bomb("is not allowed on constructors");
}
// check uniqueness
if(getContext().getTagsByName(NAME).length > 1) {
bomb("is allowed only once");
}
// warn deprecation
// check for allowed values for whole tag
if( ALLOWED_VALUES.size() > 1 && !ALLOWED_VALUES.contains(getValue())) {
bomb( "\"" + getValue() +"\" is not a valid value. Allowed values
are ");
}
// Get all the parameters to validate their contents
}
public void validateModel() {
// check uniqueness
}
}
--- NEW FILE: BeanUsingOnceQTags.java ---
/*
* Copyright (c) 2005
* XDoclet Team
* All rights reserved.
*/
package org.xdoclet.plugin.qtags.impl.test;
/**
* @foo.bar-once test1
* @foo.bar-once test2
*/
public class BeanUsingOnceQTags {
/**
* @foo.bar-once test3
* @foo.bar-once test4
*/
public String field;
/**
* @foo.bar-once test5
* @foo.bar-once test6
*/
public String getField() {
return field;
}
}
--- NEW FILE: FooBarOnceTagNewImpl.java ---
package org.xdoclet.plugin.qtags.impl.test;
public class FooBarOnceTagNewImpl extends org.xdoclet.XDocletTag implements
org.xdoclet.plugin.qtags.impl.test.FooBarOnceTag {
public static final String NAME = "foo.bar-once";
private static final java.util.List ALLOWED_PARAMETERS =
java.util.Arrays.asList( new String[] {
""
});
private static final java.util.List ALLOWED_VALUES =
java.util.Arrays.asList( new String[] {
""
});
public FooBarOnceTagNewImpl(String name, String value,
com.thoughtworks.qdox.model.AbstractJavaEntity entity, int lineNumber) {
super(name, value, entity, lineNumber);
}
protected void validateLocation() {
if(isOnConstructor) {
bomb("is not allowed on constructors");
}
// check uniqueness
if(getContext().getTagsByName(NAME).length > 1) {
bomb("is allowed only once");
}
// warn deprecation
// check for allowed values for whole tag
if( ALLOWED_VALUES.size() > 1 && !ALLOWED_VALUES.contains(getValue())) {
bomb( "\"" + getValue() +"\" is not a valid value. Allowed values
are ");
}
// Get all the parameters to validate their contents
}
public void validateModel() {
// check uniqueness
if(getContext().getTagsByName(NAME).length > 1) {
bomb("is allowed only once");
}
}
}
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
xdoclet-plugins-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-commits