Package org.nuxeo.ecm.core.filter
Class CharacterFilteringServiceImpl
- java.lang.Object
-
- org.nuxeo.runtime.model.DefaultComponent
-
- org.nuxeo.ecm.core.filter.CharacterFilteringServiceImpl
-
- All Implemented Interfaces:
CharacterFilteringService
,Adaptable
,Component
,Extensible
,TimestampedService
public class CharacterFilteringServiceImpl extends DefaultComponent implements CharacterFilteringService
- Since:
- 9.1
-
-
Field Summary
Fields Modifier and Type Field Description protected com.google.common.base.CharMatcher
charsToRemove
protected CharacterFilteringServiceDescriptor
desc
static String
FILTERING_XP
-
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
-
Constructor Summary
Constructors Constructor Description CharacterFilteringServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
filter(String value)
Removes all disallowed characters from the input value.void
filter(DocumentModel docModel)
Removes all disallowed characters from the dirty document properties.void
registerContribution(Object contrib, String point, ComponentInstance contributor)
-
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterContribution, unregisterExtension
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.runtime.model.Component
applicationStarted, getApplicationStartedOrder
-
-
-
-
Field Detail
-
FILTERING_XP
public static final String FILTERING_XP
- See Also:
- Constant Field Values
-
desc
protected CharacterFilteringServiceDescriptor desc
-
charsToRemove
protected com.google.common.base.CharMatcher charsToRemove
-
-
Constructor Detail
-
CharacterFilteringServiceImpl
public CharacterFilteringServiceImpl()
-
-
Method Detail
-
registerContribution
public void registerContribution(Object contrib, String point, ComponentInstance contributor)
- Overrides:
registerContribution
in classDefaultComponent
-
filter
public String filter(String value)
Description copied from interface:CharacterFilteringService
Removes all disallowed characters from the input value.- Specified by:
filter
in interfaceCharacterFilteringService
- Parameters:
value
- the value to filter- Returns:
- the filtered value
-
filter
public void filter(DocumentModel docModel)
Description copied from interface:CharacterFilteringService
Removes all disallowed characters from the dirty document properties.- Specified by:
filter
in interfaceCharacterFilteringService
- Parameters:
docModel
- the document to filter
-
-