View Javadoc

1   /*
2    * SymmetricDS is an open source database synchronization solution.
3    *   
4    * Copyright (C) Chris Henson <chenson42@users.sourceforge.net>,
5    *               Eric Long <erilong@users.sourceforge.net>
6    *
7    * This library is free software; you can redistribute it and/or
8    * modify it under the terms of the GNU Lesser General Public
9    * License as published by the Free Software Foundation; either
10   * version 3 of the License, or (at your option) any later version.
11   *
12   * This library is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15   * Lesser General Public License for more details.
16   *
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this library; if not, see
19   * <http://www.gnu.org/licenses/>.
20   */
21  
22  package org.jumpmind.symmetric.service;
23  
24  import java.util.List;
25  import java.util.Map;
26  
27  import org.jumpmind.symmetric.model.Channel;
28  import org.jumpmind.symmetric.model.DataEventAction;
29  import org.jumpmind.symmetric.model.NodeChannel;
30  import org.jumpmind.symmetric.model.NodeGroupLink;
31  import org.jumpmind.symmetric.model.Trigger;
32  import org.jumpmind.symmetric.model.TriggerHistory;
33  
34  /***
35   * Provides an API to configure data synchronizations.
36   */
37  public interface IConfigurationService {
38  
39      public List<NodeGroupLink> getGroupLinks();
40  
41      public List<NodeGroupLink> getGroupLinksFor(String sourceGroupId);
42  
43      public List<String> getRootConfigChannelTableNames();
44  
45      public void saveChannel(Channel channel);
46  
47      public void deleteChannel(Channel channel);
48  
49      public DataEventAction getDataEventActionsByGroupId(String sourceGroupId, String targetGroupId);
50  
51      public Map<String, List<Trigger>> getTriggersByChannelFor(String configurationTypeId);
52  
53      public void inactivateTriggerHistory(TriggerHistory history);
54  
55      public TriggerHistory getLatestHistoryRecordFor(int triggerId);
56  
57      public List<NodeChannel> getChannels();
58      
59      public void flushChannels();
60      
61      public List<NodeChannel> getChannelsFor(boolean failIfTableDoesNotExist);
62  
63      public List<Trigger> getActiveTriggersForSourceNodeGroup(String sourceNodeGroupId);
64  
65      public List<Trigger> getActiveTriggersForReload(String sourceNodeGroupId, String targetNodeGroupId);
66  
67      public List<Trigger> getInactiveTriggersForSourceNodeGroup(String sourceNodeGroupId);
68  
69      public TriggerHistory getHistoryRecordFor(int auditId);
70  
71      public Trigger getTriggerFor(String table, String sourceNodeGroupId);
72  
73      public Trigger getTriggerForTarget(String table, String sourceNodeGroupId, String targetDomainName, String channel);
74  
75      public Trigger getTriggerById(int triggerId);
76  
77      public void insert(TriggerHistory newAuditRecord);
78  
79      public Map<Long, TriggerHistory> getHistoryRecords();
80  
81      public void insert(Trigger trigger);
82  
83      public boolean isRegistrationServer();
84      
85      public List<Trigger> getConfigurationTriggers(String sourceGroupId,
86              String targetGroupId, boolean includeNodes);
87  
88  }