You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by jm...@apache.org on 2006/08/23 22:12:37 UTC

svn commit: r434152 - in /incubator/tuscany/java/sca/api/src/main/java/org/apache/tuscany/api/annotation: DataContext.java DataType.java

Author: jmarino
Date: Wed Aug 23 13:12:37 2006
New Revision: 434152

URL: http://svn.apache.org/viewvc?rev=434152&view=rev
Log:
add databinding annotation to api package

Added:
    incubator/tuscany/java/sca/api/src/main/java/org/apache/tuscany/api/annotation/DataContext.java   (with props)
    incubator/tuscany/java/sca/api/src/main/java/org/apache/tuscany/api/annotation/DataType.java   (with props)

Added: incubator/tuscany/java/sca/api/src/main/java/org/apache/tuscany/api/annotation/DataContext.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/api/src/main/java/org/apache/tuscany/api/annotation/DataContext.java?rev=434152&view=auto
==============================================================================
--- incubator/tuscany/java/sca/api/src/main/java/org/apache/tuscany/api/annotation/DataContext.java (added)
+++ incubator/tuscany/java/sca/api/src/main/java/org/apache/tuscany/api/annotation/DataContext.java Wed Aug 23 13:12:37 2006
@@ -0,0 +1,24 @@
+package org.apache.tuscany.api.annotation;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * A key/value pair to represent information pertaining to a {@link DataType}
+ */
+@Target(ANNOTATION_TYPE)
+@Retention(RUNTIME)
+public @interface DataContext {
+    /**
+     * @return key for the context entry
+     */
+    String key();
+
+    /**
+     * @return key for the context value
+     */
+    String value();
+
+}

Propchange: incubator/tuscany/java/sca/api/src/main/java/org/apache/tuscany/api/annotation/DataContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/api/src/main/java/org/apache/tuscany/api/annotation/DataContext.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/api/src/main/java/org/apache/tuscany/api/annotation/DataType.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/api/src/main/java/org/apache/tuscany/api/annotation/DataType.java?rev=434152&view=auto
==============================================================================
--- incubator/tuscany/java/sca/api/src/main/java/org/apache/tuscany/api/annotation/DataType.java (added)
+++ incubator/tuscany/java/sca/api/src/main/java/org/apache/tuscany/api/annotation/DataType.java Wed Aug 23 13:12:37 2006
@@ -0,0 +1,56 @@
+/*
+ * 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.tuscany.api.annotation;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Used to demarcate expected data types for an operation
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({TYPE, METHOD})
+@Retention(RUNTIME)
+public @interface DataType {
+
+    /**
+     * Returns the unique name of the data binding
+     */
+    String name();
+
+    /**
+     * @return Type of the logical data type
+     */
+    Class logicalType() default Object.class;
+
+    /**
+     * @return Type of the physical data type
+     */
+    Class physicalType() default Object.class;
+
+    /**
+     * @return Context
+     */
+    DataContext[] context() default {};
+
+}

Propchange: incubator/tuscany/java/sca/api/src/main/java/org/apache/tuscany/api/annotation/DataType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/api/src/main/java/org/apache/tuscany/api/annotation/DataType.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org