X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=blobdiff_plain;f=ONAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Frest%2Fjpa%2FOnapName.java;fp=ONAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Frest%2Fjpa%2FOnapName.java;h=d817f20788de0b04621a23b0a22798dbb569af23;hp=66ee346e13f22d83b646daf30fb506933c043f5d;hb=9450c8d0102b9188933b5d26193df754a70a7157;hpb=79343205a720ef656837275f973de93f1d26b3e9 diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/OnapName.java b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/OnapName.java index 66ee346e1..d817f2078 100644 --- a/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/OnapName.java +++ b/ONAP-REST/src/main/java/org/onap/policy/rest/jpa/OnapName.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP-REST * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,10 +39,6 @@ import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; -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="OnapName") @@ -50,8 +46,6 @@ import org.onap.policy.rest.XacmlAdminAuthorization; public class OnapName implements Serializable { private static final long serialVersionUID = 1L; - private static String domain; - @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name="id") @@ -95,18 +89,6 @@ public class OnapName implements Serializable { public void setUserModifiedBy(UserInfo userModifiedBy) { this.userModifiedBy = userModifiedBy; } - - public OnapName() { - //An empty constructor - } - - public OnapName(String string, String userid) { - this(domain); - } - - public OnapName(String domain) { - this.onapName = domain; - } @PrePersist public void prePersist() { @@ -118,11 +100,6 @@ public class OnapName implements Serializable { @PreUpdate public void preUpdate() { this.modifiedDate = new Date(); - try { - this.userModifiedBy =XacmlAdminAuthorization.getUserId(); - } catch (Exception e) { - PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "OnapName", "Exception caused While adding Modified by Role"); - } } public String getOnapName() { return this.onapName;