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;
public class PolicyRuleState {
private final String policeRuleId;
private final RuleState ruleState;
public PolicyRuleState(String policeRuleId, RuleState ruleState) {
this.policeRuleId = policeRuleId;
public PolicyRuleState(RuleState ruleState) {
this.ruleState = ruleState;
}
public String getPolicyRuleId() {
return policeRuleId;
}
public RuleState getRuleState() {
return ruleState;
}
@Override
public String toString() {
return String.format(
"%s:{policeRuleId:\"%s\", ruleState:\"%s\"}",
getClass().getSimpleName(), policeRuleId, ruleState);
return String.format("%s:{ruleState:\"%s\"}", getClass().getSimpleName(), ruleState.toString());
}
}
......@@ -17,7 +17,15 @@
package eu.teraflow.policy.model;
public enum RuleState {
POLICY_INACTIVE,
POLICY_PLANNED,
POLICY_ACTIVE
POLICY_UNDEFINED,
POLICY_FAILED,
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