cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject [1/2] cxf git commit: [CXF-7492] Renaming the option to 'authorization'
Date Tue, 05 Sep 2017 12:42:09 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 5829820c4 -> 8268cf09b


[CXF-7492] Renaming the option to 'authorization'


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/497ef6b0
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/497ef6b0
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/497ef6b0

Branch: refs/heads/3.1.x-fixes
Commit: 497ef6b09e71d7e6e725e15bed2ed6c7c8a97ece
Parents: 5829820
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Tue Sep 5 13:37:16 2017 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Tue Sep 5 13:41:51 2017 +0100

----------------------------------------------------------------------
 .../org/apache/cxf/tools/wadlto/WadlToolConstants.java    |  2 +-
 .../org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainer.java |  2 +-
 .../apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java    | 10 +++++-----
 .../org/apache/cxf/tools/wadlto/jaxrs/jaxrs-toolspec.xml  |  4 ++--
 4 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/497ef6b0/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/WadlToolConstants.java
----------------------------------------------------------------------
diff --git a/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/WadlToolConstants.java
b/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/WadlToolConstants.java
index 2f9d7b1..c2c2471 100644
--- a/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/WadlToolConstants.java
+++ b/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/WadlToolConstants.java
@@ -47,7 +47,7 @@ public final class WadlToolConstants {
     
     public static final String CFG_CATALOG = ToolConstants.CFG_CATALOG;
     public static final String CFG_BINDING = ToolConstants.CFG_BINDING;
-    public static final String CFG_NAME_PASSWORD = "namePassword";
+    public static final String CFG_AUTHORIZATION = "authorization";
 
     public static final String CFG_NO_TYPES = ToolConstants.CFG_NO_TYPES;
     public static final String CFG_NO_VOID_FOR_EMPTY_RESPONSES = "noVoidForEmptyResponses";

http://git-wip-us.apache.org/repos/asf/cxf/blob/497ef6b0/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainer.java
----------------------------------------------------------------------
diff --git a/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainer.java
b/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainer.java
index 91a056e..261630b 100644
--- a/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainer.java
+++ b/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/JAXRSContainer.java
@@ -127,7 +127,7 @@ public class JAXRSContainer extends AbstractCXFToolContainer {
         sg.setPackageName((String)context.get(WadlToolConstants.CFG_PACKAGENAME));
         sg.setResourceName((String)context.get(WadlToolConstants.CFG_RESOURCENAME));
         sg.setEncoding((String)context.get(WadlToolConstants.CFG_ENCODING));
-        sg.setNamePassword((String)context.get(WadlToolConstants.CFG_NAME_PASSWORD));
+        sg.setAuthorization((String)context.get(WadlToolConstants.CFG_AUTHORIZATION));
 
         String wadlNs = (String)context.get(WadlToolConstants.CFG_WADL_NAMESPACE);
         if (wadlNs != null) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/497ef6b0/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
----------------------------------------------------------------------
diff --git a/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
b/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
index 86bc3df..eb17e7f 100644
--- a/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
+++ b/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
@@ -227,7 +227,7 @@ public class SourceGenerator {
     private boolean validateWadl;    
     private SchemaCollection schemaCollection = new SchemaCollection();
     private String encoding;
-    private String namePassword;
+    private String authorization;
     private boolean createJavaDocs;
     
     public SourceGenerator() {
@@ -1870,10 +1870,10 @@ public class SourceGenerator {
             } 
             if (is == null) {
                 URL url = URI.create(href).toURL();
-                if (namePassword != null) {
+                if (authorization != null) {
                     HttpURLConnection conn = (HttpURLConnection)url.openConnection();
                     conn.setRequestMethod("GET");
-                    String encodedAuth = "Basic " + Base64Utility.encode(namePassword.getBytes());
+                    String encodedAuth = "Basic " + Base64Utility.encode(authorization.getBytes());
                     conn.setRequestProperty("Authorization", encodedAuth);
                     is = conn.getInputStream();
                 } else {
@@ -2044,8 +2044,8 @@ public class SourceGenerator {
         this.supportBeanValidation = supportBeanValidation;
     }
 
-    public void setNamePassword(String namePassword) {
-        this.namePassword = namePassword;
+    public void setAuthorization(String authorization) {
+        this.authorization = authorization;
     }
 
     private static class GrammarInfo {

http://git-wip-us.apache.org/repos/asf/cxf/blob/497ef6b0/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/jaxrs-toolspec.xml
----------------------------------------------------------------------
diff --git a/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/jaxrs-toolspec.xml
b/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/jaxrs-toolspec.xml
index 784d978..cb0aa1f 100644
--- a/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/jaxrs-toolspec.xml
+++ b/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/jaxrs-toolspec.xml
@@ -149,7 +149,7 @@ Examples:
                     which need to support suspended asynchronous invocations            
        
                 </annotation>
                 <associatedArgument placement="immediate">
-                    <annotation> methodNames</annotation>
+                    <annotation>methodNames</annotation>
                 </associatedArgument>
                 <switch>async</switch>
             </option>
@@ -259,7 +259,7 @@ Examples:
                 <annotation>Convert WADL doc elements to JavaDocs</annotation>
                 <switch>javaDocs</switch>
             </option>
-            <option id="namePassword" maxOccurs="1">
+            <option id="authorization" maxOccurs="1">
                 <annotation>
                     Specifies a colon separated user name and password for retrieving the
                     remote WADL content from the servers requiring Basic authentication 
                    


Mime
View raw message