You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by dk...@apache.org on 2011/03/17 19:31:34 UTC
svn commit: r1082627 - in /webservices/commons/trunk/modules/neethi: pom.xml
src/main/java/org/apache/neethi/AssertionBuilderFactory.java
src/main/java/org/apache/neethi/AssertionBuilderFactoryImpl.java
src/site/apt/migration.apt src/site/site.xml
Author: dkulp
Date: Thu Mar 17 18:31:33 2011
New Revision: 1082627
URL: http://svn.apache.org/viewvc?rev=1082627&view=rev
Log:
Fix a couple uses of generics. Add migration guide to site
Added:
webservices/commons/trunk/modules/neethi/src/site/apt/migration.apt
Modified:
webservices/commons/trunk/modules/neethi/pom.xml
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/AssertionBuilderFactory.java
webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/AssertionBuilderFactoryImpl.java
webservices/commons/trunk/modules/neethi/src/site/site.xml
Modified: webservices/commons/trunk/modules/neethi/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/neethi/pom.xml?rev=1082627&r1=1082626&r2=1082627&view=diff
==============================================================================
--- webservices/commons/trunk/modules/neethi/pom.xml (original)
+++ webservices/commons/trunk/modules/neethi/pom.xml Thu Mar 17 18:31:33 2011
@@ -286,7 +286,7 @@
</site>
</distributionManagement>
<properties>
- <axiom.version>1.2.12-SNAPSHOT</axiom.version>
+ <axiom.version>1.2.11</axiom.version>
<neethi.osgi.version>${project.version}</neethi.osgi.version>
<bundle.plugin.version>2.1.0</bundle.plugin.version>
<failIfNoTests>false</failIfNoTests>
Modified: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/AssertionBuilderFactory.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/AssertionBuilderFactory.java?rev=1082627&r1=1082626&r2=1082627&view=diff
==============================================================================
--- webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/AssertionBuilderFactory.java (original)
+++ webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/AssertionBuilderFactory.java Thu Mar 17 18:31:33 2011
@@ -53,7 +53,7 @@ public interface AssertionBuilderFactory
* @param builder the AssertionBuilder that can build an Assertion from
* an element of specified type
*/
- void registerBuilder(QName key, AssertionBuilder builder);
+ void registerBuilder(QName key, AssertionBuilder<?> builder);
/**
* Registers an AssertionBuilder with all the builder's known elements.
@@ -61,7 +61,7 @@ public interface AssertionBuilderFactory
* @param builder the AssertionBuilder that can build an Assertion from
* an element of specified type
*/
- void registerBuilder(AssertionBuilder builder);
+ void registerBuilder(AssertionBuilder<?> builder);
/**
@@ -82,5 +82,5 @@ public interface AssertionBuilderFactory
* Assertion from
* @return an AssertionBuilder that understands qname type
*/
- public AssertionBuilder getBuilder(QName qname);
+ public AssertionBuilder<?> getBuilder(QName qname);
}
Modified: webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/AssertionBuilderFactoryImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/AssertionBuilderFactoryImpl.java?rev=1082627&r1=1082626&r2=1082627&view=diff
==============================================================================
--- webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/AssertionBuilderFactoryImpl.java (original)
+++ webservices/commons/trunk/modules/neethi/src/main/java/org/apache/neethi/AssertionBuilderFactoryImpl.java Thu Mar 17 18:31:33 2011
@@ -38,8 +38,8 @@ import org.apache.neethi.util.Service;
*/
public class AssertionBuilderFactoryImpl implements AssertionBuilderFactory {
- private Map<QName, AssertionBuilder> registeredBuilders
- = new ConcurrentHashMap<QName, AssertionBuilder>();
+ private Map<QName, AssertionBuilder<?>> registeredBuilders
+ = new ConcurrentHashMap<QName, AssertionBuilder<?>>();
protected AssertionBuilder defaultBuilder;
protected ConverterRegistry converters = new ConverterRegistry();
@@ -79,12 +79,12 @@ public class AssertionBuilderFactoryImpl
* @param builder the AssertionBuilder that can build an Assertion from
* an element of specified type
*/
- public void registerBuilder(QName key, AssertionBuilder builder) {
+ public void registerBuilder(QName key, AssertionBuilder<?> builder) {
loadDynamic();
registeredBuilders.put(key, builder);
}
- public void registerBuilder(AssertionBuilder builder) {
+ public void registerBuilder(AssertionBuilder<?> builder) {
loadDynamic();
for (QName q : builder.getKnownElements()) {
registeredBuilders.put(q, builder);
@@ -152,7 +152,7 @@ public class AssertionBuilderFactoryImpl
* Assertion from
* @return an AssertionBuilder that understands qname type
*/
- public AssertionBuilder getBuilder(QName qname) {
+ public AssertionBuilder<?> getBuilder(QName qname) {
loadDynamic();
return registeredBuilders.get(qname);
}
Added: webservices/commons/trunk/modules/neethi/src/site/apt/migration.apt
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/neethi/src/site/apt/migration.apt?rev=1082627&view=auto
==============================================================================
--- webservices/commons/trunk/modules/neethi/src/site/apt/migration.apt (added)
+++ webservices/commons/trunk/modules/neethi/src/site/apt/migration.apt Thu Mar 17 18:31:33 2011
@@ -0,0 +1,53 @@
+ -----------------------------------
+ Apache Neethi - Migration Guide
+ -----------------------------------
+
+Migrating from Apache Neethi 2 to 3
+
+ Neethi 3 is a major upgrade from Neethi 2 providing several new features
+ and enhanced capabilities. While effort was made to make it easy to
+ transition from Neeth 2 to Neethi 3, some changes are required.
+
+ * Java 5 collections - all the collections and iterators have been
+ updated to specify the proper types they contain. Upgrading to Neethi
+ 3 will likely require proper typing in existing code to reduce warnings.
+
+ * Assertion.isIgnorable() - to support WS-Policy 1.5, an isIgnorable
+ method was added to the Assertion interface and any policy assertions
+ that implement that interface must be updated to add that method.
+ In addition, it is recommend that all AssertionBuilders builders be
+ updated to look for the ignorable attribute and set it appropriately.
+
+ * AssertionBuilders - AssertionBuilders are no longer tied to Axiom.
+ The AssertionBuilder interface is now typed to specify the object model
+ the builder expects for the first parameter for the build method. The
+ type can be any type for which there is a Converter registered. By
+ default, there are converters for DOM Elements and XMLStreamReaders.
+ If the Axiom jars are available, there are Converters for OMElement as
+ well. The easiest migration path is to make your builders implement
+ "AssertionBuilder<OMElement>".
+
+ * The default assertion implement has changed. In 2.x, the default
+ implementation was the XmlPrimitiveAssertion which just wrappered
+ the OMElement. With 3.x, the default depends on the assertion
+ being built. If its a single element with either no content or
+ text content, it will be a PrimitiveAssertion. If it contains
+ a single child Policy element, it will be a
+ PolicyContainingPrimitiveAssertion. Otherwise it will be a
+ XmlPrimitiveAssertion. These changes to the default assertions allows
+ the runtime to know more about the policy so methods like intersect
+ could be added.
+
+ * Two new interfaces were added that Assertions can (optionally)
+ implement. The PolicyContainingAssertion interface is used
+ to mark assertions that contain an internal Policy. This allows
+ the normalization and intersect operations to examine the internal
+ policy as well. The IntersectableAssertion interface adds methods
+ that an Assertion can override algorithms in the intersection
+ process to provide custom behavoir. For example, per spec, the
+ intersection algorithm should not consider attributes. However,
+ an application internal policy may want to consider them for
+ various reasons.
+
+
+
Modified: webservices/commons/trunk/modules/neethi/src/site/site.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/neethi/src/site/site.xml?rev=1082627&r1=1082626&r2=1082627&view=diff
==============================================================================
--- webservices/commons/trunk/modules/neethi/src/site/site.xml (original)
+++ webservices/commons/trunk/modules/neethi/src/site/site.xml Thu Mar 17 18:31:33 2011
@@ -21,14 +21,12 @@
<bannerLeft>
<name>Apache Neethi</name>
<src>http://ws.apache.org/images/project-logo.jpg</src>
- <href>http://ws.apache.org/</href>
+ <href>http://ws.apache.org/commons/neethi/</href>
</bannerLeft>
<body>
<links>
<item name="Apache" href="http://www.apache.org/" />
<item name="WebServices" href="http://ws.apache.org/"/>
- <item name="Commons" href="http://ws.apache.org/commons/"/>
- <item name="Axiom" href="http://ws.apache.org/commons/axiom/"/>
</links>
<menu name="Apache Neethi">
@@ -38,6 +36,7 @@
</item>
<item name="Documentation">
<item name="Javadocs" href="/apidocs/index.html"/>
+ <item name="Migration Guide" href="/migration.html"/>
</item>
</menu>