Package com.day.cq.wcm.contentsync
Class PathRewriterOptions
java.lang.Object
java.util.AbstractMap<String,PathRewriterOptions.RewriteMode>
java.util.HashMap<String,PathRewriterOptions.RewriteMode>
com.day.cq.wcm.contentsync.PathRewriterOptions
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,PathRewriterOptions.RewriteMode>
The
PathRewriterOptions configure in which way
links and references should be rewritten. To enable path rewriting
you have to set an instance of PathRewriterOptions as
a request attribute.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAvailable rewrite modes.Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPathRewriterOptions(PathRewriterOptions.RewriteMode links, PathRewriterOptions.RewriteMode clientlibs, PathRewriterOptions.RewriteMode images) PathRewriterOptions(String tempDesignPath, PathRewriterOptions.RewriteMode links, PathRewriterOptions.RewriteMode clientlibs, PathRewriterOptions.RewriteMode images) -
Method Summary
Modifier and TypeMethodDescriptionGet configured relative parent path.getRewriteMode(String option) Get configured rewrite mode.booleanbooleanisExternal(String option) booleanisRelative(String option) voidsetRelativeParentPath(String path) Set a new relative parent.voidsetRewriteMode(String option, PathRewriterOptions.RewriteMode mode) Set a new rewrite mode.Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Field Details
-
ATTRIBUTE_PATH_REWRITING_OPTIONS
The request attribute name.- See Also:
-
OPTION_REWRITE_LINKS
- See Also:
-
OPTION_REWRITE_CLIENTLIBS
- See Also:
-
OPTION_REWRITE_IMAGES
- See Also:
-
OPTION_TEMP_DESIGNS
- See Also:
-
-
Constructor Details
-
PathRewriterOptions
public PathRewriterOptions(PathRewriterOptions.RewriteMode links, PathRewriterOptions.RewriteMode clientlibs, PathRewriterOptions.RewriteMode images) -
PathRewriterOptions
public PathRewriterOptions(String tempDesignPath, PathRewriterOptions.RewriteMode links, PathRewriterOptions.RewriteMode clientlibs, PathRewriterOptions.RewriteMode images)
-
-
Method Details
-
isExternal
-
isRelative
-
hasRelativeParent
public boolean hasRelativeParent() -
getRewriteMode
Get configured rewrite mode.- Returns:
- the rewriteLinks
-
setRewriteMode
Set a new rewrite mode.- Parameters:
mode- The new rewrite mode
-
getTempDesignPath
-
getRelativeParentPath
Get configured relative parent path.- Returns:
- the relative parent path
-
setRelativeParentPath
Set a new relative parent.- Parameters:
path- The new relative parent path
-