Catalog alignment
[sdc.git] / common-app-api / src / main / java / org / openecomp / sdc / common / datastructure / UserContext.java
1 package org.openecomp.sdc.common.datastructure;
2
3
4 import java.util.Set;
5
6 public class UserContext {
7
8
9     /**
10      * a pojo which holds the business logic layer to be aware of the user context as received in the authentication cookie
11      * Story https://jira.web.labs.att.com/browse/ASDC-232
12      * Author: Idan Agam
13      */
14
15
16     private String userId;
17     private String firstName;
18     private String lastName;
19
20     public String getFirstName() {
21         return firstName;
22     }
23
24     public void setFirstName(String firstName) {
25         this.firstName = firstName;
26     }
27
28     public String getLastName() {
29         return lastName;
30     }
31
32     public void setLastName(String lastName) {
33         this.lastName = lastName;
34     }
35
36     private Set<String> userRoles;
37
38
39     public UserContext(String userId, Set<String> userRoles, String firstName, String lastName) {
40         this.userId = userId;
41         this.userRoles = userRoles;
42         this.firstName = firstName;
43         this.lastName = lastName;
44     }
45
46     public UserContext(String userId) {
47         this.userId = userId;
48     }
49
50     public String getUserId() {
51         return userId;
52     }
53
54     public void setUserId(String userId) {
55         this.userId = userId;
56     }
57
58     public Set<String> getUserRoles() {
59         return userRoles;
60     }
61
62     public void setUserRoles(Set<String> userRoles) {
63         this.userRoles = userRoles;
64     }
65
66     @Override
67     public String toString() {
68         return "UserContext{" + "userId='" + userId + '\'' + ", firstName='" + firstName + '\'' + ", lastname='" + lastName + '\'' + ", userRoles=" + userRoles + '}';
69     }
70 }
71
72
73
74