1 package org.smartcomps.twister.common.configuration;
2
3 /***
4 * Utility method that provides necessary methods for the engine to access
5 * its configuration.
6 */
7 public class EngineConfiguration extends XMLConfigurationReader {
8
9 private static final String ACTIVITY_IMPL = "//twister/engine/implementations/activity";
10 private static final String EXECUTION_IMPL = "//twister/engine/implementations/execution-context";
11 private static final String ACTIVITY_EXEC_IMPL = "//twister/engine/executions/activity";
12 private static final String MSG_BROKER_IMPL = "//twister/engine/implementations/message-broker";
13 private static final String INTERFACE_ATTR = "interface";
14 private static final String EXECUTION_ATTR = "execution";
15 private static final String IMPLEMENTATION_ATTR = "impl";
16
17 public static String getActivityImplementation(String activityIF) {
18 return getAttributeValue(ACTIVITY_IMPL, INTERFACE_ATTR, activityIF, IMPLEMENTATION_ATTR);
19 }
20
21 public static String getExecutionImplementation(String executionIF) {
22 return getAttributeValue(EXECUTION_IMPL, INTERFACE_ATTR, executionIF, IMPLEMENTATION_ATTR);
23 }
24
25 public static String getActivityExecution(String activityIF) {
26 return getAttributeValue(ACTIVITY_EXEC_IMPL, INTERFACE_ATTR, activityIF, EXECUTION_ATTR);
27 }
28
29 public static String getMessageBroker() {
30 return getAttributeValue(MSG_BROKER_IMPL, IMPLEMENTATION_ATTR);
31 }
32
33 }
This page was automatically generated by Maven