You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2007/10/16 04:34:05 UTC

svn commit: r585003 - in /incubator/cxf/branches/2.0.x-fixes: ./ common/common/src/main/java/org/apache/cxf/version/ common/common/src/main/resources-filtered/org/apache/cxf/version/ common/common/src/test/java/org/apache/cxf/version/ rt/transports/htt...

Author: dkulp
Date: Mon Oct 15 19:34:01 2007
New Revision: 585003

URL: http://svn.apache.org/viewvc?rev=585003&view=rev
Log:
Merged revisions 584246 via svnmerge from 
https://svn.apache.org/repos/asf/incubator/cxf/trunk

........
  r584246 | dkulp | 2007-10-12 15:43:08 -0400 (Fri, 12 Oct 2007) | 3 lines
  
  [CXF-1109] Make bunch of stuff in HTTPConduit protected
  Update version stuff to make generated code and command line tools spit out proper branding
........

Modified:
    incubator/cxf/branches/2.0.x-fixes/   (props changed)
    incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/version/Version.java
    incubator/cxf/branches/2.0.x-fixes/common/common/src/main/resources-filtered/org/apache/cxf/version/version.properties
    incubator/cxf/branches/2.0.x-fixes/common/common/src/test/java/org/apache/cxf/version/VersionTest.java
    incubator/cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
    incubator/cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/VelocityGenerator.java
    incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/AbstractGenerator.java
    incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/build.vm
    incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/client.vm
    incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/fault.vm
    incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm
    incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/sei.vm
    incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/server.vm
    incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm

Propchange: incubator/cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/version/Version.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/version/Version.java?rev=585003&r1=585002&r2=585003&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/version/Version.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/version/Version.java Mon Oct 15 19:34:01 2007
@@ -25,6 +25,7 @@
 public final class Version {
 
     private static String version;
+    private static String name;
     
     private static final String VERSION_BASE = "/org/apache/cxf/version/";
 
@@ -47,14 +48,14 @@
 
             try {
                 InputStream ins = getResourceAsStream(VERSION_BASE + "version.properties");
-
                 p.load(ins);
                 ins.close();
             } catch (IOException ex) {
                 // ignore, will end up with defaults
             }
 
-            version = p.getProperty("product.version");
+            version = p.getProperty("product.version", "<unknown>");
+            name = p.getProperty("product.name", "Apache CXF");
         }
     }
 
@@ -63,12 +64,17 @@
         return version;
     }
 
+    public static String getName() {
+        loadProperties();
+        return name;
+    }
 
     /**
-     * Returns version string as normally used in print, such as 3.2.4
+     * Returns version string as normally used in print, such as Apache CXF 3.2.4
      *
      */
     public static String getCompleteVersionString() {
-        return getCurrentVersion();
+        loadProperties();
+        return name + " " + version;
     }
 }

Modified: incubator/cxf/branches/2.0.x-fixes/common/common/src/main/resources-filtered/org/apache/cxf/version/version.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/common/common/src/main/resources-filtered/org/apache/cxf/version/version.properties?rev=585003&r1=585002&r2=585003&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/common/common/src/main/resources-filtered/org/apache/cxf/version/version.properties (original)
+++ incubator/cxf/branches/2.0.x-fixes/common/common/src/main/resources-filtered/org/apache/cxf/version/version.properties Mon Oct 15 19:34:01 2007
@@ -19,3 +19,4 @@
 #
 #
 product.version=${pom.version}
+product.name=Apache CXF (incubator)
\ No newline at end of file

Modified: incubator/cxf/branches/2.0.x-fixes/common/common/src/test/java/org/apache/cxf/version/VersionTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/common/common/src/test/java/org/apache/cxf/version/VersionTest.java?rev=585003&r1=585002&r2=585003&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/common/common/src/test/java/org/apache/cxf/version/VersionTest.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/common/common/src/test/java/org/apache/cxf/version/VersionTest.java Mon Oct 15 19:34:01 2007
@@ -35,6 +35,6 @@
     public void testGetVersion() {
         String completeVersion =  Version.getCompleteVersionString();
         String currentVersion = Version.getCurrentVersion();
-        assertEquals(completeVersion, currentVersion);
+        assertTrue(completeVersion.contains(currentVersion));
     }
 }

Modified: incubator/cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=585003&r1=585002&r2=585003&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java Mon Oct 15 19:34:01 2007
@@ -1684,32 +1684,32 @@
      * Wrapper output stream responsible for flushing headers and handling
      * the incoming HTTP-level response (not necessarily the MEP response).
      */
-    private class WrappedOutputStream extends AbstractWrappedOutputStream {
+    protected class WrappedOutputStream extends AbstractWrappedOutputStream {
         /**
          * This field contains the currently active connection.
          */
-        private HttpURLConnection connection;
+        protected HttpURLConnection connection;
         
         /**
          * This boolean is true if the request must be cached.
          */
-        private boolean cachingForRetransmission;
+        protected boolean cachingForRetransmission;
         
         /**
          * If we are going to be chunking, we won't flush till close which causes
          * new chunks, small network packets, etc..
          */
-        private final boolean chunking;
+        protected final boolean chunking;
         
         /**
          * This field contains the output stream with which we cache
          * the request. It maybe null if we are not caching.
          */
-        private CacheAndWriteOutputStream cachedStream;
+        protected CacheAndWriteOutputStream cachedStream;
 
-        private Message outMessage;
+        protected Message outMessage;
         
-        WrappedOutputStream(
+        protected WrappedOutputStream(
                 Message m, 
                 HttpURLConnection c, 
                 boolean possibleRetransmit,
@@ -1799,7 +1799,7 @@
          *
          * @throws IOException
          */
-        private void handleRetransmits() throws IOException {
+        protected void handleRetransmits() throws IOException {
             // If we have a cachedStream, we are caching the request.
             if (cachedStream != null) {
 
@@ -1852,7 +1852,7 @@
          * 
          * @throws IOException
          */
-        private void handleResponse() throws IOException {
+        protected void handleResponse() throws IOException {
             
             // Process retransmits until we fall out.
             handleRetransmits();

Modified: incubator/cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/VelocityGenerator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/VelocityGenerator.java?rev=585003&r1=585002&r2=585003&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/VelocityGenerator.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/VelocityGenerator.java Mon Oct 15 19:34:01 2007
@@ -127,6 +127,8 @@
     public void setCommonAttributes() {
         attributes.put("currentdate", Calendar.getInstance().getTime());
         attributes.put("version", Version.getCurrentVersion());
+        attributes.put("name", Version.getName());
+        attributes.put("fullversion", Version.getCompleteVersionString());
     }
 
     public void clearAttributes() {

Modified: incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/AbstractGenerator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/AbstractGenerator.java?rev=585003&r1=585002&r2=585003&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/AbstractGenerator.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/AbstractGenerator.java Mon Oct 15 19:34:01 2007
@@ -103,6 +103,8 @@
     protected void setCommonAttributes() {
         setAttributes("currentdate", Calendar.getInstance().getTime());
         setAttributes("version", Version.getCurrentVersion());
+        setAttributes("fullversion", Version.getCompleteVersionString());
+        setAttributes("name", Version.getName());
     }
 
     protected void clearAttributes() {

Modified: incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/build.vm
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/build.vm?rev=585003&r1=585002&r2=585003&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/build.vm (original)
+++ incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/build.vm Mon Oct 15 19:34:01 2007
@@ -18,7 +18,7 @@
 <!--
      Generated by WSDLToJava Compiler.
      /**
-     * This class was generated by the cxf $version
+     * This class was generated by $fullversion
      * $currentdate
      * Generated source version: $version
      *

Modified: incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/client.vm
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/client.vm?rev=585003&r1=585002&r2=585003&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/client.vm (original)
+++ incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/client.vm Mon Oct 15 19:34:01 2007
@@ -34,7 +34,7 @@
 #end
 
 /**
- * This class was generated by the CXF $version
+ * This class was generated by $fullversion
  * $currentdate
  * Generated source version: $version
  * 

Modified: incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/fault.vm
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/fault.vm?rev=585003&r1=585002&r2=585003&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/fault.vm (original)
+++ incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/fault.vm Mon Oct 15 19:34:01 2007
@@ -21,7 +21,7 @@
 
 
 /**
- * This class was generated by the CXF $version
+ * This class was generated by $fullversion
  * $currentdate
  * Generated source version: $version
  * 

Modified: incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm?rev=585003&r1=585002&r2=585003&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm (original)
+++ incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/impl.vm Mon Oct 15 19:34:01 2007
@@ -28,7 +28,7 @@
 #end
 
 /**
- * This class was generated by the CXF $version
+ * This class was generated by $fullversion
  * $currentdate
  * Generated source version: $version
  * 

Modified: incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/sei.vm
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/sei.vm?rev=585003&r1=585002&r2=585003&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/sei.vm (original)
+++ incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/sei.vm Mon Oct 15 19:34:01 2007
@@ -27,7 +27,7 @@
 #end
 
 /**
- * This class was generated by the CXF $version
+ * This class was generated by $fullversion
  * $currentdate
  * Generated source version: $version
  * 

Modified: incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/server.vm
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/server.vm?rev=585003&r1=585002&r2=585003&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/server.vm (original)
+++ incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/server.vm Mon Oct 15 19:34:01 2007
@@ -20,7 +20,7 @@
 import javax.xml.ws.Endpoint;
 
 /**
- * This class was generated by the CXF $version
+ * This class was generated by $fullversion
  * $currentdate
  * Generated source version: $version
  * 

Modified: incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm?rev=585003&r1=585002&r2=585003&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm (original)
+++ incubator/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/template/service.vm Mon Oct 15 19:34:01 2007
@@ -31,7 +31,7 @@
 #end
 
 /**
- * This class was generated by the CXF $version
+ * This class was generated by $fullversion
  * $currentdate
  * Generated source version: $version
  *