|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lumis.service.portalmanagement.audit.StringReplacePostLoadProcessor
public class StringReplacePostLoadProcessor
A post load processor that replaces strings in the fields of the source. The StringReplacePostLoadProcessor uses 3 parameters: - from the string that will be replaced - to the string that will replace - fieldId the field id where the replace will occur StringReplacePostLoadProcessor has some constants. To use them, the attribute useConstant must be used with true and the parameter's value must be the constant name.
Example usage:
Example to use StringReplacePostLoadProcessor's constants:
Nested Class Summary | |
---|---|
static class |
StringReplacePostLoadProcessor.StringConstant
Enum containing the constants. |
Constructor Summary | |
---|---|
StringReplacePostLoadProcessor()
|
Method Summary | |
---|---|
void |
processSource(SessionConfig sessionConfig,
Source source,
Node parametersNode,
ITransaction transaction)
|
protected String |
readParameterValue(String parameterName,
Node parametersNode)
Reads the value of a given parameter using its name. |
protected void |
replaceStrings(Source<?> source,
String fieldId,
String from,
String to)
Replace the from string by the to string in a field of a source. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringReplacePostLoadProcessor()
Method Detail |
---|
public void processSource(SessionConfig sessionConfig, Source source, Node parametersNode, ITransaction transaction) throws PortalException
processSource
in interface IPostLoadProcessor
PortalException
protected String readParameterValue(String parameterName, Node parametersNode) throws PortalException
parameterName
- parameter's name.parametersNode
- parent node.
PortalException
- whenever an error occur.protected void replaceStrings(Source<?> source, String fieldId, String from, String to) throws PortalException
source
- the source instance.fieldId
- the id of the desired field.from
- the string that will be replaced.to
- the string that will replace.
PortalException
- whenever an error occur.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |