X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Frest%2Fjpa%2FDecisionSettings.java;h=ccd1052f0cd5fdf1351656db7f2aae3f6ebcfe34;hb=9450c8d0102b9188933b5d26193df754a70a7157;hp=ae362029469026d0b6cbe8ce370ac1f65b3c350d;hpb=79343205a720ef656837275f973de93f1d26b3e9;p=policy%2Fengine.git diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DecisionSettings.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DecisionSettings.java index ae3620294..ccd1052f0 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DecisionSettings.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/DecisionSettings.java @@ -39,10 +39,6 @@ import javax.persistence.Temporal; import javax.persistence.TemporalType; import javax.persistence.Transient; -import org.onap.policy.common.logging.eelf.MessageCodes; -import org.onap.policy.common.logging.eelf.PolicyLogger; -import org.onap.policy.rest.XacmlAdminAuthorization; - @Entity @Table(name="DecisionSettings") @@ -108,25 +104,7 @@ public class DecisionSettings implements Serializable { public void setUserModifiedBy(UserInfo userModifiedBy) { this.userModifiedBy = userModifiedBy; } - - public DecisionSettings() { - //An empty constructor - } - - public DecisionSettings(String domain) { - this.xacmlId = domain; - } - - public DecisionSettings(String domain, String user) { - this(domain); - } - public DecisionSettings(DecisionSettings copy, String user) { - this(copy.getXacmlId() + ":(0)", user); - this.datatypeBean = copy.getDatatypeBean(); - this.description = copy.getDescription(); - - } - + @PrePersist public void prePersist() { Date date = new Date(); @@ -137,11 +115,6 @@ public class DecisionSettings implements Serializable { @PreUpdate public void preUpdate() { this.modifiedDate = new Date(); - try { - this.userModifiedBy = XacmlAdminAuthorization.getUserId(); - } catch (Exception e) { - PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "DecisionSettings", "Exception caused While adding Modified by Role"); - } } public int getId() {