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;
20  
21  import java.io.Serializable;
22  import java.util.HashMap;
23  import java.util.Map;
24  import org.apache.syncope.client.console.pages.BasePage;
25  import org.apache.syncope.client.console.panels.AnyPanel;
26  import org.apache.syncope.client.ui.commons.CommonUIProperties;
27  import org.springframework.boot.context.properties.ConfigurationProperties;
28  
29  @ConfigurationProperties("console")
30  public class ConsoleProperties extends CommonUIProperties {
31  
32      private static final long serialVersionUID = -6444470724127309370L;
33  
34      public static class Topology implements Serializable {
35  
36          private static final long serialVersionUID = -4530238696048859905L;
37  
38          private int corePoolSize = 10;
39  
40          private int maxPoolSize = 20;
41  
42          private int queueCapacity = 50;
43  
44          public int getCorePoolSize() {
45              return corePoolSize;
46          }
47  
48          public void setCorePoolSize(final int corePoolSize) {
49              this.corePoolSize = corePoolSize;
50          }
51  
52          public int getMaxPoolSize() {
53              return maxPoolSize;
54          }
55  
56          public void setMaxPoolSize(final int maxPoolSize) {
57              this.maxPoolSize = maxPoolSize;
58          }
59  
60          public int getQueueCapacity() {
61              return queueCapacity;
62          }
63  
64          public void setQueueCapacity(final int queueCapacity) {
65              this.queueCapacity = queueCapacity;
66          }
67      }
68  
69      private final Map<String, Class<? extends BasePage>> page = new HashMap<>();
70  
71      private String defaultAnyPanelClass = AnyPanel.class.getName();
72  
73      private int realmsFullTreeThreshold = 20;
74  
75      private final Topology topology = new Topology();
76  
77      public Map<String, Class<? extends BasePage>> getPage() {
78          return page;
79      }
80  
81      public String getDefaultAnyPanelClass() {
82          return defaultAnyPanelClass;
83      }
84  
85      public void setDefaultAnyPanelClass(final String defaultAnyPanelClass) {
86          this.defaultAnyPanelClass = defaultAnyPanelClass;
87      }
88  
89      public int getRealmsFullTreeThreshold() {
90          return realmsFullTreeThreshold;
91      }
92  
93      public void setRealmsFullTreeThreshold(final int realmsFullTreeThreshold) {
94          this.realmsFullTreeThreshold = realmsFullTreeThreshold;
95      }
96  
97      public Topology getTopology() {
98          return topology;
99      }
100 }