cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r601046 - in /incubator/cxf/trunk/rt: frontend/simple/src/main/java/org/apache/cxf/service/factory/ javascript/src/main/java/org/apache/cxf/javascript/
Date Tue, 04 Dec 2007 19:20:47 GMT
Author: bimargulies
Date: Tue Dec  4 11:20:46 2007
New Revision: 601046

URL: http://svn.apache.org/viewvc?rev=601046&view=rev
Log:
Set up annotations for Javascript name control, and fix a spello in ReflectionServiceFactoryBean.

Added:
    incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptPrefixes.java
      - copied, changed from r600972, incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptPrefix.java
Modified:
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
    incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptPrefix.java

Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=601046&r1=601045&r2=601046&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Tue Dec  4 11:20:46 2007
@@ -124,7 +124,7 @@
     public static final String ELEMENT_NAME = "messagepart.elementName";
     public static final String METHOD = "operation.method";
     public static final String METHOD_PARAM_ANNOTATIONS = "method.parameters.annotations";
-    public static final String METHOD_ANNOTATONS = "method.return.annotations";
+    public static final String METHOD_ANNOTATIONS = "method.return.annotations";
     public static final QName SWA_REF  = new QName("http://ws-i.org/profiles/basic/1.1/xsd",
"swaRef");
     public static final String SWA_REF_LOCATION = "http://ws-i.org/profiles/basic/1.1/swaref.xsd";
     private static final Logger LOG = LogUtils.getL7dLogger(ReflectionServiceFactoryBean.class,
@@ -694,10 +694,6 @@
         qualifiedSchemas = b;
     }
     
-    
-
-    
-    
     protected void createWrappedSchema(ServiceInfo serviceInfo, AbstractMessageContainer
wrappedMessage,
                                        AbstractMessageContainer unwrappedMessage, QName wrapperBeanName)
{
         SchemaInfo schemaInfo = getOrCreateSchema(serviceInfo,
@@ -978,7 +974,7 @@
     }
     
     private Annotation[] getMethodAnnotations(final MessagePartInfo mpi) {
-        return (Annotation[])mpi.getProperty(METHOD_ANNOTATONS);        
+        return (Annotation[])mpi.getProperty(METHOD_ANNOTATIONS);        
     }    
     
     private void addMimeType(final XmlSchemaElement element, final Annotation[] annotations)
{
@@ -1119,7 +1115,7 @@
                 if (!isRPC(method) && !isWrapped(method)) {
                     part.setProperty(ELEMENT_NAME, q2);
                 }
-                part.setProperty(METHOD_ANNOTATONS, method.getAnnotations());
+                part.setProperty(METHOD_ANNOTATIONS, method.getAnnotations());
                 if (isHeader(method, -1)) {
                     part.setProperty(HEADER, Boolean.TRUE);
                     if (isRPC(method) || !isWrapped(method)) {

Modified: incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptPrefix.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptPrefix.java?rev=601046&r1=601045&r2=601046&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptPrefix.java
(original)
+++ incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptPrefix.java
Tue Dec  4 11:20:46 2007
@@ -19,22 +19,25 @@
 
 package org.apache.cxf.javascript;
 
-import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+
 /**
- * Use this annotation to control the names of Javascript objects associated with this package.
- * Use this with a JAXB XmlSchema annotation or the equivalent for another data binding to
associate
- * a namespace with the package.
+ * This annotation specifies the string prefix for names of JavaScript objects derived from
a particular
+ * namespace. It is used with {@link JavascriptPrefixes}. 
  */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.PACKAGE)
+@Retention(RetentionPolicy.RUNTIME) 
+@Target({ })
 public @interface JavascriptPrefix {
     /**
-     * The name prefix for this package's namespace. 
-     * @return
+     * The namespace URI of the namespace.
+     */ 
+    String namespace();
+    /**
+     * The prefix for JavaScript object names.
      */
-    String prefix() default "";
+    String prefix();
+
 }

Copied: incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptPrefixes.java
(from r600972, incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptPrefix.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptPrefixes.java?p2=incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptPrefixes.java&p1=incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptPrefix.java&r1=600972&r2=601046&rev=601046&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptPrefix.java
(original)
+++ incubator/cxf/trunk/rt/javascript/src/main/java/org/apache/cxf/javascript/JavascriptPrefixes.java
Tue Dec  4 11:20:46 2007
@@ -25,16 +25,13 @@
 import java.lang.annotation.Target;
 
 /**
- * Use this annotation to control the names of Javascript objects associated with this package.
- * Use this with a JAXB XmlSchema annotation or the equivalent for another data binding to
associate
- * a namespace with the package.
+ * Use this annotation to control the names of JavaScript objects associated with this package.
  */
 @Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.PACKAGE)
-public @interface JavascriptPrefix {
+@Target(ElementType.TYPE)
+public @interface JavascriptPrefixes {
     /**
-     * The name prefix for this package's namespace. 
-     * @return
+     * An array of namespaceURI/prefix pairs, specified as JavascriptPrefix annotations.
      */
-    String prefix() default "";
+    JavascriptPrefix[] prefixes() default { };
 }



Mime
View raw message