Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Tiede2014-10-15 14:03:18 +0000
committerMarkus Tiede2014-10-15 14:22:51 +0000
commit73b12b53da9e83791471db14daccac19a832b4b7 (patch)
treeda40fe9c09e3557eceafafb7090996a72461444d /org.eclipse.jubula.client.api
parentbb1674d045866a45a4099808d6244d50f09a2e89 (diff)
downloadorg.eclipse.jubula.core-73b12b53da9e83791471db14daccac19a832b4b7.tar.gz
org.eclipse.jubula.core-73b12b53da9e83791471db14daccac19a832b4b7.tar.xz
org.eclipse.jubula.core-73b12b53da9e83791471db14daccac19a832b4b7.zip
Sprint task - transfer toolkit specific information: switch to generated toolkit information class.
Diffstat (limited to 'org.eclipse.jubula.client.api')
-rw-r--r--org.eclipse.jubula.client.api/META-INF/MANIFEST.MF1
-rw-r--r--org.eclipse.jubula.client.api/src/org/eclipse/jubula/client/AUT.java9
-rw-r--r--org.eclipse.jubula.client.api/src/org/eclipse/jubula/client/internal/impl/AUTImpl.java29
3 files changed, 18 insertions, 21 deletions
diff --git a/org.eclipse.jubula.client.api/META-INF/MANIFEST.MF b/org.eclipse.jubula.client.api/META-INF/MANIFEST.MF
index 3aeb7f7ec..fbd9cc537 100644
--- a/org.eclipse.jubula.client.api/META-INF/MANIFEST.MF
+++ b/org.eclipse.jubula.client.api/META-INF/MANIFEST.MF
@@ -10,6 +10,7 @@ Bundle-ClassPath: .
Require-Bundle: org.slf4j.api;bundle-version="[1.7.2,2.0.0)",
org.apache.commons.codec;bundle-version="[1.3.0,2.0.0)",
org.eclipse.jubula.tools;bundle-version="[2.4.0,2.5.0)",
+ org.eclipse.jubula.toolkit.api;bundle-version="[2.4.0,2.5.0)",
org.eclipse.jubula.communication;bundle-version="[2.4.0,2.5.0)"
Export-Package: org.eclipse.jubula.client.internal,
org.eclipse.jubula.client.internal.exceptions,
diff --git a/org.eclipse.jubula.client.api/src/org/eclipse/jubula/client/AUT.java b/org.eclipse.jubula.client.api/src/org/eclipse/jubula/client/AUT.java
index 3e265899e..6f06eb6eb 100644
--- a/org.eclipse.jubula.client.api/src/org/eclipse/jubula/client/AUT.java
+++ b/org.eclipse.jubula.client.api/src/org/eclipse/jubula/client/AUT.java
@@ -10,10 +10,9 @@
*******************************************************************************/
package org.eclipse.jubula.client;
-import java.util.Map;
-
import org.eclipse.jubula.client.exceptions.ExecutionException;
import org.eclipse.jubula.communication.CAP;
+import org.eclipse.jubula.toolkit.ToolkitInfo;
import org.eclipse.jubula.tools.AUTIdentifier;
/** @author BREDEX GmbH */
@@ -24,10 +23,10 @@ public interface AUT extends Remote {
AUTIdentifier getIdentifier();
/**
- * @param typeMapping
- * the type mapping to set
+ * @param information
+ * the information about the AUTs toolkit
*/
- void setTypeMapping(Map<?, ?> typeMapping);
+ void setToolkitInformation(ToolkitInfo information);
/**
* @param cap
diff --git a/org.eclipse.jubula.client.api/src/org/eclipse/jubula/client/internal/impl/AUTImpl.java b/org.eclipse.jubula.client.api/src/org/eclipse/jubula/client/internal/impl/AUTImpl.java
index 10aa244a7..424ab2488 100644
--- a/org.eclipse.jubula.client.api/src/org/eclipse/jubula/client/internal/impl/AUTImpl.java
+++ b/org.eclipse.jubula.client.api/src/org/eclipse/jubula/client/internal/impl/AUTImpl.java
@@ -26,6 +26,7 @@ import org.eclipse.jubula.communication.internal.message.CAPTestMessageFactory;
import org.eclipse.jubula.communication.internal.message.CAPTestResponseMessage;
import org.eclipse.jubula.communication.internal.message.MessageCap;
import org.eclipse.jubula.communication.internal.message.UnknownMessageException;
+import org.eclipse.jubula.toolkit.ToolkitInfo;
import org.eclipse.jubula.tools.AUTIdentifier;
import org.eclipse.jubula.tools.internal.exception.Assert;
import org.eclipse.jubula.tools.internal.exception.CommunicationException;
@@ -40,13 +41,12 @@ import org.slf4j.LoggerFactory;
public class AUTImpl implements AUT {
/** the logger */
private static Logger log = LoggerFactory.getLogger(AUTImpl.class);
-
/** the AUT identifier */
private AutIdentifier m_autID;
/** the instance */
private AUTConnection m_instance;
- /** the typeMapping */
- private Map<ComponentClass, String> m_typeMapping;
+ /** the toolkit specific information */
+ private ToolkitInfo m_information;
/**
* Constructor
@@ -60,7 +60,8 @@ public class AUTImpl implements AUT {
/** {@inheritDoc} */
public void connect() throws Exception {
- final Map<ComponentClass, String> typeMapping = getTypeMapping();
+ final Map<ComponentClass, String> typeMapping =
+ (Map<ComponentClass, String>) getInformation().getTypeMapping();
Assert.verify(typeMapping != null);
m_instance = AUTConnection.getInstance();
m_instance.connectToAut(m_autID, typeMapping);
@@ -80,29 +81,25 @@ public class AUTImpl implements AUT {
public AUTIdentifier getIdentifier() {
return m_autID;
}
-
- /**
- * @return the typeMapping
- */
- public Map<ComponentClass, String> getTypeMapping() {
- return m_typeMapping;
+
+ /** {@inheritDoc} */
+ public void setToolkitInformation(ToolkitInfo information) {
+ m_information = information;
}
/**
- * @param typeMapping
- * the typeMapping to set
+ * @return the information
*/
- public void setTypeMapping(Map<?, ?> typeMapping) {
- m_typeMapping = (Map<ComponentClass, String>) typeMapping;
+ public ToolkitInfo getInformation() {
+ return m_information;
}
/** {@inheritDoc} */
public void execute(CAP cap) throws ExecutionException {
try {
- // TODO MT: fixme
CAPTestMessage capTestMessage = CAPTestMessageFactory
.getCAPTestMessage((MessageCap)cap,
- "com.bredexsw.guidancer.SwtToolkitPlugin"); //$NON-NLS-1$
+ getInformation().getToolkitID());
m_instance.send(capTestMessage);

Back to the top