Skip to content
Snippets Groups Projects
Commit f8015e34 authored by Fotis Soldatos's avatar Fotis Soldatos
Browse files

refactor(policy): refactor policy related domain models

parent 30af00f2
No related branches found
No related tags found
1 merge request!54Release 2.0.0
...@@ -18,26 +18,18 @@ package eu.teraflow.policy.model; ...@@ -18,26 +18,18 @@ package eu.teraflow.policy.model;
public class PolicyRuleState { public class PolicyRuleState {
private final String policeRuleId;
private final RuleState ruleState; private final RuleState ruleState;
public PolicyRuleState(String policeRuleId, RuleState ruleState) { public PolicyRuleState(RuleState ruleState) {
this.policeRuleId = policeRuleId;
this.ruleState = ruleState; this.ruleState = ruleState;
} }
public String getPolicyRuleId() {
return policeRuleId;
}
public RuleState getRuleState() { public RuleState getRuleState() {
return ruleState; return ruleState;
} }
@Override @Override
public String toString() { public String toString() {
return String.format( return String.format("%s:{ruleState:\"%s\"}", getClass().getSimpleName(), ruleState.toString());
"%s:{policeRuleId:\"%s\", ruleState:\"%s\"}",
getClass().getSimpleName(), policeRuleId, ruleState);
} }
} }
...@@ -17,7 +17,15 @@ ...@@ -17,7 +17,15 @@
package eu.teraflow.policy.model; package eu.teraflow.policy.model;
public enum RuleState { public enum RuleState {
POLICY_INACTIVE, POLICY_UNDEFINED,
POLICY_PLANNED, POLICY_FAILED,
POLICY_ACTIVE POLICY_INSERTED,
POLICY_VALIDATED,
POLICY_PROVISIONED,
POLICY_ACTIVE,
POLICY_ENFORCED,
POLICY_INEFFECTIVE,
POLICY_EFFECTIVE,
POLICY_UPDATED,
POLICY_REMOVED
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment