View Javadoc

1   /*
2    * SymmetricDS is an open source database synchronization solution.
3    *   
4    * Copyright (C) Eric Long <erilong@users.sourceforge.net>,
5    *               Andrew Wilcox <andrewbwilcox@users.sourceforge.net>,
6    *               Chris Henson <chenson42@users.sourceforge.net>
7    *
8    * This library is free software; you can redistribute it and/or
9    * modify it under the terms of the GNU Lesser General Public
10   * License as published by the Free Software Foundation; either
11   * version 3 of the License, or (at your option) any later version.
12   *
13   * This library is distributed in the hope that it will be useful,
14   * but WITHOUT ANY WARRANTY; without even the implied warranty of
15   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16   * Lesser General Public License for more details.
17   *
18   * You should have received a copy of the GNU Lesser General Public
19   * License along with this library; if not, see
20   * <http://www.gnu.org/licenses/>.
21   */
22  
23  package org.jumpmind.symmetric.service;
24  
25  import java.util.List;
26  
27  import org.jumpmind.symmetric.model.DataEventAction;
28  import org.jumpmind.symmetric.model.Node;
29  import org.jumpmind.symmetric.model.NodeSecurity;
30  
31  public interface INodeService {
32  
33      public Node findNode(String nodeId);
34  
35      public Node findNodeByExternalId(String nodeGroupId, String externalId);
36  
37      public NodeSecurity findNodeSecurity(String nodeId);
38  
39      public void ignoreNodeChannelForExternalId(boolean ignore, String channelId, String nodeGroupId, String externalId);
40  
41      public boolean isNodeAuthorized(String nodeId, String password);
42      
43      public void flushNodeAuthorizedCache();
44  
45      public boolean isRegistrationEnabled(String nodeId);
46  
47      public Node findIdentity();
48  
49      public Node findIdentity(boolean useCache);
50  
51      public List<Node> findNodesToPull();
52  
53      public List<Node> findNodesToPushTo();
54  
55      public List<Node> findSourceNodesFor(DataEventAction eventAction);
56  
57      public List<Node> findTargetNodesFor(DataEventAction eventAction);
58  
59      public boolean isExternalIdRegistered(String nodeGroupId, String externalId);
60  
61      public boolean updateNode(Node node);
62  
63      public boolean updateNodeSecurity(NodeSecurity security);
64  
65      public boolean setInitialLoadEnabled(String nodeId, boolean initialLoadEnabled);
66      
67      public String generatePassword();
68  
69      /***
70       * Generate the next node ID that is available. Try to use the domain ID as
71       * the node ID.
72       */
73      public String generateNodeId(String nodeGroupId, String externalId);
74  
75  }