Weld SVN: r6586 - in archetypes/trunk/javaee6-webapp-src: src/test/resources and 1 other directory.
by weld-commits@lists.jboss.org
Author: dan.j.allen
Date: 2010-07-08 17:07:09 -0400 (Thu, 08 Jul 2010)
New Revision: 6586
Modified:
archetypes/trunk/javaee6-webapp-src/pom.xml
archetypes/trunk/javaee6-webapp-src/src/test/resources/arquillian.xml
Log:
track Arquillian container refactorings
Modified: archetypes/trunk/javaee6-webapp-src/pom.xml
===================================================================
--- archetypes/trunk/javaee6-webapp-src/pom.xml 2010-07-06 03:36:26 UTC (rev 6585)
+++ archetypes/trunk/javaee6-webapp-src/pom.xml 2010-07-08 21:07:09 UTC (rev 6586)
@@ -172,11 +172,11 @@
</profile>
<profile>
- <id>glassfish-embedded-30</id>
+ <id>glassfish-embedded-3</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-glassfish-embedded-30</artifactId>
+ <artifactId>arquillian-glassfish-embedded-3</artifactId>
<version>${arquillian.version}</version>
<scope>test</scope>
</dependency>
@@ -219,11 +219,11 @@
</build>
</profile>
<profile>
- <id>jbossas-remote-60</id>
+ <id>jbossas-remote-6</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-jbossas-remote-60</artifactId>
+ <artifactId>arquillian-jbossas-remote-6</artifactId>
<version>${arquillian.version}</version>
<scope>test</scope>
</dependency>
Modified: archetypes/trunk/javaee6-webapp-src/src/test/resources/arquillian.xml
===================================================================
--- archetypes/trunk/javaee6-webapp-src/src/test/resources/arquillian.xml 2010-07-06 03:36:26 UTC (rev 6585)
+++ archetypes/trunk/javaee6-webapp-src/src/test/resources/arquillian.xml 2010-07-08 21:07:09 UTC (rev 6586)
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<arquillian xmlns="http://jboss.com/arquillian"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:jbasmanaged="urn:arq:org.jboss.arquillian.jbossas.local60"
- xmlns:gfembed="urn:arq:org.jboss.arquillian.glassfish.embedded30"
- xmlns:gfremote="urn:arq:org.jboss.arquillian.container.glassfish.remote30">
+ xmlns:jbasmanaged="urn:arq:org.jboss.arquillian.container.jbossas.managed_6"
+ xmlns:gfembed="urn:arq:org.jboss.arquillian.container.glassfish.embedded_3"
+ xmlns:gfremote="urn:arq:org.jboss.arquillian.container.glassfish.remote_3">
<!-- Uncomment to have test archives exported to the file system for inspection -->
<!--
14 years, 4 months
Weld SVN: r6585 - in extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties: query and 1 other directory.
by weld-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2010-07-05 23:36:26 -0400 (Mon, 05 Jul 2010)
New Revision: 6585
Modified:
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/FieldPropertyImpl.java
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/MethodPropertyImpl.java
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/Property.java
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query/PropertyQuery.java
Log:
fix query criteria, introduce read only flag for properties
Modified: extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/FieldPropertyImpl.java
===================================================================
--- extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/FieldPropertyImpl.java 2010-07-06 00:08:38 UTC (rev 6584)
+++ extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/FieldPropertyImpl.java 2010-07-06 03:36:26 UTC (rev 6585)
@@ -96,4 +96,8 @@
return field.getDeclaringClass();
}
+ public boolean isReadOnly()
+ {
+ return false;
+ }
}
\ No newline at end of file
Modified: extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/MethodPropertyImpl.java
===================================================================
--- extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/MethodPropertyImpl.java 2010-07-06 00:08:38 UTC (rev 6584)
+++ extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/MethodPropertyImpl.java 2010-07-06 03:36:26 UTC (rev 6585)
@@ -123,7 +123,7 @@
}
}
}
- throw new IllegalArgumentException("no such setter method: " + clazz.getName() + '.' + name);
+ return null;
}
private static Method getGetterMethod(Class<?> clazz, String name)
@@ -156,5 +156,10 @@
{
return getterMethod.getDeclaringClass();
}
+
+ public boolean isReadOnly()
+ {
+ return setterMethod == null;
+ }
}
\ No newline at end of file
Modified: extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/Property.java
===================================================================
--- extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/Property.java 2010-07-06 00:08:38 UTC (rev 6584)
+++ extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/Property.java 2010-07-06 03:36:26 UTC (rev 6585)
@@ -71,4 +71,11 @@
* @return
*/
public Class<?> getDeclaringClass();
+
+ /**
+ * Indicates whether this is a read-only property
+ *
+ * @return
+ */
+ boolean isReadOnly();
}
\ No newline at end of file
Modified: extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query/PropertyQuery.java
===================================================================
--- extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query/PropertyQuery.java 2010-07-06 00:08:38 UTC (rev 6584)
+++ extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query/PropertyQuery.java 2010-07-06 03:36:26 UTC (rev 6585)
@@ -52,7 +52,7 @@
// First check public accessor methods (we ignore private methods)
for (Method method : targetClass.getMethods())
{
- if (!(method.getName().startsWith("is") || method.getName().startsWith("get"))) break;
+ if (!(method.getName().startsWith("is") || method.getName().startsWith("get"))) continue;
boolean match = true;
for (PropertyCriteria c : criteria)
14 years, 4 months
Weld SVN: r6584 - extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query.
by weld-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2010-07-05 20:08:38 -0400 (Mon, 05 Jul 2010)
New Revision: 6584
Modified:
extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query/PropertyQuery.java
Log:
add getFirstResult() method
Modified: extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query/PropertyQuery.java
===================================================================
--- extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query/PropertyQuery.java 2010-06-30 19:28:34 UTC (rev 6583)
+++ extensions/trunk/src/main/java/org/jboss/weld/extensions/util/properties/query/PropertyQuery.java 2010-07-06 00:08:38 UTC (rev 6584)
@@ -39,6 +39,12 @@
return this;
}
+ public Property<V> getFirstResult()
+ {
+ List<Property<V>> results = getResultList();
+ return results.isEmpty() ? null : results.get(0);
+ }
+
public List<Property<V>> getResultList()
{
List<Property<V>> results = new ArrayList<Property<V>>();
14 years, 4 months