Quantcast

cxf git commit: Adding WadlGenerator jaxbContextProperties, patch from Vjacheslav Borisov applied with minor updates, This closes #238

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

cxf git commit: Adding WadlGenerator jaxbContextProperties, patch from Vjacheslav Borisov applied with minor updates, This closes #238

sergeyb
Repository: cxf
Updated Branches:
  refs/heads/master 64e17b906 -> c9875c223


Adding WadlGenerator jaxbContextProperties, patch from Vjacheslav Borisov applied with minor updates, This closes #238


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

Branch: refs/heads/master
Commit: c9875c223627a17f7d8128632b25bdf6bf148918
Parents: 64e17b9
Author: Sergey Beryozkin <[hidden email]>
Authored: Fri Feb 17 14:27:34 2017 +0000
Committer: Sergey Beryozkin <[hidden email]>
Committed: Fri Feb 17 14:27:34 2017 +0000

----------------------------------------------------------------------
 .../java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java   | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/c9875c22/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
----------------------------------------------------------------------
diff --git a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
index 486032c..8a17ecf 100644
--- a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
+++ b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
@@ -195,6 +195,7 @@ public class WadlGenerator implements ContainerRequestFilter {
     private Bus bus;
     private final List<DocumentationProvider> docProviders = new LinkedList<DocumentationProvider>();
     private ResourceIdGenerator idGenerator;
+    private Map<String, Object> jaxbContextProperties;
 
     public WadlGenerator() {
     }
@@ -301,7 +302,7 @@ public class WadlGenerator implements ContainerRequestFilter {
 
         JAXBContext jaxbContext = null;
         if (useJaxbContextForQnames && !allTypes.isEmpty()) {
-            jaxbContext = ResourceUtils.createJaxbContext(new HashSet<>(allTypes), null, null);
+            jaxbContext = ResourceUtils.createJaxbContext(new HashSet<>(allTypes), null, jaxbContextProperties);
             if (jaxbContext == null) {
                 LOG.warning("JAXB Context is null: possibly due to one of input classes being not accepted");
             }
@@ -2252,6 +2253,10 @@ public class WadlGenerator implements ContainerRequestFilter {
     public void setIncrementNamespacePrefix(boolean incrementNamespacePrefix) {
         this.incrementNamespacePrefix = incrementNamespacePrefix;
     }
+    public void setJaxbContextProperties(Map<String, Object> jaxbContextProperties) {
+        this.jaxbContextProperties = jaxbContextProperties;
+    }
+
 
     private static class SchemaConverter extends DelegatingXMLStreamWriter {
         private static final String SCHEMA_LOCATION = "schemaLocation";

Loading...