incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1498322 - in /sling/whiteboard/bdelacretaz/adapter-methods/sling-api/src/main/java/org/apache/sling/api/adapter: AdapterMethod.java AdapterMethodsProvider.java package-info.java
Date Mon, 01 Jul 2013 09:03:22 GMT
Author: bdelacretaz
Date: Mon Jul  1 09:03:22 2013
New Revision: 1498322

URL: http://svn.apache.org/r1498322
Log:
SLING-2938 - sling.api additions, in my whiteboard for now

Added:
    sling/whiteboard/bdelacretaz/adapter-methods/sling-api/src/main/java/org/apache/sling/api/adapter/AdapterMethod.java
  (with props)
    sling/whiteboard/bdelacretaz/adapter-methods/sling-api/src/main/java/org/apache/sling/api/adapter/AdapterMethodsProvider.java
  (with props)
Modified:
    sling/whiteboard/bdelacretaz/adapter-methods/sling-api/src/main/java/org/apache/sling/api/adapter/package-info.java

Added: sling/whiteboard/bdelacretaz/adapter-methods/sling-api/src/main/java/org/apache/sling/api/adapter/AdapterMethod.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/bdelacretaz/adapter-methods/sling-api/src/main/java/org/apache/sling/api/adapter/AdapterMethod.java?rev=1498322&view=auto
==============================================================================
--- sling/whiteboard/bdelacretaz/adapter-methods/sling-api/src/main/java/org/apache/sling/api/adapter/AdapterMethod.java
(added)
+++ sling/whiteboard/bdelacretaz/adapter-methods/sling-api/src/main/java/org/apache/sling/api/adapter/AdapterMethod.java
Mon Jul  1 09:03:22 2013
@@ -0,0 +1,37 @@
+/*
+ * 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.sling.api.adapter;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation for Adapter methods, used to identify methods in 
+ * {@link AdapterMethodsProvider} services that are used to
+ * adapt between types.
+ */
+@Target( { ElementType.METHOD })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface AdapterMethod {
+
+    /** Optional textual description of the adapter method */
+    String description() default "";
+}

Propchange: sling/whiteboard/bdelacretaz/adapter-methods/sling-api/src/main/java/org/apache/sling/api/adapter/AdapterMethod.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/whiteboard/bdelacretaz/adapter-methods/sling-api/src/main/java/org/apache/sling/api/adapter/AdapterMethod.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL

Added: sling/whiteboard/bdelacretaz/adapter-methods/sling-api/src/main/java/org/apache/sling/api/adapter/AdapterMethodsProvider.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/bdelacretaz/adapter-methods/sling-api/src/main/java/org/apache/sling/api/adapter/AdapterMethodsProvider.java?rev=1498322&view=auto
==============================================================================
--- sling/whiteboard/bdelacretaz/adapter-methods/sling-api/src/main/java/org/apache/sling/api/adapter/AdapterMethodsProvider.java
(added)
+++ sling/whiteboard/bdelacretaz/adapter-methods/sling-api/src/main/java/org/apache/sling/api/adapter/AdapterMethodsProvider.java
Mon Jul  1 09:03:22 2013
@@ -0,0 +1,29 @@
+/*
+ * 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.sling.api.adapter;
+
+/**
+ * Service that provides Adapter methods.
+ * 
+ * Public methods annotated with {@link AdapterMethod} that such
+ * a service provides, that take a single parameter of type A and 
+ * have return type B are considered adapters from type A to B. 
+ */
+public interface AdapterMethodsProvider {
+}

Propchange: sling/whiteboard/bdelacretaz/adapter-methods/sling-api/src/main/java/org/apache/sling/api/adapter/AdapterMethodsProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/whiteboard/bdelacretaz/adapter-methods/sling-api/src/main/java/org/apache/sling/api/adapter/AdapterMethodsProvider.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL

Modified: sling/whiteboard/bdelacretaz/adapter-methods/sling-api/src/main/java/org/apache/sling/api/adapter/package-info.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/bdelacretaz/adapter-methods/sling-api/src/main/java/org/apache/sling/api/adapter/package-info.java?rev=1498322&r1=1498321&r2=1498322&view=diff
==============================================================================
--- sling/whiteboard/bdelacretaz/adapter-methods/sling-api/src/main/java/org/apache/sling/api/adapter/package-info.java
(original)
+++ sling/whiteboard/bdelacretaz/adapter-methods/sling-api/src/main/java/org/apache/sling/api/adapter/package-info.java
Mon Jul  1 09:03:22 2013
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-@Version("2.2")
+@Version("2.2.1")
 package org.apache.sling.api.adapter;
 
 import aQute.bnd.annotation.Version;



Mime
View raw message