Author: cziegeler
Date: Wed Dec 30 07:18:27 2015
New Revision: 1722269
URL: http://svn.apache.org/viewvc?rev=1722269&view=rev
Log:
Remove new query api and move it to the next API version
Rename JCRQueryProvider to QueryLanguageProvider
Move new utility classes to separate package
Added:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/util/
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/util/Path.java
- copied, changed from r1722058,
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/Path.java
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/util/PathSet.java
- copied, changed from r1722058,
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/PathSet.java
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/util/package-info.java
(with props)
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/QueryLanguageProvider.java
- copied, changed from r1722058,
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/JCRQueryProvider.java
Removed:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/Path.java
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/PathSet.java
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/query/
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/JCRQueryProvider.java
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/QueryProvider.java
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/QueryResult.java
Modified:
sling/trunk/bundles/api/README.txt
sling/trunk/bundles/api/pom.xml
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/runtime/dto/ResourceProviderDTO.java
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ObserverConfiguration.java
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ProviderContext.java
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java
sling/trunk/bundles/api/src/test/java/org/apache/sling/api/resource/PathSetTest.java
sling/trunk/bundles/api/src/test/java/org/apache/sling/api/resource/PathTest.java
Modified: sling/trunk/bundles/api/README.txt
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/README.txt?rev=1722269&r1=1722268&r2=1722269&view=diff
==============================================================================
--- sling/trunk/bundles/api/README.txt (original)
+++ sling/trunk/bundles/api/README.txt Wed Dec 30 07:18:27 2015
@@ -11,16 +11,16 @@ which the Sling framework is running or
Getting Started
===============
-This component uses a Maven 2 (http://maven.apache.org/) build
-environment. It requires a Java 5 JDK (or higher) and Maven
(http://maven.apache.org/)
-2.0.7 or later. We recommend to use the latest Maven version.
+This component uses an Apache Maven (http://maven.apache.org/) build
+environment. It requires a Java 6 JDK (or higher) and Maven
(http://maven.apache.org/)
+3.0.5 or later. We recommend to use the latest Maven version.
-If you have Maven 2 installed, you can compile and
+If you have Maven installed, you can compile and
package the jar using the following command:
mvn package
-See the Maven 2 documentation for other build features.
+See the Maven documentation for other build features.
The latest source code for this component is available in the
Subversion (http://subversion.tigris.org/) source repository of
Modified: sling/trunk/bundles/api/pom.xml
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/pom.xml?rev=1722269&r1=1722268&r2=1722269&view=diff
==============================================================================
--- sling/trunk/bundles/api/pom.xml (original)
+++ sling/trunk/bundles/api/pom.xml Wed Dec 30 07:18:27 2015
@@ -96,17 +96,11 @@
<build>
<plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
<!-- Create the bundle of the Sling API -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
+ <version>3.0.1</version>
<extensions>true</extensions>
<configuration>
<instructions>
Modified:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/runtime/dto/ResourceProviderDTO.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/runtime/dto/ResourceProviderDTO.java?rev=1722269&r1=1722268&r2=1722269&view=diff
==============================================================================
---
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/runtime/dto/ResourceProviderDTO.java
(original)
+++
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/runtime/dto/ResourceProviderDTO.java
Wed Dec 30 07:18:27 2015
@@ -65,14 +65,9 @@ public class ResourceProviderDTO {
public boolean attributable;
/**
- * Whether the resource provider supports JCR query.
+ * Whether the resource provider supports query languages.
*/
- public boolean supportsJCRQuery;
-
- /**
- * Whether the resource provider supports querying.
- */
- public boolean supportsQuery;
+ public boolean supportsQueryLanguage;
/**
* The service id from the service registry.
Copied:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/util/Path.java
(from r1722058,
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/Path.java)
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/util/Path.java?p2=sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/util/Path.java&p1=sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/Path.java&r1=1722058&r2=1722269&rev=1722269&view=diff
==============================================================================
---
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/Path.java
(original)
+++
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/util/Path.java
Wed Dec 30 07:18:27 2015
@@ -16,12 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.sling.api.resource;
+package org.apache.sling.api.resource.util;
/**
* Simple helper class for path matching.
*
- * @since 2.9.0 (Sling API Bundle 2.10.0)
+ * @since 1.0.0 (Sling API Bundle 2.10.0)
*/
public class Path implements Comparable<Path> {
Copied:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/util/PathSet.java
(from r1722058,
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/PathSet.java)
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/util/PathSet.java?p2=sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/util/PathSet.java&p1=sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/PathSet.java&r1=1722058&r2=1722269&rev=1722269&view=diff
==============================================================================
---
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/PathSet.java
(original)
+++
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/util/PathSet.java
Wed Dec 30 07:18:27 2015
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.sling.api.resource;
+package org.apache.sling.api.resource.util;
import java.util.Collection;
import java.util.Collections;
@@ -27,7 +27,7 @@ import java.util.Set;
/**
* Simple helper class for path matching against a set of paths.
*
- * @since 2.9.0 (Sling API Bundle 2.10.0)
+ * @since 1.0.0 (Sling API Bundle 2.10.0)
*/
public class PathSet implements Iterable<Path> {
Added:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/util/package-info.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/util/package-info.java?rev=1722269&view=auto
==============================================================================
---
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/util/package-info.java
(added)
+++
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/util/package-info.java
Wed Dec 30 07:18:27 2015
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+
+@Version("1.0.0")
+package org.apache.sling.api.resource.util;
+
+import aQute.bnd.annotation.Version;
+
Propchange:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/util/package-info.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/util/package-info.java
------------------------------------------------------------------------------
svn:keywords = author date id revision rev url
Modified:
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ObserverConfiguration.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ObserverConfiguration.java?rev=1722269&r1=1722268&r2=1722269&view=diff
==============================================================================
---
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ObserverConfiguration.java
(original)
+++
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ObserverConfiguration.java
Wed Dec 30 07:18:27 2015
@@ -22,8 +22,8 @@ import java.util.Set;
import javax.annotation.Nonnull;
-import org.apache.sling.api.resource.PathSet;
import org.apache.sling.api.resource.observation.ResourceChange;
+import org.apache.sling.api.resource.util.PathSet;
import aQute.bnd.annotation.ProviderType;
Modified:
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ProviderContext.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ProviderContext.java?rev=1722269&r1=1722268&r2=1722269&view=diff
==============================================================================
---
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ProviderContext.java
(original)
+++
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ProviderContext.java
Wed Dec 30 07:18:27 2015
@@ -20,7 +20,7 @@ package org.apache.sling.spi.resource.pr
import javax.annotation.Nonnull;
-import org.apache.sling.api.resource.PathSet;
+import org.apache.sling.api.resource.util.PathSet;
import aQute.bnd.annotation.ProviderType;
Copied:
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/QueryLanguageProvider.java
(from r1722058,
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/JCRQueryProvider.java)
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/QueryLanguageProvider.java?p2=sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/QueryLanguageProvider.java&p1=sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/JCRQueryProvider.java&r1=1722058&r2=1722269&rev=1722269&view=diff
==============================================================================
---
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/JCRQueryProvider.java
(original)
+++
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/QueryLanguageProvider.java
Wed Dec 30 07:18:27 2015
@@ -37,7 +37,7 @@ import aQute.bnd.annotation.ConsumerType
* to this object.
*/
@ConsumerType
-public interface JCRQueryProvider<T> {
+public interface QueryLanguageProvider<T> {
/**
* The supported languages of the resource provider.
Modified:
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java?rev=1722269&r1=1722268&r2=1722269&view=diff
==============================================================================
---
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java
(original)
+++
sling/trunk/bundles/api/src/main/java/org/apache/sling/spi/resource/provider/ResourceProvider.java
Wed Dec 30 07:18:27 2015
@@ -555,30 +555,16 @@ public abstract class ResourceProvider<T
}
/**
- * Get the optional query provider.
+ * Get the optional query language provider.
* If the provider supports this kind of query, it must return a query
provider implementation
* if the provider is active. It should not return a query provider if it
is not
* active.
* This method is called for each query, therefore the provider
implementation
* might cache the provider object.
*
- * @return A query provider if this resource provider supports this type
of querying.
+ * @return A query language provider if this resource provider supports
this type of querying.
*/
- public @CheckForNull QueryProvider<T> getQueryProvider() {
- return null;
- }
-
- /**
- * Get the optional JCR query provider.
- * If the provider supports this kind of query, it must return a query
provider implementation
- * if the provider is active. It should not return a query provider if it
is not
- * active.
- * This method is called for each query, therefore the provider
implementation
- * might cache the provider object.
- *
- * @return A JCR query provider if this resource provider supports this
type of querying.
- */
- public @CheckForNull JCRQueryProvider<T> getJCRQueryProvider() {
+ public @CheckForNull QueryLanguageProvider<T> getQueryLanguageProvider() {
return null;
}
Modified:
sling/trunk/bundles/api/src/test/java/org/apache/sling/api/resource/PathSetTest.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/test/java/org/apache/sling/api/resource/PathSetTest.java?rev=1722269&r1=1722268&r2=1722269&view=diff
==============================================================================
---
sling/trunk/bundles/api/src/test/java/org/apache/sling/api/resource/PathSetTest.java
(original)
+++
sling/trunk/bundles/api/src/test/java/org/apache/sling/api/resource/PathSetTest.java
Wed Dec 30 07:18:27 2015
@@ -27,6 +27,8 @@ import static org.junit.Assert.fail;
import java.util.HashSet;
import java.util.Set;
+import org.apache.sling.api.resource.util.Path;
+import org.apache.sling.api.resource.util.PathSet;
import org.junit.Test;
public class PathSetTest {
Modified:
sling/trunk/bundles/api/src/test/java/org/apache/sling/api/resource/PathTest.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/test/java/org/apache/sling/api/resource/PathTest.java?rev=1722269&r1=1722268&r2=1722269&view=diff
==============================================================================
---
sling/trunk/bundles/api/src/test/java/org/apache/sling/api/resource/PathTest.java
(original)
+++
sling/trunk/bundles/api/src/test/java/org/apache/sling/api/resource/PathTest.java
Wed Dec 30 07:18:27 2015
@@ -21,6 +21,7 @@ package org.apache.sling.api.resource;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
+import org.apache.sling.api.resource.util.Path;
import org.junit.Test;
public class PathTest {