Class | Line # | Actions | |||||
---|---|---|---|---|---|---|---|
StandardExtendedURLResourceReferenceResolver | 46 | 1 | 0% | 1 | 0 |
1 | /* | |
2 | * See the NOTICE file distributed with this work for additional | |
3 | * information regarding copyright ownership. | |
4 | * | |
5 | * This is free software; you can redistribute it and/or modify it | |
6 | * under the terms of the GNU Lesser General Public License as | |
7 | * published by the Free Software Foundation; either version 2.1 of | |
8 | * the License, or (at your option) any later version. | |
9 | * | |
10 | * This software is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | * Lesser General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU Lesser General Public | |
16 | * License along with this software; if not, write to the Free | |
17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | |
18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. | |
19 | */ | |
20 | package org.xwiki.url.internal.standard; | |
21 | ||
22 | import java.util.Map; | |
23 | ||
24 | import javax.inject.Inject; | |
25 | import javax.inject.Named; | |
26 | import javax.inject.Singleton; | |
27 | ||
28 | import org.xwiki.component.annotation.Component; | |
29 | import org.xwiki.resource.CreateResourceReferenceException; | |
30 | import org.xwiki.resource.ResourceReference; | |
31 | import org.xwiki.resource.ResourceReferenceResolver; | |
32 | import org.xwiki.resource.ResourceType; | |
33 | import org.xwiki.resource.UnsupportedResourceReferenceException; | |
34 | import org.xwiki.url.ExtendedURL; | |
35 | ||
36 | /** | |
37 | * Parses an {@link ExtendedURL} written in the "standard" format and generate a | |
38 | * {@link org.xwiki.resource.ResourceReference} out of it. | |
39 | * | |
40 | * @version $Id: 01f95a22afeb5bac810e5a61f7df4c7c327e17e0 $ | |
41 | * @since 7.1M1 | |
42 | */ | |
43 | @Component | |
44 | @Named("standard") | |
45 | @Singleton | |
46 | public class StandardExtendedURLResourceReferenceResolver implements ResourceReferenceResolver<ExtendedURL> | |
47 | { | |
48 | @Inject | |
49 | @Named("generic") | |
50 | private ResourceReferenceResolver<ExtendedURL> genericResourceReferenceResolver; | |
51 | ||
52 | /** | |
53 | * {@inheritDoc} | |
54 | * | |
55 | * <p> | |
56 | * No specific parameter is supported. | |
57 | * </p> | |
58 | * | |
59 | * @see org.xwiki.resource.ResourceReferenceResolver#resolve(Object, ResourceType, Map) | |
60 | */ | |
61 | 22822 | @Override |
62 | public ResourceReference resolve(ExtendedURL extendedURL, ResourceType type, Map<String, Object> parameters) | |
63 | throws CreateResourceReferenceException, UnsupportedResourceReferenceException | |
64 | { | |
65 | 22818 | return this.genericResourceReferenceResolver.resolve(extendedURL, type, parameters); |
66 | } | |
67 | } |