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.enduser;
20  
21  import java.util.HashMap;
22  import java.util.Map;
23  import org.apache.syncope.client.enduser.pages.BasePage;
24  import org.apache.syncope.client.enduser.panels.Sidebar;
25  import org.apache.syncope.client.ui.commons.CommonUIProperties;
26  import org.springframework.boot.context.properties.ConfigurationProperties;
27  
28  @ConfigurationProperties("enduser")
29  public class EnduserProperties extends CommonUIProperties {
30  
31      private static final long serialVersionUID = 7455729386695110295L;
32  
33      private Class<? extends Sidebar> sidebar = Sidebar.class;
34  
35      private String customFormLayout = "classpath:/customFormLayout.json";
36  
37      private boolean captcha;
38  
39      private boolean reportPropagationErrors;
40  
41      private boolean reportPropagationErrorDetails;
42  
43      private final Map<String, Class<? extends BasePage>> page = new HashMap<>();
44  
45      public Class<? extends Sidebar> getSidebar() {
46          return sidebar;
47      }
48  
49      public void setSidebar(final Class<? extends Sidebar> sidebar) {
50          this.sidebar = sidebar;
51      }
52  
53      public String getCustomFormLayout() {
54          return customFormLayout;
55      }
56  
57      public void setCustomFormLayout(final String customFormLayout) {
58          this.customFormLayout = customFormLayout;
59      }
60  
61      public boolean isCaptcha() {
62          return captcha;
63      }
64  
65      public void setCaptcha(final boolean captcha) {
66          this.captcha = captcha;
67      }
68  
69      public boolean isReportPropagationErrors() {
70          return reportPropagationErrors;
71      }
72  
73      public void setReportPropagationErrors(final boolean reportPropagationErrors) {
74          this.reportPropagationErrors = reportPropagationErrors;
75      }
76  
77      public boolean isReportPropagationErrorDetails() {
78          return reportPropagationErrorDetails;
79      }
80  
81      public void setReportPropagationErrorDetails(final boolean reportPropagationErrorDetails) {
82          this.reportPropagationErrorDetails = reportPropagationErrorDetails;
83      }
84  
85      public Map<String, Class<? extends BasePage>> getPage() {
86          return page;
87      }
88  }