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 PluginGenericReplacerRetVal
A placeholder plugin result when the plugin could not resolve the placeholder.static PluginGenericReplacerRetVal
replacementSuccess
(String replacedValue) A placeholder plugin result when the plugin could resolve the placeholder.
-
Constructor Details
-
PluginGenericReplacerRetVal
Deprecated.This uses theEPluginReplacementStatus.LEGACY
behavior. 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:IPluginGenericReplacerRetVal
The 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:
getReplacedValue
in interfaceIPluginFormReplacerRetVal
- Specified by:
getReplacedValue
in interfaceIPluginGenericReplacerRetVal
- Specified by:
getReplacedValue
in interfaceIPluginSessionReplacerRetVal
- Specified by:
getReplacedValue
in interfaceIPluginSystemReplacerRetVal
- Specified by:
getReplacedValue
in 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
; otherwisenull
is treated as the empty string.
-
getReplacementStatus
Description copied from interface:IPluginGenericReplacerRetVal
The 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:
getReplacementStatus
in 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.null
is 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.LEGACY
behavior.