cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject svn commit: r441082 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/databinding/DataBindingContext.java rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBindingContext.java
Date Thu, 07 Sep 2006 13:12:03 GMT
Author: tli
Date: Thu Sep  7 06:12:03 2006
New Revision: 441082

URL: http://svn.apache.org/viewvc?view=rev&rev=441082
Log:
Add DatabindingContext to bind databinding info (like class, method) with ServiceModel, sorry
for missing these file

Added:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/databinding/DataBindingContext.java
  (with props)
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBindingContext.java
  (with props)

Added: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/databinding/DataBindingContext.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/databinding/DataBindingContext.java?view=auto&rev=441082
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/databinding/DataBindingContext.java
(added)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/databinding/DataBindingContext.java
Thu Sep  7 06:12:03 2006
@@ -0,0 +1,35 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.databinding;
+
+import java.util.Map;
+
+import org.apache.cxf.service.model.BindingInfo;
+import org.apache.cxf.service.model.BindingOperationInfo;
+
+public interface DataBindingContext {
+
+    Map getServiceContext();
+    
+    Map getBindingContext(BindingInfo bindingInfo);
+    
+    Map getOperationContext(BindingInfo bindingInfo, BindingOperationInfo bindingOperationInfo);
+    
+}

Propchange: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/databinding/DataBindingContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBindingContext.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBindingContext.java?view=auto&rev=441082
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBindingContext.java
(added)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBindingContext.java
Thu Sep  7 06:12:03 2006
@@ -0,0 +1,70 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.jaxb;
+
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.databinding.DataBindingContext;
+import org.apache.cxf.service.model.BindingInfo;
+import org.apache.cxf.service.model.BindingOperationInfo;
+
+public class JAXBDataBindingContext implements DataBindingContext {
+
+    
+    Map<BindingInfo, Map<BindingOperationInfo, Map<QName, Class>>> context;
+    
+    public JAXBDataBindingContext(Map<BindingInfo, Map<BindingOperationInfo, Map<QName,
Class>>> pContext) {
+        this.context = pContext;
+    }
+    
+    public Map getBindingContext(BindingInfo bindingInfo) {
+        if (bindingInfo == null) {
+            throw new RuntimeException("Input bindingInfo param is null");
+        }
+        // TODO Auto-generated method stub
+        if (context != null) {
+            return context.get(bindingInfo);
+        }
+        return null;
+    }
+
+    public Map getOperationContext(BindingInfo bindingInfo, BindingOperationInfo bindingOperationInfo)
{
+        // TODO Auto-generated method stub
+        if (bindingInfo == null) {
+            throw new RuntimeException("Input bindingInfo param is null");
+        }
+        if (bindingOperationInfo == null) {
+            throw new RuntimeException("Input bindingOperationInfo param is null");
+        }
+        Map bindingMap = getBindingContext(bindingInfo);
+        if (bindingMap != null) {
+            return (Map) bindingMap.get(bindingOperationInfo);
+        }
+        return null;
+    }
+
+    public Map getServiceContext() {
+        // TODO Auto-generated method stub
+        return context;
+    }
+
+}

Propchange: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBindingContext.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message