LEFT | RIGHT |
1 /* | 1 /* |
2 * Licensed to the Apache Software Foundation (ASF) under one | 2 * Licensed to the Apache Software Foundation (ASF) under one |
3 * or more contributor license agreements. See the NOTICE file | 3 * or more contributor license agreements. See the NOTICE file |
4 * distributed with this work for additional information | 4 * distributed with this work for additional information |
5 * regarding copyright ownership. The ASF licenses this file | 5 * regarding copyright ownership. The ASF licenses this file |
6 * to you under the Apache License, Version 2.0 (the | 6 * to you under the Apache License, Version 2.0 (the |
7 * "License"); you may not use this file except in compliance | 7 * "License"); you may not use this file except in compliance |
8 * with the License. You may obtain a copy of the License at | 8 * with the License. You may obtain a copy of the License at |
9 * | 9 * |
10 * http://www.apache.org/licenses/LICENSE-2.0 | 10 * http://www.apache.org/licenses/LICENSE-2.0 |
11 * | 11 * |
12 * Unless required by applicable law or agreed to in writing, | 12 * Unless required by applicable law or agreed to in writing, |
13 * software distributed under the License is distributed on an | 13 * software distributed under the License is distributed on an |
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
15 * KIND, either express or implied. See the License for the | 15 * KIND, either express or implied. See the License for the |
16 * specific language governing permissions and limitations under the License. | 16 * specific language governing permissions and limitations under the License. |
17 */ | 17 */ |
18 package org.apache.sling.jcr.resource; | 18 package org.apache.sling.jcr.resource; |
19 | 19 |
| 20 import org.apache.sling.api.resource.ResourceResolver; |
| 21 |
| 22 |
20 /** | 23 /** |
21 * Determines the resource type for a path, which may or may not exist. This is
only used | 24 * Determines the resource type for a path, which may or may not exist. This is
only used |
22 * where the resource does not exist, giving other bundles the opportunity to sp
ecify a | 25 * where the resource does not exist, giving other bundles the opportunity to sp
ecify a |
23 * resource type for non existent resources. If the resource does exist, the res
ource type | 26 * resource type for non existent resources. If the resource does exist, the res
ource type |
24 * can be set using a JcrResourceTypeProvider. Implementations of this interface
should be | 27 * can be set using a JcrResourceTypeProvider. Implementations of this interface
should be |
25 * fast and consume few resources, as it will be invoked for all 404 URI's | 28 * fast and consume few resources, as it will be invoked for all 404 URI's |
26 */ | 29 */ |
27 public interface PathResourceTypeProvider { | 30 public interface PathResourceTypeProvider { |
28 | 31 |
29 /** | 32 /** |
30 * Get the resource type for a path. | 33 * Get the resource type for a path. |
| 34 * @param resourceResolver the resource resolver. |
31 * @param absRealPath the absolute URI of the resource. | 35 * @param absRealPath the absolute URI of the resource. |
32 * @return the resource type of the path, null if there is no match. | 36 * @return the resource type of the path, null if there is no match. |
33 */ | 37 */ |
34 String getResourceTypeFromPath(String absRealPath); | 38 String getResourceTypeFromPath(ResourceResolver resourceResolver, String absRe
alPath); |
35 | 39 |
36 } | 40 } |
LEFT | RIGHT |