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;
20  
21  import java.util.HashMap;
22  import java.util.Map;
23  import org.apache.syncope.common.lib.SyncopeProperties;
24  
25  public abstract class CommonUIProperties extends SyncopeProperties {
26  
27      private static final long serialVersionUID = -4338560769317806322L;
28  
29      private String adminUser = "admin";
30  
31      private boolean xForward = true;
32  
33      private String xForwardProtocolHeader = "X-Forwarded-Proto";
34  
35      private int xForwardHttpPort = 80;
36  
37      private int xForwardHttpsPort = 443;
38  
39      private boolean csrf = true;
40  
41      private int maxUploadFileSizeMB = 5;
42  
43      private long maxWaitTimeOnApplyChanges = 30L;
44  
45      private final Map<String, String> securityHeaders = new HashMap<>();
46  
47      public String getAdminUser() {
48          return adminUser;
49      }
50  
51      public void setAdminUser(final String adminUser) {
52          this.adminUser = adminUser;
53      }
54  
55      public boolean isxForward() {
56          return xForward;
57      }
58  
59      public void setxForward(final boolean xForward) {
60          this.xForward = xForward;
61      }
62  
63      public String getxForwardProtocolHeader() {
64          return xForwardProtocolHeader;
65      }
66  
67      public void setxForwardProtocolHeader(final String xForwardProtocolHeader) {
68          this.xForwardProtocolHeader = xForwardProtocolHeader;
69      }
70  
71      public int getxForwardHttpPort() {
72          return xForwardHttpPort;
73      }
74  
75      public void setxForwardHttpPort(final int xForwardHttpPort) {
76          this.xForwardHttpPort = xForwardHttpPort;
77      }
78  
79      public int getxForwardHttpsPort() {
80          return xForwardHttpsPort;
81      }
82  
83      public void setxForwardHttpsPort(final int xForwardHttpsPort) {
84          this.xForwardHttpsPort = xForwardHttpsPort;
85      }
86  
87      public boolean isCsrf() {
88          return csrf;
89      }
90  
91      public void setCsrf(final boolean csrf) {
92          this.csrf = csrf;
93      }
94  
95      public int getMaxUploadFileSizeMB() {
96          return maxUploadFileSizeMB;
97      }
98  
99      public void setMaxUploadFileSizeMB(final int maxUploadFileSizeMB) {
100         this.maxUploadFileSizeMB = maxUploadFileSizeMB;
101     }
102 
103     public long getMaxWaitTimeOnApplyChanges() {
104         return maxWaitTimeOnApplyChanges;
105     }
106 
107     public void setMaxWaitTimeOnApplyChanges(final long maxWaitTimeOnApplyChanges) {
108         this.maxWaitTimeOnApplyChanges = maxWaitTimeOnApplyChanges;
109     }
110 
111     public Map<String, String> getSecurityHeaders() {
112         return securityHeaders;
113     }
114 }