summaryrefslogtreecommitdiffstats
path: root/common-app-api/src/main/java/org/openecomp/sdc/common/datastructure/UserContext.java
diff options
context:
space:
mode:
Diffstat (limited to 'common-app-api/src/main/java/org/openecomp/sdc/common/datastructure/UserContext.java')
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/common/datastructure/UserContext.java74
1 files changed, 74 insertions, 0 deletions
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/datastructure/UserContext.java b/common-app-api/src/main/java/org/openecomp/sdc/common/datastructure/UserContext.java
new file mode 100644
index 0000000000..8dcca6b6e1
--- /dev/null
+++ b/common-app-api/src/main/java/org/openecomp/sdc/common/datastructure/UserContext.java
@@ -0,0 +1,74 @@
+package org.openecomp.sdc.common.datastructure;
+
+
+import java.util.Set;
+
+public class UserContext {
+
+
+ /**
+ * a pojo which holds the business logic layer to be aware of the user context as received in the authentication cookie
+ * Story https://jira.web.labs.att.com/browse/ASDC-232
+ * Author: Idan Agam
+ */
+
+
+ private String userId;
+ private String firstName;
+ private String lastName;
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+ private Set<String> userRoles;
+
+
+ public UserContext(String userId, Set<String> userRoles, String firstName, String lastName) {
+ this.userId = userId;
+ this.userRoles = userRoles;
+ this.firstName = firstName;
+ this.lastName = lastName;
+ }
+
+ public UserContext(String userId) {
+ this.userId = userId;
+ }
+
+ public String getUserId() {
+ return userId;
+ }
+
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+
+ public Set<String> getUserRoles() {
+ return userRoles;
+ }
+
+ public void setUserRoles(Set<String> userRoles) {
+ this.userRoles = userRoles;
+ }
+
+ @Override
+ public String toString() {
+ return "UserContext{" + "userId='" + userId + '\'' + ", firstName='" + firstName + '\'' + ", lastname='" + lastName + '\'' + ", userRoles=" + userRoles + '}';
+ }
+}
+
+
+
+