Package org.unidata.mdm.dq.core.context
Class CleanseFunctionContext
- java.lang.Object
-
- org.unidata.mdm.dq.core.context.CleanseFunctionContext
-
public class CleanseFunctionContext extends java.lang.ObjectCleanse function execution context. Describes the environment, within a cleanse function executes. Input parameters can be extracted using methodgetInputParam(String).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCleanseFunctionContext.CleanseFunctionContextBuilder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CleanseFunctionContext.CleanseFunctionContextBuilderbuilder()The usual builder.static CleanseFunctionContext.CleanseFunctionContextBuilderbuilder(CleanseFunctionContext other)Copy builder without params.java.util.LocalegetCurrentLocale()Gets the cleanse function current locale.java.util.Collection<CustomPropertyElement>getCustomProperties()Gets the cleanse function custom properties.java.lang.StringgetFunctionName()Gets the cleanse function name, as defined by the model.CleanseFunctionInputParamgetInputParam(java.lang.String portName)Gets input param by port name.java.util.Collection<CleanseFunctionInputParam>getInputParams()Returns input params as a collection.java.util.Collection<java.lang.String>getInputPorts()Input port names.<T> TgetPayload()Gets the cleanse function payload.java.lang.StringgetRuleName()Gets the name of the rule, being executed.booleanhasInputParams()Returns true, if this result has some input params set.booleanhasPayload()Returns true, if some payload is set.voidinput(java.util.Collection<CleanseFunctionInputParam> params)Puts many cleanse function input params to the cleanse function.voidinput(CleanseFunctionInputParam param)Puts cleanse function input param to the cleanse function.voidinput(CleanseFunctionInputParam... params)Puts many cleanse function input params to the cleanse function.
-
-
-
Method Detail
-
getRuleName
public java.lang.String getRuleName()
Gets the name of the rule, being executed.- Returns:
- the ruleName
-
getFunctionName
public java.lang.String getFunctionName()
Gets the cleanse function name, as defined by the model.- Returns:
- the functionName
-
getCurrentLocale
public java.util.Locale getCurrentLocale()
Gets the cleanse function current locale.- Returns:
- the currentLocale
-
getCustomProperties
public java.util.Collection<CustomPropertyElement> getCustomProperties()
Gets the cleanse function custom properties.- Returns:
- the customProperties
-
getPayload
public <T> T getPayload()
Gets the cleanse function payload.- Type Parameters:
T- the payload type- Returns:
- the payload
-
hasPayload
public boolean hasPayload()
Returns true, if some payload is set.- Returns:
- true, if set
-
getInputParam
@Nullable public CleanseFunctionInputParam getInputParam(java.lang.String portName)
Gets input param by port name.- Parameters:
portName- the port name- Returns:
- param or null
-
getInputParams
public java.util.Collection<CleanseFunctionInputParam> getInputParams()
Returns input params as a collection.- Returns:
- input params as a collection
-
hasInputParams
public boolean hasInputParams()
Returns true, if this result has some input params set.- Returns:
- true if this result has some input params set
-
getInputPorts
public java.util.Collection<java.lang.String> getInputPorts()
Input port names.- Returns:
- names
-
input
public void input(CleanseFunctionInputParam param)
Puts cleanse function input param to the cleanse function.- Parameters:
param- the action to set
-
input
public void input(CleanseFunctionInputParam... params)
Puts many cleanse function input params to the cleanse function.- Parameters:
params- the action to set
-
input
public void input(java.util.Collection<CleanseFunctionInputParam> params)
Puts many cleanse function input params to the cleanse function.- Parameters:
params- the action to set
-
builder
public static CleanseFunctionContext.CleanseFunctionContextBuilder builder(CleanseFunctionContext other)
Copy builder without params.- Parameters:
other- the context- Returns:
- builder
-
builder
public static CleanseFunctionContext.CleanseFunctionContextBuilder builder()
The usual builder.- Returns:
- builder
-
-