public class HtmlFilteringInterceptor extends BaseInterceptor
| Constructor and Description |
|---|
HtmlFilteringInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
javax.jcr.Value |
beforeSetValue(JCRNodeWrapper node,
String name,
ExtendedPropertyDefinition definition,
javax.jcr.Value originalValue)
Called before setting the value on the property.
|
javax.jcr.Value[] |
beforeSetValues(JCRNodeWrapper node,
String name,
ExtendedPropertyDefinition definition,
javax.jcr.Value[] originalValues)
Called before setting the value on the property.
|
protected static String |
filterTags(String content,
Set<String> filteredTags,
boolean removeContentBetweenTags)
Filters out configured "unwanted" HTML tags and returns the modified content.
|
void |
setConsiderSiteSettingsForFiltering(boolean considerSiteSettingsForFiltering) |
void |
setFilteredTags(String tagsToFilter) |
void |
setRemoveContentBetweenTags(boolean removeContentBetweenTags)
if set to
true the content between the start and end tag elements will be also removed from the output; otherwise only
start and end tags themselves are removed. |
afterGetValue, afterGetValues, beforeRemove, canApplyOnProperty, equals, getNodeTypes, getPropertyNames, getRequiredTypes, getSelectors, hashCode, setNodeTypes, setPropertyNames, setRequiredTypes, setSelectors, toStringprotected static String filterTags(String content, Set<String> filteredTags, boolean removeContentBetweenTags)
content - the content to be modifiedfilteredTags - the set of tags to be filtered outremoveContentBetweenTags - if set to true the content between the start and end tag elements will be also removed from the output;
otherwise only start and end tags themselves are removed.public 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
PropertyInterceptorbeforeSetValue in interface PropertyInterceptorbeforeSetValue in class BaseInterceptororiginalValue - 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[] 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
PropertyInterceptorbeforeSetValues in interface PropertyInterceptorbeforeSetValues in class BaseInterceptororiginalValues - Original value @return Value to set, or null @throws ValueFormatExceptionjavax.jcr.version.VersionExceptionjavax.jcr.lock.LockExceptionjavax.jcr.nodetype.ConstraintViolationExceptionjavax.jcr.ValueFormatExceptionjavax.jcr.RepositoryExceptionpublic void setConsiderSiteSettingsForFiltering(boolean considerSiteSettingsForFiltering)
public void setFilteredTags(String tagsToFilter)
public void setRemoveContentBetweenTags(boolean removeContentBetweenTags)
true the content between the start and end tag elements will be also removed from the output; otherwise only
start and end tags themselves are removed.removeContentBetweenTags - do we remove the content between tag elements?Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.