public class URLInterceptor extends BaseInterceptor implements org.springframework.beans.factory.InitializingBean
| Modifier and Type | Field and Description |
|---|---|
static String |
CMS_CONTEXT_PLACEHOLDER |
static Pattern |
CMS_CONTEXT_PLACEHOLDER_PATTERN |
static String |
DOC_CONTEXT_PLACEHOLDER |
static Pattern |
DOC_CONTEXT_PLACEHOLDER_PATTERN |
static String |
MISSING_IMAGE |
| Constructor and Description |
|---|
URLInterceptor(HtmlTagAttributeTraverser urlTraverser)
Initializes an instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
javax.jcr.Value |
afterGetValue(JCRPropertyWrapper property,
javax.jcr.Value storedValue)
Restore value by replace context ( ##doc-context## and ##cms-context## ) and references ( ##ref:link[0-9]+##
placeholders.
|
javax.jcr.Value[] |
afterGetValues(JCRPropertyWrapper property,
javax.jcr.Value[] storedValues)
Called after getting the value.
|
void |
afterPropertiesSet() |
void |
beforeRemove(JCRNodeWrapper node,
String name,
ExtendedPropertyDefinition definition) |
javax.jcr.Value |
beforeSetValue(JCRNodeWrapper node,
String name,
ExtendedPropertyDefinition definition,
javax.jcr.Value originalValue)
Transform user URL with servlet context and links placeholders for storage.
|
javax.jcr.Value[] |
beforeSetValues(JCRNodeWrapper node,
String name,
ExtendedPropertyDefinition definition,
javax.jcr.Value[] originalValues)
Called before setting the value on the property.
|
String |
getCmsContext() |
Pattern |
getCmsPattern() |
Pattern |
getCmsPatternWithContextPlaceholder() |
String |
getDmsContext() |
Pattern |
getRefPattern() |
void |
setUrlReplacers(List<URLReplacer> urlReplacers) |
canApplyOnProperty, equals, getNodeTypes, getPropertyNames, getRequiredTypes, getSelectors, hashCode, setNodeTypes, setPropertyNames, setRequiredTypes, setSelectors, toStringpublic static final String DOC_CONTEXT_PLACEHOLDER
public static final String CMS_CONTEXT_PLACEHOLDER
public static final Pattern DOC_CONTEXT_PLACEHOLDER_PATTERN
public static final Pattern CMS_CONTEXT_PLACEHOLDER_PATTERN
public static final String MISSING_IMAGE
public URLInterceptor(HtmlTagAttributeTraverser urlTraverser)
urlTraverser - the URL utility class to visit HTML tag attributespublic void beforeRemove(JCRNodeWrapper node, String name, ExtendedPropertyDefinition definition) throws javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
beforeRemove in interface PropertyInterceptorbeforeRemove in class BaseInterceptorjavax.jcr.version.VersionExceptionjavax.jcr.lock.LockExceptionjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.RepositoryExceptionpublic javax.jcr.Value beforeSetValue(JCRNodeWrapper node, String name, ExtendedPropertyDefinition definition, javax.jcr.Value originalValue) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
beforeSetValue in interface PropertyInterceptorbeforeSetValue in class BaseInterceptornode - name - definition - originalValue - Original value @return Value to set, or null @returnjavax.jcr.ValueFormatExceptionjavax.jcr.version.VersionExceptionjavax.jcr.lock.LockExceptionjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.RepositoryException - in case of JCR-related errorspublic javax.jcr.Value[] beforeSetValues(JCRNodeWrapper node, String name, ExtendedPropertyDefinition definition, javax.jcr.Value[] originalValues) throws javax.jcr.ValueFormatException, javax.jcr.version.VersionException, javax.jcr.lock.LockException, javax.jcr.nodetype.ConstraintViolationException, javax.jcr.RepositoryException
beforeSetValues in interface PropertyInterceptorbeforeSetValues in class BaseInterceptornode - name - definition - originalValues - Original value @return Value to set, or null @throws ValueFormatExceptionjavax.jcr.version.VersionExceptionjavax.jcr.lock.LockExceptionjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.ValueFormatExceptionjavax.jcr.RepositoryExceptionpublic javax.jcr.Value afterGetValue(JCRPropertyWrapper property, javax.jcr.Value storedValue) throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
afterGetValue in interface PropertyInterceptorafterGetValue in class BaseInterceptorproperty - storedValue - javax.jcr.ValueFormatExceptionjavax.jcr.RepositoryException - in case of JCR-related errorspublic javax.jcr.Value[] afterGetValues(JCRPropertyWrapper property, javax.jcr.Value[] storedValues) throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
afterGetValues in interface PropertyInterceptorafterGetValues in class BaseInterceptorproperty - storedValues - javax.jcr.ValueFormatExceptionjavax.jcr.RepositoryExceptionpublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic void setUrlReplacers(List<URLReplacer> urlReplacers)
public String getDmsContext()
public String getCmsContext()
public Pattern getCmsPattern()
public Pattern getCmsPatternWithContextPlaceholder()
public Pattern getRefPattern()
Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.