Package rules
Class AbstractRule
- java.lang.Object
-
- rules.AbstractRule
-
- All Implemented Interfaces:
IRulesDefinition
- Direct Known Subclasses:
MergeSEFF
,NegativeCleanup
,NegativeRule
,NegativeRuleParentChild
,NegativeRuleSame
,ParentChild
,SamePolicy
,SimplerPolicy
,SubstituteParent
public abstract class AbstractRule extends Object implements IRulesDefinition
Implements basic functionality for a Rule, leaving application of rule abstract
-
-
Field Summary
Fields Modifier and Type Field Description protected EList<RulesRecord>
appliedList
protected ContextModelAbstraction
contextModelAbs
protected EList<ErrorRecord>
errorList
protected HierarchicalContextAbstraction
hierarchicalContextAbs
protected ContextSetRecordCompare
recordCompare
-
Constructor Summary
Constructors Constructor Description AbstractRule(ContextModelAbstraction contextModelAbs)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
applyRule(org.palladiosimulator.pcm.confidentiality.context.specification.assembly.MethodSpecification seff)
Abstract method, different implementation depending on rulesetvoid
applyRuleToModel()
For each data element (= SEFF), execute the rule.protected RulesRecord
createRecord(org.palladiosimulator.pcm.confidentiality.context.specification.assembly.MethodSpecification seff, org.palladiosimulator.pcm.confidentiality.context.set.ContextSet remove, org.palladiosimulator.pcm.confidentiality.context.set.ContextSet replacedBy, boolean created)
Create a record for the current rules implementationboolean
executeRule()
Applying a rule is the same for each rule, all information is collected in RulesRecordCollection<? extends ErrorRecord>
getErrors()
int
getNumberOfRecords()
protected boolean
isRemoveNegative()
Should only be true for negativeCleanup
-
-
-
Field Detail
-
errorList
protected EList<ErrorRecord> errorList
-
appliedList
protected EList<RulesRecord> appliedList
-
contextModelAbs
protected ContextModelAbstraction contextModelAbs
-
hierarchicalContextAbs
protected HierarchicalContextAbstraction hierarchicalContextAbs
-
recordCompare
protected ContextSetRecordCompare recordCompare
-
-
Constructor Detail
-
AbstractRule
public AbstractRule(ContextModelAbstraction contextModelAbs)
-
-
Method Detail
-
applyRule
public abstract boolean applyRule(org.palladiosimulator.pcm.confidentiality.context.specification.assembly.MethodSpecification seff)
Abstract method, different implementation depending on ruleset- Parameters:
seff
-- Returns:
-
getNumberOfRecords
public int getNumberOfRecords()
- Specified by:
getNumberOfRecords
in interfaceIRulesDefinition
-
getErrors
public Collection<? extends ErrorRecord> getErrors()
- Specified by:
getErrors
in interfaceIRulesDefinition
-
applyRuleToModel
public void applyRuleToModel()
For each data element (= SEFF), execute the rule. If applicable, rulesrecord is created- Specified by:
applyRuleToModel
in interfaceIRulesDefinition
-
executeRule
public boolean executeRule()
Applying a rule is the same for each rule, all information is collected in RulesRecord- Specified by:
executeRule
in interfaceIRulesDefinition
-
isRemoveNegative
protected boolean isRemoveNegative()
Should only be true for negativeCleanup- Returns:
- true if the rule also removes context sets from negative policies
-
createRecord
protected RulesRecord createRecord(org.palladiosimulator.pcm.confidentiality.context.specification.assembly.MethodSpecification seff, org.palladiosimulator.pcm.confidentiality.context.set.ContextSet remove, org.palladiosimulator.pcm.confidentiality.context.set.ContextSet replacedBy, boolean created)
Create a record for the current rules implementation- Parameters:
seff
-remove
-replacedBy
-created
-- Returns:
-
-