Package org.apache.any23.validator
Class DefaultRuleContext
- java.lang.Object
-
- org.apache.any23.validator.DefaultRuleContext
-
- All Implemented Interfaces:
RuleContext<Object>
public class DefaultRuleContext extends Object implements RuleContext<Object>
Default implementation ofRuleContext
.- Author:
- Michele Mostarda (mostarda@fbk.eu), Davide Palmisano (palmisano@fbk.eu)
-
-
Constructor Summary
Constructors Constructor Description DefaultRuleContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getData(String name)
Retrieves a registered object.void
putData(String name, Object value)
Puts a data within the context.void
removeData(String name)
Removes a data from the context.
-
-
-
Method Detail
-
putData
public void putData(String name, Object value)
Description copied from interface:RuleContext
Puts a data within the context.- Specified by:
putData
in interfaceRuleContext<Object>
- Parameters:
name
- rule keyvalue
- rule value
-
getData
public Object getData(String name)
Description copied from interface:RuleContext
Retrieves a registered object.- Specified by:
getData
in interfaceRuleContext<Object>
- Parameters:
name
- rule key- Returns:
- a registered object,
null
if not found.
-
removeData
public void removeData(String name)
Description copied from interface:RuleContext
Removes a data from the context.- Specified by:
removeData
in interfaceRuleContext<Object>
- Parameters:
name
- remove entry with this name
-
-