]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.akb/src/main/java/org/argeo/slc/akb/AkbService.java
86975817570dc329322ac418a17fc3cef0543798
[gpl/argeo-slc.git] / runtime / org.argeo.slc.akb / src / main / java / org / argeo / slc / akb / AkbService.java
1 package org.argeo.slc.akb;
2
3 import java.sql.PreparedStatement;
4
5 import javax.jcr.Node;
6 import javax.jcr.NodeIterator;
7 import javax.jcr.RepositoryException;
8
9 /** Provides method interfaces to manage an AKB repository */
10 public interface AkbService {
11
12 /** Creates a pre-configured AKB Template */
13 public Node createAkbTemplate(Node parent, String name)
14 throws RepositoryException;
15
16 /** Creates a new pre-configured AKB connector Alias for the given template */
17 public Node createConnectorAlias(Node templateNode, String name,
18 String connectorType) throws RepositoryException;
19
20 /**
21 * @param templateNode
22 * @param connectorType
23 * if null, returns all defined connector for this template
24 * @return
25 * @throws RepositoryException
26 */
27 public NodeIterator getDefinedAliases(Node templateNode,
28 String connectorType) throws RepositoryException;
29
30 /**
31 * @param envNode
32 * an environment or a template
33 * @param aliasName
34 * the alias of the node to get
35 * @return
36 * @throws RepositoryException
37 */
38 public Node getConnectorByAlias(Node envNode, String aliasName)
39 throws RepositoryException;
40
41 /**
42 * Shortcut to perform whatever test on a given connector only to check if
43 * URL is correctly defined, if the target system is there and if the
44 * current user has the sufficient credentials to connect
45 *
46 * If no active environment is defined, try to
47 */
48 public boolean testConnector(Node connector);
49
50 /**
51 * If no active environment is defined, tries to execute query with default
52 * connector defined for the template
53 */
54 public PreparedStatement prepareJdbcQuery(Node activeEnvironment, Node node);
55
56 public String executeCommand(Node activeEnvironment, Node node);
57
58 public String retrieveFile(Node activeEnvironment, Node node);
59 }