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>appliedListprotected ContextModelAbstractioncontextModelAbsprotected EList<ErrorRecord>errorListprotected HierarchicalContextAbstractionhierarchicalContextAbsprotected ContextSetRecordComparerecordCompare
-
Constructor Summary
Constructors Constructor Description AbstractRule(ContextModelAbstraction contextModelAbs)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleanapplyRule(org.palladiosimulator.pcm.confidentiality.context.specification.assembly.MethodSpecification seff)Abstract method, different implementation depending on rulesetvoidapplyRuleToModel()For each data element (= SEFF), execute the rule.protected RulesRecordcreateRecord(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 implementationbooleanexecuteRule()Applying a rule is the same for each rule, all information is collected in RulesRecordCollection<? extends ErrorRecord>getErrors()intgetNumberOfRecords()protected booleanisRemoveNegative()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:
getNumberOfRecordsin interfaceIRulesDefinition
-
getErrors
public Collection<? extends ErrorRecord> getErrors()
- Specified by:
getErrorsin interfaceIRulesDefinition
-
applyRuleToModel
public void applyRuleToModel()
For each data element (= SEFF), execute the rule. If applicable, rulesrecord is created- Specified by:
applyRuleToModelin interfaceIRulesDefinition
-
executeRule
public boolean executeRule()
Applying a rule is the same for each rule, all information is collected in RulesRecord- Specified by:
executeRulein 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:
-
-