Code Review
/
policy
/
engine.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Added Junis for Policy ONAP-REST
[policy/engine.git]
/
ONAP-REST
/
src
/
main
/
java
/
org
/
onap
/
policy
/
rest
/
jpa
/
OnapName.java
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
66ee346
..
d817f20
100644
(file)
--- 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
* ================================================================================
* ============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.
* ================================================================================
* 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 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")
@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;
public class OnapName implements Serializable {
private static final long serialVersionUID = 1L;
- private static String domain;
-
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name="id")
@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 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() {
@PrePersist
public void prePersist() {
@@
-118,11
+100,6
@@
public class OnapName implements Serializable {
@PreUpdate
public void preUpdate() {
this.modifiedDate = new Date();
@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;
}
public String getOnapName() {
return this.onapName;