View Javadoc

1   /*
2    * SymmetricDS is an open source database synchronization solution.
3    *   
4    * Copyright (C) Chris Henson <chenson42@users.sourceforge.net>
5    *
6    * This library is free software; you can redistribute it and/or
7    * modify it under the terms of the GNU Lesser General Public
8    * License as published by the Free Software Foundation; either
9    * version 3 of the License, or (at your option) any later version.
10   *
11   * This library is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14   * Lesser General Public License for more details.
15   *
16   * You should have received a copy of the GNU Lesser General Public
17   * License along with this library; if not, see
18   * <http://www.gnu.org/licenses/>.
19   */
20  
21  package org.jumpmind.symmetric.service;
22  
23  import java.math.BigDecimal;
24  import java.util.Date;
25  import java.util.Map;
26  
27  import org.jumpmind.symmetric.config.IParameterFilter;
28  
29  /***
30   * Get and set application wide configuration information.
31   */
32  public interface IParameterService {
33  
34      public static final String ALL = "ALL";
35  
36      public BigDecimal getDecimal(String key);
37  
38      public boolean is(String key);
39  
40      public int getInt(String key);
41  
42      public long getLong(String key);
43  
44      public String getString(String key);
45  
46      public void saveParameter(String key, Object paramValue);
47  
48      public void saveParameter(String nodeId, String nodeGroupId, String key, Object paramValue);
49  
50      public void saveParameters(String nodeId, String nodeGroupId, Map<String, Object> parameters);
51  
52      public void rereadParameters();
53  
54      public Date getLastTimeParameterWereCached();
55  
56      public Map<String, String> getAllParameters();
57  
58      public void setParameterFilter(IParameterFilter f);
59  
60      /***
61       * Get the group id for this instance
62       */
63      public String getNodeGroupId();
64  
65      /***
66       * Get the external id for this instance
67       */
68      public String getExternalId();
69  
70      /***
71       * Provide the url used to register at to get initial configuration
72       * information
73       */
74      public String getRegistrationUrl();
75  
76      /***
77       * Provide information about the URL used to contact this symmetric instance
78       */
79      public String getMyUrl();
80  
81  }