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.ui.commons.layout;
20  
21  import java.io.Serializable;
22  import org.apache.syncope.client.ui.commons.wizards.any.AnyForm;
23  import org.apache.syncope.common.lib.to.AnyTO;
24  
25  public abstract class AbstractAnyFormBaseLayout<A extends AnyTO, F extends AnyForm<A>> implements Serializable {
26  
27      private static final long serialVersionUID = -6061683026789976508L;
28  
29      private Class<? extends F> formClass;
30  
31      private boolean auxClasses = true;
32  
33      private boolean groups = true;
34  
35      private boolean plainAttrs = true;
36  
37      private boolean derAttrs = true;
38  
39      private boolean virAttrs = true;
40  
41      private boolean resources = true;
42  
43      protected abstract Class<? extends F> getDefaultFormClass();
44  
45      public Class<? extends F> getFormClass() {
46          return formClass == null ? getDefaultFormClass() : formClass;
47      }
48  
49      public void setFormClass(final Class<? extends F> formClass) {
50          this.formClass = formClass;
51      }
52  
53      public boolean isAuxClasses() {
54          return auxClasses;
55      }
56  
57      public void setAuxClasses(final boolean auxClasses) {
58          this.auxClasses = auxClasses;
59      }
60  
61      public boolean isGroups() {
62          return groups;
63      }
64  
65      public void setGroups(final boolean groups) {
66          this.groups = groups;
67      }
68  
69      public boolean isPlainAttrs() {
70          return plainAttrs;
71      }
72  
73      public void setPlainAttrs(final boolean plainAttrs) {
74          this.plainAttrs = plainAttrs;
75      }
76  
77      public boolean isDerAttrs() {
78          return derAttrs;
79      }
80  
81      public void setDerAttrs(final boolean derAttrs) {
82          this.derAttrs = derAttrs;
83      }
84  
85      public boolean isVirAttrs() {
86          return virAttrs;
87      }
88  
89      public void setVirAttrs(final boolean virAttrs) {
90          this.virAttrs = virAttrs;
91      }
92  
93      public boolean isResources() {
94          return resources;
95      }
96  
97      public void setResources(final boolean resources) {
98          this.resources = resources;
99      }
100 }