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.client.console.layout;
20  
21  import com.fasterxml.jackson.annotation.JsonAnyGetter;
22  import com.fasterxml.jackson.annotation.JsonAnySetter;
23  import com.fasterxml.jackson.annotation.JsonProperty;
24  import java.io.Serializable;
25  import java.util.HashMap;
26  import java.util.Map;
27  import org.apache.syncope.client.console.SyncopeWebApplication;
28  
29  public class AnyLayout implements Serializable {
30  
31      private static final long serialVersionUID = 488645029994410970L;
32  
33      private String anyPanelClass;
34  
35      @JsonProperty("USER")
36      private UserFormLayoutInfo user;
37  
38      @JsonProperty("GROUP")
39      private GroupFormLayoutInfo group;
40  
41      private final Map<String, AnyObjectFormLayoutInfo> anyObjects = new HashMap<>();
42  
43      public AnyLayout() {
44          this.anyPanelClass = SyncopeWebApplication.get().getDefaultAnyPanelClass();
45      }
46  
47      public String getAnyPanelClass() {
48          return anyPanelClass;
49      }
50  
51      public void setAnyPanelClass(final String anyPanelClass) {
52          this.anyPanelClass = anyPanelClass;
53      }
54  
55      public UserFormLayoutInfo getUser() {
56          return user;
57      }
58  
59      public void setUser(final UserFormLayoutInfo user) {
60          this.user = user;
61      }
62  
63      public GroupFormLayoutInfo getGroup() {
64          return group;
65      }
66  
67      public void setGroup(final GroupFormLayoutInfo group) {
68          this.group = group;
69      }
70  
71      @JsonAnyGetter
72      public Map<String, AnyObjectFormLayoutInfo> getAnyObjects() {
73          return anyObjects;
74      }
75  
76      @JsonAnySetter
77      public void setAnyObjects(final String anyType, final AnyObjectFormLayoutInfo layoutInfo) {
78          anyObjects.put(anyType, layoutInfo);
79      }
80  }