]>
git.argeo.org Git - gpl/argeo-slc.git/blob - akb/AkbService.java
1 package org
.argeo
.slc
.akb
;
3 import java
.sql
.PreparedStatement
;
6 import javax
.jcr
.NodeIterator
;
7 import javax
.jcr
.Repository
;
8 import javax
.jcr
.RepositoryException
;
10 /** Provides method interfaces to manage an AKB repository */
11 public interface AkbService
{
13 /** Exposes injected Repository */
14 public Repository
getRepository();
16 /** Creates a pre-configured AKB Template */
17 public Node
createAkbTemplate(Node parent
, String name
)
18 throws RepositoryException
;
20 /** Creates an instance of a template */
21 public Node
createActiveEnv(Node template
, String name
,
22 boolean copyDefaultConnectors
) throws RepositoryException
;
24 /** Creates a new pre-configured AKB connector Alias for the given template */
25 public Node
createConnectorAlias(Node templateNode
, String name
,
26 String connectorType
) throws RepositoryException
;
30 * @param connectorType
31 * if null, returns all defined connector for this template
33 * @throws RepositoryException
35 public NodeIterator
getDefinedAliases(Node templateNode
,
36 String connectorType
) throws RepositoryException
;
41 * an environment or a template
43 * the path of the parent alias in the corresponding template
44 * environment used as key
45 * @return the corresponding active connector if found
46 * @throws RepositoryException
48 public Node
getActiveConnectorByAlias(Node envNode
, String aliasPath
)
49 throws RepositoryException
;
52 * Shortcut to perform whatever test on a given connector only to check if
53 * URL is correctly defined, if the target system is there and if the
54 * current user has the sufficient credentials to connect
56 * If no active environment is defined, try to
58 public boolean testConnector(Node connector
);
61 * If no active environment is defined, tries to execute query with default
62 * connector defined for the template
64 * @param activeEnvironment
68 public PreparedStatement
prepareJdbcQuery(Node activeEnvironment
,
73 * @param activeEnvironment
77 public String
executeCommand(Node activeEnvironment
, Node itemNode
);
81 * @param activeEnvironment
85 public String
retrieveFile(Node activeEnvironment
, Node itemNode
);