View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.syncope.common.lib.scim;
20  
21  import com.fasterxml.jackson.annotation.JsonIgnore;
22  import java.io.Serializable;
23  import java.util.Collections;
24  import java.util.HashMap;
25  import java.util.Map;
26  
27  public class SCIMEnterpriseUserConf implements Serializable {
28  
29      private static final long serialVersionUID = 5929414914887282638L;
30  
31      private String employeeNumber;
32  
33      private String costCenter;
34  
35      private String organization;
36  
37      private String division;
38  
39      private String department;
40  
41      private SCIMManagerConf manager;
42  
43      @JsonIgnore
44      public Map<String, String> asMap() {
45          Map<String, String> map = new HashMap<>();
46  
47          if (employeeNumber != null) {
48              map.put("employeeNumber", employeeNumber);
49          }
50          if (costCenter != null) {
51              map.put("costCenter", costCenter);
52          }
53          if (organization != null) {
54              map.put("organization", organization);
55          }
56          if (division != null) {
57              map.put("division", division);
58          }
59          if (department != null) {
60              map.put("department", department);
61          }
62  
63          return Collections.unmodifiableMap(map);
64      }
65  
66      public String getEmployeeNumber() {
67          return employeeNumber;
68      }
69  
70      public void setEmployeeNumber(final String employeeNumber) {
71          this.employeeNumber = employeeNumber;
72      }
73  
74      public String getCostCenter() {
75          return costCenter;
76      }
77  
78      public void setCostCenter(final String costCenter) {
79          this.costCenter = costCenter;
80      }
81  
82      public String getOrganization() {
83          return organization;
84      }
85  
86      public void setOrganization(final String organization) {
87          this.organization = organization;
88      }
89  
90      public String getDivision() {
91          return division;
92      }
93  
94      public void setDivision(final String division) {
95          this.division = division;
96      }
97  
98      public String getDepartment() {
99          return department;
100     }
101 
102     public void setDepartment(final String department) {
103         this.department = department;
104     }
105 
106     public SCIMManagerConf getManager() {
107         return manager;
108     }
109 
110     public void setManager(final SCIMManagerConf manager) {
111         this.manager = manager;
112     }
113 }