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 ObjectgetData(String name)Retrieves a registered object.voidputData(String name, Object value)Puts a data within the context.voidremoveData(String name)Removes a data from the context.
-
-
-
Method Detail
-
putData
public void putData(String name, Object value)
Description copied from interface:RuleContextPuts a data within the context.- Specified by:
putDatain interfaceRuleContext<Object>- Parameters:
name- rule keyvalue- rule value
-
getData
public Object getData(String name)
Description copied from interface:RuleContextRetrieves a registered object.- Specified by:
getDatain interfaceRuleContext<Object>- Parameters:
name- rule key- Returns:
- a registered object,
nullif not found.
-
removeData
public void removeData(String name)
Description copied from interface:RuleContextRemoves a data from the context.- Specified by:
removeDatain interfaceRuleContext<Object>- Parameters:
name- remove entry with this name
-
-