aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpmcmahan2012-10-23 13:24:14 (EDT)
committerpmcmahan2012-10-23 13:24:14 (EDT)
commit82542c689f9dd86f481b64cfa21ebcd71e180077 (patch)
tree4b0defefe043e9577b197858577017b58cc7ba80
parentfccd92e1b3106585e1834e6f55f9cde33df00034 (diff)
downloadorg.eclipse.lyo.client-82542c689f9dd86f481b64cfa21ebcd71e180077.zip
org.eclipse.lyo.client-82542c689f9dd86f481b64cfa21ebcd71e180077.tar.gz
org.eclipse.lyo.client-82542c689f9dd86f481b64cfa21ebcd71e180077.tar.bz2
Adjust the namespace URI for RQM extension properties. Also provide inline comments in adapter.properties configuration file. Change-Id: Ib23f867e76319beda9e791251d90c473609e40fb
-rw-r--r--org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/AutomationAdapter.java36
-rw-r--r--org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/IConstants.java34
-rw-r--r--org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/Message.java6
-rw-r--r--org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/StatusResponse.java6
-rw-r--r--org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/adapter.properties17
5 files changed, 58 insertions, 41 deletions
diff --git a/org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/AutomationAdapter.java b/org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/AutomationAdapter.java
index b7f4644..1956f6b 100644
--- a/org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/AutomationAdapter.java
+++ b/org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/AutomationAdapter.java
@@ -78,7 +78,7 @@ import com.hp.hpl.jena.rdf.model.StmtIterator;
import com.hp.hpl.jena.vocabulary.RDF;
@OslcResourceShape(title = "Automation Adapter Resource Shape", describes = IConstants.TYPE_AUTOMATION_ADAPTER)
-@OslcNamespace(IConstants.NAMESPACE_URI_JAZZ_QM)
+@OslcNamespace(IConstants.NAMESPACE_URI_JAZZ_AUTO_RQM)
public class AutomationAdapter extends AbstractResource implements IConstants {
// connection properties for the adapter. These are not part of the
@@ -252,7 +252,7 @@ public class AutomationAdapter extends AbstractResource implements IConstants {
this.type = type;
}
- @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_QM + "hostname")
+ @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_AUTO_RQM + "hostname")
@OslcTitle("Hostname")
@OslcValueType(ValueType.String)
public String getHostname() {
@@ -263,7 +263,7 @@ public class AutomationAdapter extends AbstractResource implements IConstants {
this.hostname = hostname;
}
- @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_QM + "ipAddress")
+ @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_AUTO_RQM + "ipAddress")
@OslcTitle("IP Address")
@OslcValueType(ValueType.String)
public String getIpAddress() {
@@ -274,7 +274,7 @@ public class AutomationAdapter extends AbstractResource implements IConstants {
this.ipAddress = ipAddress;
}
- @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_QM + "pollingInterval")
+ @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_AUTO_RQM + "pollingInterval")
@OslcTitle("Polling Interval")
@OslcValueType(ValueType.Integer)
public Integer getPollingInterval() {
@@ -285,7 +285,7 @@ public class AutomationAdapter extends AbstractResource implements IConstants {
this.pollingInterval = pollingInterval;
}
- @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_QM + "macAddress")
+ @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_AUTO_RQM + "macAddress")
@OslcTitle("MAC Address")
@OslcValueType(ValueType.String)
public String getMacAddress() {
@@ -296,7 +296,7 @@ public class AutomationAdapter extends AbstractResource implements IConstants {
this.macAddress = macAddress;
}
- @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_QM + "fullyQualifiedDomainName")
+ @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_AUTO_RQM + "fullyQualifiedDomainName")
@OslcTitle("Fully Qualified Domain Name")
@OslcValueType(ValueType.String)
public String getFullyQualifiedDomainName() {
@@ -309,7 +309,7 @@ public class AutomationAdapter extends AbstractResource implements IConstants {
@OslcDescription("Capability of the adapter like Execute, Record, Import.")
@OslcName("capability")
- @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_QM + "capability")
+ @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_AUTO_RQM + "capability")
@OslcTitle("Capability")
@OslcOccurs(Occurs.OneOrMany)
public String[] getCapabilities() {
@@ -341,7 +341,7 @@ public class AutomationAdapter extends AbstractResource implements IConstants {
}
@OslcDescription("URL to poll for work assigned to the adapter.")
- @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_QM + "workAvailableUrl")
+ @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_AUTO_RQM + "workAvailableUrl")
@OslcTitle("Work Available URL")
@OslcValueType(ValueType.Resource)
public URI getWorkAvailableUrl() {
@@ -353,7 +353,7 @@ public class AutomationAdapter extends AbstractResource implements IConstants {
}
@OslcDescription("Boolean indicating whether work is available for the adapter.")
- @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_QM + "workAvailable")
+ @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_AUTO_RQM + "workAvailable")
@OslcTitle("Is Work Available")
@OslcValueType(ValueType.Boolean)
public Boolean getWorkAvailable() {
@@ -413,7 +413,7 @@ public class AutomationAdapter extends AbstractResource implements IConstants {
}
@OslcDescription("URL for the machine that the adapter is running on.")
- @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_QM + "runsOnMachine")
+ @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_AUTO_RQM + "runsOnMachine")
@OslcTitle("Runs On Machine")
@OslcValueType(ValueType.Resource)
public URI getRunsOnMachine() {
@@ -438,7 +438,7 @@ public class AutomationAdapter extends AbstractResource implements IConstants {
}
@OslcDescription("URL for the work assigned to the adapter.")
- @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_QM + "assignedWorkUrl")
+ @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_AUTO_RQM + "assignedWorkUrl")
@OslcTitle("Work Available URL")
@OslcValueType(ValueType.Resource)
public URI getAssignedWorkUrl() {
@@ -597,7 +597,7 @@ public class AutomationAdapter extends AbstractResource implements IConstants {
new Integer(100));
URI updateUri = appendOslcProperties(request.getAbout(),
- "oslc_auto:state", "rqm_qm:progress");
+ "oslc_auto:state", "rqm_auto:progress");
ClientResponse response;
@@ -700,7 +700,7 @@ public class AutomationAdapter extends AbstractResource implements IConstants {
AutomationConstants.STATE_IN_PROGRESS) });
updateUri = appendOslcProperties(URI.create(requestUrl),
- "oslc_auto:state", "rqm_qm:taken");
+ "oslc_auto:state", "rqm_auto:taken");
response = client.updateResource(updateUri.toString(), request,
OslcMediaType.APPLICATION_RDF_XML);
@@ -1083,7 +1083,7 @@ public class AutomationAdapter extends AbstractResource implements IConstants {
}
URI updateUrl = appendOslcProperties(getAbout(),
- "rqm_qm:pollingInterval");
+ "rqm_auto:pollingInterval");
ClientResponse response;
@@ -1110,7 +1110,7 @@ public class AutomationAdapter extends AbstractResource implements IConstants {
/**
* Upload a File to the Automation Service Provider using the
- * rqm_qm:uploadAttachmentUrl property in the Automation Request.
+ * rqm_auto:uploadAttachmentUrl property in the Automation Request.
*
* Before calling this method the adapter needs to be logged into the
* Automation Service Provider.
@@ -1216,7 +1216,7 @@ public class AutomationAdapter extends AbstractResource implements IConstants {
new Integer(i));
URI updateUri = appendOslcProperties(requestCopy.getAbout(),
- "rqm_qm:progress");
+ "rqm_auto:progress");
ClientResponse response;
@@ -1267,7 +1267,7 @@ public class AutomationAdapter extends AbstractResource implements IConstants {
statusResponse);
URI updateUri = appendOslcProperties(requestCopy.getAbout(),
- "rqm_qm:statusResponse");
+ "rqm_auto:statusResponse");
ClientResponse response;
@@ -1318,7 +1318,7 @@ public class AutomationAdapter extends AbstractResource implements IConstants {
message);
URI updateUri = appendOslcProperties(requestCopy.getAbout(),
- "rqm_qm:message");
+ "rqm_auto:message");
ClientResponse response;
diff --git a/org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/IConstants.java b/org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/IConstants.java
index 02c06b8..200e638 100644
--- a/org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/IConstants.java
+++ b/org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/IConstants.java
@@ -21,13 +21,13 @@ import org.eclipse.lyo.client.oslc.OSLCConstants;
public interface IConstants {
- String NAMESPACE_URI_JAZZ_QM = "http://jazz.net/ns/qm/rqm#"; //$NON-NLS-1$
+ String NAMESPACE_URI_JAZZ_AUTO_RQM = "http://jazz.net/ns/auto/rqm#"; //$NON-NLS-1$
String NAMESPACE_URI_XHTML = "http://www.w3.org/1999/xhtml"; //$NON-NLS-1$
String NAMESPACE_URI_DC_ELEMENTS = "http://purl.org/dc/elements/1.1/"; //$NON-NLS-1$
- String TYPE_AUTOMATION_ADAPTER = NAMESPACE_URI_JAZZ_QM + "AutomationAdapter";
- String TYPE_STATUS_RESPONSE = NAMESPACE_URI_JAZZ_QM + "StatusResponse";
- String TYPE_MESSAGE = NAMESPACE_URI_JAZZ_QM + "Message";
+ String TYPE_AUTOMATION_ADAPTER = NAMESPACE_URI_JAZZ_AUTO_RQM + "AutomationAdapter";
+ String TYPE_STATUS_RESPONSE = NAMESPACE_URI_JAZZ_AUTO_RQM + "StatusResponse";
+ String TYPE_MESSAGE = NAMESPACE_URI_JAZZ_AUTO_RQM + "Message";
QName PROPERTY_DC_RELATION = new QName(OSLCConstants.DC, "relation");
@@ -36,18 +36,18 @@ public interface IConstants {
QName PROPERTY_QM_EXECUTES_TEST_SCRIPT = new QName(OSLCConstants.OSLC_QM_V2, "executesTestScript");
QName PROPERTY_QM_REPORTS_ON_TEST_PLAN = new QName(OSLCConstants.OSLC_QM_V2, "reportsOnTestPlan");
- QName PROPERTY_RQM_TAKEN = new QName(IConstants.NAMESPACE_URI_JAZZ_QM, "taken");
- QName PROPERTY_RQM_PROGRESS = new QName(IConstants.NAMESPACE_URI_JAZZ_QM, "progress");
- QName PROPERTY_RQM_EXECUTES_ON_ADAPTER = new QName(IConstants.NAMESPACE_URI_JAZZ_QM, "executesOnAdapter");
- QName PROPERTY_RQM_REQUEST_TYPE = new QName(IConstants.NAMESPACE_URI_JAZZ_QM, "requestType");
- QName PROPERTY_RQM_UPLOAD_ATTACHMENT_URL = new QName(IConstants.NAMESPACE_URI_JAZZ_QM, "uploadAttachmentUrl");
- QName PROPERTY_RQM_TEST_SUITE_RESULT = new QName(IConstants.NAMESPACE_URI_JAZZ_QM, "testSuiteResult");
- QName PROPERTY_RQM_STATE_URL = new QName(IConstants.NAMESPACE_URI_JAZZ_QM, "stateUrl");
- QName PROPERTY_RQM_START_TIME = new QName(IConstants.NAMESPACE_URI_JAZZ_QM, "startTime");
- QName PROPERTY_RQM_END_TIME = new QName(IConstants.NAMESPACE_URI_JAZZ_QM, "endTime");
- QName PROPERTY_RQM_ATTACHMENT = new QName(IConstants.NAMESPACE_URI_JAZZ_QM, "attachment");
- QName PROPERTY_RQM_EXECUTED_ON_MACHINE = new QName(IConstants.NAMESPACE_URI_JAZZ_QM, "executedOnMachine");
- QName PROPERTY_RQM_STATUS_RESPONSE = new QName(IConstants.NAMESPACE_URI_JAZZ_QM, "statusResponse");
- QName PROPERTY_RQM_MESSAGE = new QName(IConstants.NAMESPACE_URI_JAZZ_QM, "message");
+ QName PROPERTY_RQM_TAKEN = new QName(IConstants.NAMESPACE_URI_JAZZ_AUTO_RQM, "taken");
+ QName PROPERTY_RQM_PROGRESS = new QName(IConstants.NAMESPACE_URI_JAZZ_AUTO_RQM, "progress");
+ QName PROPERTY_RQM_EXECUTES_ON_ADAPTER = new QName(IConstants.NAMESPACE_URI_JAZZ_AUTO_RQM, "executesOnAdapter");
+ QName PROPERTY_RQM_REQUEST_TYPE = new QName(IConstants.NAMESPACE_URI_JAZZ_AUTO_RQM, "requestType");
+ QName PROPERTY_RQM_UPLOAD_ATTACHMENT_URL = new QName(IConstants.NAMESPACE_URI_JAZZ_AUTO_RQM, "uploadAttachmentUrl");
+ QName PROPERTY_RQM_TEST_SUITE_RESULT = new QName(IConstants.NAMESPACE_URI_JAZZ_AUTO_RQM, "testSuiteResult");
+ QName PROPERTY_RQM_STATE_URL = new QName(IConstants.NAMESPACE_URI_JAZZ_AUTO_RQM, "stateUrl");
+ QName PROPERTY_RQM_START_TIME = new QName(IConstants.NAMESPACE_URI_JAZZ_AUTO_RQM, "startTime");
+ QName PROPERTY_RQM_END_TIME = new QName(IConstants.NAMESPACE_URI_JAZZ_AUTO_RQM, "endTime");
+ QName PROPERTY_RQM_ATTACHMENT = new QName(IConstants.NAMESPACE_URI_JAZZ_AUTO_RQM, "attachment");
+ QName PROPERTY_RQM_EXECUTED_ON_MACHINE = new QName(IConstants.NAMESPACE_URI_JAZZ_AUTO_RQM, "executedOnMachine");
+ QName PROPERTY_RQM_STATUS_RESPONSE = new QName(IConstants.NAMESPACE_URI_JAZZ_AUTO_RQM, "statusResponse");
+ QName PROPERTY_RQM_MESSAGE = new QName(IConstants.NAMESPACE_URI_JAZZ_AUTO_RQM, "message");
} \ No newline at end of file
diff --git a/org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/Message.java b/org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/Message.java
index fc009e7..dec33c6 100644
--- a/org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/Message.java
+++ b/org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/Message.java
@@ -27,7 +27,7 @@ import org.eclipse.lyo.oslc4j.core.model.Occurs;
import org.eclipse.lyo.oslc4j.core.model.ValueType;
@OslcResourceShape(title = "Message Resource Shape", describes = IConstants.TYPE_MESSAGE)
-@OslcNamespace(IConstants.NAMESPACE_URI_JAZZ_QM)
+@OslcNamespace(IConstants.NAMESPACE_URI_JAZZ_AUTO_RQM)
public class Message extends AbstractResource implements IConstants {
private String name;
@@ -50,7 +50,7 @@ public class Message extends AbstractResource implements IConstants {
}
@OslcDescription("The name of the message")
- @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_QM + "name")
+ @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_AUTO_RQM + "name")
@OslcTitle("Name")
@OslcOccurs(Occurs.ExactlyOne)
@OslcValueType(ValueType.String)
@@ -63,7 +63,7 @@ public class Message extends AbstractResource implements IConstants {
}
@OslcDescription("The actual message content")
- @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_QM + "value")
+ @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_AUTO_RQM + "value")
@OslcTitle("Value")
@OslcOccurs(Occurs.ExactlyOne)
@OslcValueType(ValueType.XMLLiteral)
diff --git a/org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/StatusResponse.java b/org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/StatusResponse.java
index 0011108..1599a2e 100644
--- a/org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/StatusResponse.java
+++ b/org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/StatusResponse.java
@@ -29,7 +29,7 @@ import org.eclipse.lyo.oslc4j.core.model.Occurs;
import org.eclipse.lyo.oslc4j.core.model.ValueType;
@OslcResourceShape(title = "Status Response Resource Shape", describes = IConstants.TYPE_STATUS_RESPONSE)
-@OslcNamespace(IConstants.NAMESPACE_URI_JAZZ_QM)
+@OslcNamespace(IConstants.NAMESPACE_URI_JAZZ_AUTO_RQM)
public class StatusResponse extends AbstractResource implements IConstants {
private static final Logger logger = Logger.getLogger(StatusResponse.class.getName());
@@ -75,7 +75,7 @@ public class StatusResponse extends AbstractResource implements IConstants {
}
@OslcDescription("The severity of the status")
- @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_QM + "statusCode")
+ @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_AUTO_RQM + "statusCode")
@OslcTitle("Status Code")
@OslcOccurs(Occurs.ExactlyOne)
@OslcValueType(ValueType.Integer)
@@ -103,7 +103,7 @@ public class StatusResponse extends AbstractResource implements IConstants {
}
@OslcDescription("Human friendly description of the status")
- @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_QM + "status")
+ @OslcPropertyDefinition(NAMESPACE_URI_JAZZ_AUTO_RQM + "status")
@OslcTitle("Status")
@OslcOccurs(Occurs.ZeroOrOne)
@OslcValueType(ValueType.String)
diff --git a/org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/adapter.properties b/org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/adapter.properties
index 0d1cd7c..07c9cb2 100644
--- a/org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/adapter.properties
+++ b/org.eclipse.lyo.samples.clients/src/main/java/org/eclipse/lyo/client/oslc/samples/automation/adapter.properties
@@ -1,14 +1,31 @@
+# Base URL for the Automation Provider
serverUrl=https://rqm.ibm.com:9443/qm
+# Username for logging into the Automation Provider
username=TestJazzAdmin1
+# Password for logging into the Automation Provider
password=password
+# Project area in the Automation Provider that the Adapter should be created in
projectArea=Quality Manager
+# Title of the Adapter to be created
title=Lyo Test Automation Adapter
+# Description of the Adapter to be created
description=Test Automation Adapter created by Eclipse Lyo sample
+# type of custom scripts that the Adapter can run
type=org.eclipse.lyo.clients.oslc.sample
+# hostname of the Adapter
hostname=rqm.ibm.com
+# IP Address of the Adapter
ipAddress=127.0.0.1
+# Polling interval for the Adapter
pollingInterval=5
+# MAC address of the Adapter
macAddress=50:c5:47:97:55:15
+# Fully qualified hostname of the Adapter
fullyQualifiedDomainName=ibm.com
+# Comma separated list of Adapter's capabilities
capability=Execute
+
+
+
+