/
IParameterService.java
113 lines (77 loc) · 3.43 KB
/
IParameterService.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/**
* Licensed to JumpMind Inc under one or more contributor
* license agreements. See the NOTICE file distributed
* with this work for additional information regarding
* copyright ownership. JumpMind Inc licenses this file
* to you under the GNU General Public License, version 3.0 (GPLv3)
* (the "License"); you may not use this file except in compliance
* with the License.
*
* You should have received a copy of the GNU General Public License,
* version 3.0 (GPLv3) along with this library; if not, see
* <http://www.gnu.org/licenses/>.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jumpmind.symmetric.service;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.jumpmind.properties.TypedProperties;
import org.jumpmind.symmetric.config.IParameterFilter;
import org.jumpmind.symmetric.model.DatabaseParameter;
/**
* Get and set application wide configuration information.
*/
public interface IParameterService {
public BigDecimal getDecimal(String key);
public BigDecimal getDecimal(String key, BigDecimal defaulVal);
public boolean is(String key);
public boolean is(String key, boolean defaultVal);
public int getInt(String key);
public int getInt(String key, int defaultVal);
public long getLong(String key);
public long getLong(String key, long defaultVal);
public String getString(String key);
public String getString(String key, String defaultVal);
public void saveParameter(String key, Object paramValue, String lastUpdateBy);
public void saveParameter(String externalId, String nodeGroupId, String key, Object paramValue, String lastUpdateBy);
public void saveParameters(String externalId, String nodeGroupId, Map<String, Object> parameters, String lastUpdateBy);
public void deleteParameter(String externalId, String nodeGroupId, String key);
public void rereadParameters();
public Date getLastTimeParameterWereCached();
public List<DatabaseParameter> getDatabaseParametersFor(String paramKey);
public TypedProperties getDatabaseParametersByNodeGroupId(String nodeGroupId);
public TypedProperties getDatabaseParametersByExternalId(String externalId);
public TypedProperties getAllParameters();
public void setParameterFilter(IParameterFilter f);
public boolean isRegistrationServer();
public boolean refreshFromDatabase();
/**
* Get the group id for this instance
*/
public String getNodeGroupId();
/**
* Get the external id for this instance
*/
public String getExternalId();
public Map<String,String> getReplacementValues();
/**
* Provide the url used to register at to get initial configuration
* information
*/
public String getRegistrationUrl();
/**
* Provide information about the URL used to contact this symmetric instance
*/
public String getSyncUrl();
public String getTablePrefix();
public String getEngineName();
public String getTempDirectory();
}