Class StringRightContextConvertor
- java.lang.Object
-
- org.ametys.plugins.core.impl.right.StringRightContextConvertor
-
- All Implemented Interfaces:
RightContextConvertor
,Configurable
public class StringRightContextConvertor extends Object implements RightContextConvertor, Configurable
This RightContextConvertor is just an hardcoded translation from a configured string to another configured string
-
-
Field Summary
Fields Modifier and Type Field Description protected String
_contextToRemove
The context to removeprotected String
_contextToReplaceWith
The context to replace with
-
Constructor Summary
Constructors Constructor Description StringRightContextConvertor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(Configuration configuration)
Set<Object>
convert(Object object)
Converts the object.
-
-
-
Field Detail
-
_contextToRemove
protected String _contextToRemove
The context to remove
-
_contextToReplaceWith
protected String _contextToReplaceWith
The context to replace with
-
-
Constructor Detail
-
StringRightContextConvertor
public StringRightContextConvertor()
-
-
Method Detail
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
convert
public Set<Object> convert(Object object)
Description copied from interface:RightContextConvertor
Converts the object.- Specified by:
convert
in interfaceRightContextConvertor
- Parameters:
object
- The initial object- Returns:
- The converted objects. A non-null set, that does not contains the initial object. So if you do not support the object to convert, you must return an empty set.
-
-