Package com.day.cq.wcm.contentsync
Class PathRewriterOptions
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<java.lang.String,PathRewriterOptions.RewriteMode>
-
- com.day.cq.wcm.contentsync.PathRewriterOptions
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.util.Map<java.lang.String,PathRewriterOptions.RewriteMode>
public class PathRewriterOptions extends java.util.HashMap<java.lang.String,PathRewriterOptions.RewriteMode>
ThePathRewriterOptions
configure in which way links and references should be rewritten. To enable path rewriting you have to set an instance ofPathRewriterOptions
as a request attribute.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PathRewriterOptions.RewriteMode
Available rewrite modes.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATTRIBUTE_PATH_REWRITING_OPTIONS
The request attribute name.static java.lang.String
OPTION_REWRITE_CLIENTLIBS
static java.lang.String
OPTION_REWRITE_IMAGES
static java.lang.String
OPTION_REWRITE_LINKS
static java.lang.String
OPTION_TEMP_DESIGNS
-
Constructor Summary
Constructors Constructor Description PathRewriterOptions(PathRewriterOptions.RewriteMode links, PathRewriterOptions.RewriteMode clientlibs, PathRewriterOptions.RewriteMode images)
PathRewriterOptions(java.lang.String tempDesignPath, PathRewriterOptions.RewriteMode links, PathRewriterOptions.RewriteMode clientlibs, PathRewriterOptions.RewriteMode images)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getRelativeParentPath()
Get configured relative parent path.PathRewriterOptions.RewriteMode
getRewriteMode(java.lang.String option)
Get configured rewrite mode.java.lang.String
getTempDesignPath()
boolean
hasRelativeParent()
boolean
isExternal(java.lang.String option)
boolean
isRelative(java.lang.String option)
void
setRelativeParentPath(java.lang.String path)
Set a new relative parent.void
setRewriteMode(java.lang.String option, PathRewriterOptions.RewriteMode mode)
Set a new rewrite mode.
-
-
-
Field Detail
-
ATTRIBUTE_PATH_REWRITING_OPTIONS
public static final java.lang.String ATTRIBUTE_PATH_REWRITING_OPTIONS
The request attribute name.- See Also:
- Constant Field Values
-
OPTION_REWRITE_LINKS
public static final java.lang.String OPTION_REWRITE_LINKS
- See Also:
- Constant Field Values
-
OPTION_REWRITE_CLIENTLIBS
public static final java.lang.String OPTION_REWRITE_CLIENTLIBS
- See Also:
- Constant Field Values
-
OPTION_REWRITE_IMAGES
public static final java.lang.String OPTION_REWRITE_IMAGES
- See Also:
- Constant Field Values
-
OPTION_TEMP_DESIGNS
public static final java.lang.String OPTION_TEMP_DESIGNS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PathRewriterOptions
public PathRewriterOptions(PathRewriterOptions.RewriteMode links, PathRewriterOptions.RewriteMode clientlibs, PathRewriterOptions.RewriteMode images)
-
PathRewriterOptions
public PathRewriterOptions(java.lang.String tempDesignPath, PathRewriterOptions.RewriteMode links, PathRewriterOptions.RewriteMode clientlibs, PathRewriterOptions.RewriteMode images)
-
-
Method Detail
-
isExternal
public boolean isExternal(java.lang.String option)
-
isRelative
public boolean isRelative(java.lang.String option)
-
hasRelativeParent
public boolean hasRelativeParent()
-
getRewriteMode
public PathRewriterOptions.RewriteMode getRewriteMode(java.lang.String option)
Get configured rewrite mode.- Returns:
- the rewriteLinks
-
setRewriteMode
public void setRewriteMode(java.lang.String option, PathRewriterOptions.RewriteMode mode)
Set a new rewrite mode.- Parameters:
mode
- The new rewrite mode
-
getTempDesignPath
public java.lang.String getTempDesignPath()
-
getRelativeParentPath
public java.lang.String getRelativeParentPath()
Get configured relative parent path.- Returns:
- the relative parent path
-
setRelativeParentPath
public void setRelativeParentPath(java.lang.String path)
Set a new relative parent.- Parameters:
path
- The new relative parent path
-
-