Class PluginGenericReplacerRetVal
java.lang.Object
de.xima.fc.plugin.models.retval.replacer.PluginGenericReplacerRetVal
- All Implemented Interfaces:
IPluginReturnValue,IPluginFormReplacerRetVal,IPluginGenericReplacerRetVal,IPluginSessionReplacerRetVal,IPluginSystemReplacerRetVal,IPluginTemplateReplacerRetVal
public class PluginGenericReplacerRetVal
extends Object
implements IPluginFormReplacerRetVal, IPluginSessionReplacerRetVal, IPluginSystemReplacerRetVal, IPluginTemplateReplacerRetVal
Default POJO implementation of
IPluginFormReplacerRetVal, IPluginSessionReplacerRetVal,
IPluginSystemReplacerRetVal, IPluginTemplateReplacerRetVal.- Author:
- XIMA MEDIA GmbH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe value that should be used as the replacement for the placeholder.The status indicating whether the placeholder could be resolved.static PluginGenericReplacerRetValA placeholder plugin result when the plugin could not resolve the placeholder.static PluginGenericReplacerRetValreplacementSuccess(String replacedValue) A placeholder plugin result when the plugin could resolve the placeholder.
-
Constructor Details
-
PluginGenericReplacerRetVal
Deprecated.This uses theEPluginReplacementStatus.LEGACYbehavior. Use eitherreplacementSuccess(String)orreplacementFailure().- Parameters:
replacedValue- The resolved value of the placeholder. In case this value equals the placeholder content, that is treated as if the plugin could not resolve the placeholder.
-
-
Method Details
-
getReplacedValue
Description copied from interface:IPluginGenericReplacerRetValThe value that should be used as the replacement for the placeholder. This must be just the value, without any placeholder-specific prefixes or suffixes.Also, a plugin may not want to handle all placeholders and delegate some placeholders to other plugins or to the default placeholder replacer. Return the name of the placeholder as the replaced value to indicate that the plugin cannot (or does not with to) handle that placeholder.
- Specified by:
getReplacedValuein interfaceIPluginFormReplacerRetVal- Specified by:
getReplacedValuein interfaceIPluginGenericReplacerRetVal- Specified by:
getReplacedValuein interfaceIPluginSessionReplacerRetVal- Specified by:
getReplacedValuein interfaceIPluginSystemReplacerRetVal- Specified by:
getReplacedValuein interfaceIPluginTemplateReplacerRetVal- Returns:
- The value to be used as the replacement for the placeholder. When this returns
null: The placeholder is considered not resolved ifIPluginGenericReplacerRetVal.getReplacementStatus()isLEGACY; otherwisenullis treated as the empty string.
-
getReplacementStatus
Description copied from interface:IPluginGenericReplacerRetValThe status indicating whether the placeholder could be resolved. If it could be resolved, theIPluginGenericReplacerRetVal.getReplacedValue()is used as the replacement for the placeholder. If it could not be resolved, other placeholder plugin are tried, and if none of those plugins could resolve the placeholder, the default placeholder replacer is used.- Specified by:
getReplacementStatusin interfaceIPluginGenericReplacerRetVal- Returns:
- Whether the placeholder could be resolved.
-
replacementSuccess
A placeholder plugin result when the plugin could resolve the placeholder. The placeholder is replaced with the given value.- Parameters:
replacedValue- The resolved value of the placeholder.nullis treated as if the empty string had been passed.- Returns:
- A placeholder plugin result when the plugin could resolve the placeholder.
-
replacementFailure
A placeholder plugin result when the plugin could not resolve the placeholder. Other placeholder plugins and the default placeholder replacer are tried instead.- Returns:
- A placeholder plugin result when the plugin could not resolve the placeholder.
-
EPluginReplacementStatus.LEGACYbehavior.