You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/10/18 23:29:29 UTC
[sling-adapter-annotations] 01/10: SLING-2978 - Create tooling
top-level directory and move maven and ide under it
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-adapter-annotations.git
commit d9592e457100f7e7fe60bb2618720f846e02b471
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Wed Jul 24 18:13:22 2013 +0000
SLING-2978 - Create tooling top-level directory and move maven and ide
under it
* moved the maven directory under tooling maven
* adjusted module paths in pom.xml
* updated the scm information in the pom.xml files
* updated the scm information in the README.txt files
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1506645 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 40 ++++++++++++++++++
.../sling/adapter/annotations/Adaptable.java | 47 ++++++++++++++++++++++
.../sling/adapter/annotations/Adaptables.java | 40 ++++++++++++++++++
.../apache/sling/adapter/annotations/Adapter.java | 43 ++++++++++++++++++++
4 files changed, 170 insertions(+)
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..4826b62
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>sling</artifactId>
+ <groupId>org.apache.sling</groupId>
+ <version>17</version>
+ <relativePath>../../parent/pom.xml</relativePath>
+ </parent>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>adapter-annotations</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <name>Sling Adapter Annotations</name>
+ <description>Annotations used to generate Sling Adapter metadata</description>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/tooling/maven/adapter-annotations</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/tooling/maven/adapter-annotations</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/trunk/tooling/maven/adapter-annotations</url>
+ </scm>
+</project>
\ No newline at end of file
diff --git a/src/main/java/org/apache/sling/adapter/annotations/Adaptable.java b/src/main/java/org/apache/sling/adapter/annotations/Adaptable.java
new file mode 100644
index 0000000..f3ca5ea
--- /dev/null
+++ b/src/main/java/org/apache/sling/adapter/annotations/Adaptable.java
@@ -0,0 +1,47 @@
+/*
+ * 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.adapter.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * The <code>Adaptable</code> annotation defines metadata about an implementation
+ * of <code>org.apache.sling.api.adapter.Adaptable</code>.
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.CLASS)
+@Documented
+public @interface Adaptable {
+
+ /**
+ * The class which can be adapted.
+ */
+ Class<?> adaptableClass();
+
+ /**
+ * The possible adapters for this adaptable.
+ */
+ Adapter[] adapters();
+
+
+}
\ No newline at end of file
diff --git a/src/main/java/org/apache/sling/adapter/annotations/Adaptables.java b/src/main/java/org/apache/sling/adapter/annotations/Adaptables.java
new file mode 100644
index 0000000..6c0bb5b
--- /dev/null
+++ b/src/main/java/org/apache/sling/adapter/annotations/Adaptables.java
@@ -0,0 +1,40 @@
+/*
+ * 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.adapter.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * The <code>Adaptables</code> annotation allows multiple
+ * <code>org.apache.sling.api.adapter.annotations.Adaptable</code> annotations
+ * to be added to a single class.
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.CLASS)
+@Documented
+public @interface Adaptables {
+
+ /**
+ * The adaptable annotations.
+ */
+ Adaptable[] value();
+
+}
diff --git a/src/main/java/org/apache/sling/adapter/annotations/Adapter.java b/src/main/java/org/apache/sling/adapter/annotations/Adapter.java
new file mode 100644
index 0000000..e2d4891
--- /dev/null
+++ b/src/main/java/org/apache/sling/adapter/annotations/Adapter.java
@@ -0,0 +1,43 @@
+/*
+ * 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.adapter.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * The <code>Adapter</code> annotation the target of the adaptation of an
+ * <code>Adaptable</code> and, optionally, the condition under which the
+ * adaptation will produce a non-null result.
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.CLASS)
+@Documented
+public @interface Adapter {
+ /**
+ * The list of classes to which the adaptable can be adapted.
+ * */
+ Class<?>[] value();
+
+ /**
+ * The condition under which an adaptation will be successful.
+ */
+ String condition() default "";
+}
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.