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 SCIMUserNameConf implements Serializable {
28  
29      private static final long serialVersionUID = -2256008193008290376L;
30  
31      private String formatted;
32  
33      private String familyName;
34  
35      private String givenName;
36  
37      private String middleName;
38  
39      private String honorificPrefix;
40  
41      private String honorificSuffix;
42  
43      @JsonIgnore
44      public Map<String, String> asMap() {
45          Map<String, String> map = new HashMap<>();
46  
47          if (formatted != null) {
48              map.put("formatted", formatted);
49          }
50          if (familyName != null) {
51              map.put("familyName", familyName);
52          }
53          if (givenName != null) {
54              map.put("givenName", givenName);
55          }
56          if (middleName != null) {
57              map.put("middleName", middleName);
58          }
59          if (honorificPrefix != null) {
60              map.put("honorificPrefix", honorificPrefix);
61          }
62          if (honorificSuffix != null) {
63              map.put("honorificSuffix", honorificSuffix);
64          }
65  
66          return Collections.unmodifiableMap(map);
67      }
68  
69      public String getFormatted() {
70          return formatted;
71      }
72  
73      public void setFormatted(final String formatted) {
74          this.formatted = formatted;
75      }
76  
77      public String getFamilyName() {
78          return familyName;
79      }
80  
81      public void setFamilyName(final String familyName) {
82          this.familyName = familyName;
83      }
84  
85      public String getGivenName() {
86          return givenName;
87      }
88  
89      public void setGivenName(final String givenName) {
90          this.givenName = givenName;
91      }
92  
93      public String getMiddleName() {
94          return middleName;
95      }
96  
97      public void setMiddleName(final String middleName) {
98          this.middleName = middleName;
99      }
100 
101     public String getHonorificPrefix() {
102         return honorificPrefix;
103     }
104 
105     public void setHonorificPrefix(final String honorificPrefix) {
106         this.honorificPrefix = honorificPrefix;
107     }
108 
109     public String getHonorificSuffix() {
110         return honorificSuffix;
111     }
112 
113     public void setHonorificSuffix(final String honorificSuffix) {
114         this.honorificSuffix = honorificSuffix;
115     }
116 
117 }