Author: fmeschbe
Date: Wed Dec 10 01:11:56 2008
New Revision: 725038
URL: http://svn.apache.org/viewvc?rev=725038&view=rev
Log:
SLING-765 Set default for namespace mangling to true, add metatype
description for the property and reorder constants in the class for
reordering in the descriptor.
Modified:
incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
incubator/sling/trunk/jcr/resource/src/main/resources/OSGI-INF/metatype/metatype.properties
Modified:
incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
URL:
http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java?rev=725038&r1=725037&r2=725038&view=diff
==============================================================================
---
incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
(original)
+++
incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
Wed Dec 10 01:11:56 2008
@@ -86,14 +86,38 @@
}
/**
+ * @scr.property value="true" type="Boolean"
+ */
+ private static final String PROP_USE_NEW_RESOLVER =
"resource.resolver.new";
+
+ /**
* @scr.property values.1="/apps" values.2="/libs"
*/
public static final String PROP_PATH = "resource.resolver.searchpath";
/**
+ * Defines whether namespace prefixes of resource names inside the path
+ * (e.g. <code>jcr:</code> in <code>/home/path/jcr:content</code>) are
+ * mangled or not.
+ * <p>
+ * Mangling means that any namespace prefix contained in the path is
replaced
+ * as per the generic substitution pattern <code>/([^:]+):/_$1_/</code>
+ * when calling the <code>map</code> method of the resource resolver.
+ * Likewise the <code>resolve</code> methods will unmangle such namespace
+ * prefixes according to the substituation pattern
+ * <code>/_([^_]+)_/$1:/</code>.
+ * <p>
+ * This feature is provided since there may be systems out there in the
wild
+ * which cannot cope with URLs containing colons, even though they are
+ * perfectly valid characters in the path part of URI references with a
+ * scheme.
+ * <p>
+ * The default value of this property if no configuration is provided is
+ * <code>true</code>.
+ *
* @scr.property value="true" type="Boolean"
*/
- private static final String PROP_USE_NEW_RESOLVER =
"resource.resolver.new";
+ private static final String PROP_MANGLE_NAMESPACES =
"resource.resolver.manglenamespaces";
/**
* @scr.property value="true" type="Boolean"
@@ -134,30 +158,6 @@
*/
private static final String PROP_MAPREGEXPS =
"resource.resolver.mapregexps";
- /**
- * Defines whether namespace prefixes of resource names inside the path
- * (e.g. <code>jcr:</code> in <code>/home/path/jcr:content</code>) are
- * mangled or not.
- * <p>
- * Mangling means the any namespace prefix contained in the path is
replaced
- * as per the generic substitution pattern <code>/([^:]+):/_$1_/</code>
- * when calling the <code>map</code> method of the resource resolver.
- * Likewise the <code>resolve</code> methods will unmangle such namespace
- * prefixes according to the substituation pattern
- * <code>/_([^_]+)_/$1:/</code>.
- * <p>
- * This feature is provided since there may be systems out there in the
wild
- * which cannot cope with URLs containing colons, even though they are
- * perfectly valid characters in the path part of URI references with a
- * scheme.
- * <p>
- * The default value of this property if no configuration is provided is
- * <code>false</code>.
- *
- * @scr.property value="false" type="Boolean"
- */
- private static final String PROP_MANGLE_NAMESPACES =
"resource.resolver.manglenamespaces";
-
/** default log */
private final Logger log = LoggerFactory.getLogger(getClass());
Modified:
incubator/sling/trunk/jcr/resource/src/main/resources/OSGI-INF/metatype/metatype.properties
URL:
http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/resources/OSGI-INF/metatype/metatype.properties?rev=725038&r1=725037&r2=725038&view=diff
==============================================================================
---
incubator/sling/trunk/jcr/resource/src/main/resources/OSGI-INF/metatype/metatype.properties
(original)
+++
incubator/sling/trunk/jcr/resource/src/main/resources/OSGI-INF/metatype/metatype.properties
Wed Dec 10 01:11:56 2008
@@ -40,10 +40,12 @@
resource.resolver.allowDirect.name = Allow Direct Mapping
resource.resolver.allowDirect.description = Whether to add a direct URL \
mapping to the front of the mapping list.
+
resource.resolver.virtual.name = Virtual URLs
resource.resolver.virtual.description = List of virtual URLs and there \
mappings to real URLs. Format is <externalURL>-<internalURL>. Mappings are \
applied on the complete request URL only.
+
resource.resolver.mapping.name = URL Mappings
resource.resolver.mapping.description = List of mappings to apply to URLs. \
Incoming mappings are applied to request URLs to map to Content paths, \
@@ -52,21 +54,39 @@
">" for incoming mappings, "<" for outgoing mappings and "-" for mappings \
applied in both directions. Mappings are applied in configuration order by \
comparing and replacing URL prefixes.
+
resource.resolver.searchpath.name = Resource Search Path
resource.resolver.searchpath.description = The list of absolute path prefixes \
applied to find resources whose path is just specified with a relative path. \
The default value is [ "/apps", "/libs" ]. If an empty path is specified a \
single entry path of [ "/" ] is assumed.
+
resource.resolver.regexps.name = Resource Regexps
resource.resolver.regexps.description = The list of regexps that will be \
executed on a path before the resource resolving. Please separate the \
regexp from the replacement string by using the | (pipe) character. \
For each regexp you need to specify a regexp doing the opposite conversion.\
The default value of "/_([^/]+?)_|/$1:" is very important to the system and \
- should never be removed without very good reason.
+ should never be removed without very good reason. This configuration setting \
+ is ignored by the New Resource Resolver.
+
resource.resolver.mapregexps.name = Map Regexps
resource.resolver.mapregexps.description = The list of regexps that will do \
the opposite conversion as the resource regexps. \
The default value of "/([^/]+?):([^/]+)|/_$1_$2" is very important to the
system and \
- should never be removed without very good reason.
-
\ No newline at end of file
+ should never be removed without very good reason. This configuration setting \
+ is ignored by the New Resource Resolver.
+
+resource.resolver.manglenamespaces.name = Namespace Mangling
+resource.resolver.manglenamespaces.description = Defines whether namespace \
+ prefixes of resource names inside the path (e.g. "jcr:" in
"/home/path/jcr:content") \
+ are mangled or not. Mangling means that any namespace prefix contained in the
\
+ path is replaced as per the generic substitution pattern "/([^:]+):/_$1_/" \
+ when calling the "map" method of the resource resolver. Likewise the \
+ "resolve" methods will unmangle such namespace prefixes according to the \
+ substituation pattern "/_([^_]+)_/$1:/". This feature is provided since \
+ there may be systems out there in the wild which cannot cope with URLs \
+ containing colons, even though they are perfectly valid characters in the \
+ path part of URI references with a scheme. The default value of this property
\
+ if no configuration is provided is "true". This configuration setting is only
\
+ used by the New Resource Resolver.
\ No newline at end of file