You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sa...@apache.org on 2013/01/04 22:48:41 UTC
svn commit: r1429145 - in /airavata/trunk/modules:
airavata-client/src/main/java/org/apache/airavata/client/
airavata-client/src/main/java/org/apache/airavata/client/api/
airavata-client/src/main/java/org/apache/airavata/client/impl/
integration-tests/...
Author: samindaw
Date: Fri Jan 4 21:48:40 2013
New Revision: 1429145
URL: http://svn.apache.org/viewvc?rev=1429145&view=rev
Log:
updating xbaya to use new API in airavata api runExperiment + refactoring monitor event class names + adding comments & fixing exceptions thrown in workflowmanager
Added:
airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/EventData.java
- copied, changed from r1429134, airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEvent.java
airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/EventDataRepository.java
- copied, changed from r1429079, airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEventData.java
airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEvent.java (with props)
airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEventData.java (with props)
Modified:
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/WorkflowManager.java
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowManagerImpl.java
airavata/trunk/modules/integration-tests/src/test/java/org/apache/airavata/integration/TestMonitorListener.java
airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionStatus.java
airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/UserWorkflowResourceClient.java
airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/resources/UserWorkflowRegistryResource.java
airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/EventFilter.java
airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/Monitor.java
airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEventListener.java
airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorEventListener.java
airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/modifier/WorkflowModifier.java
airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/WorkflowModificationTestCase.java
airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/monitor/MonitorWindow.java
airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/monitor/MonitorEventHandler.java
airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/views/MonitorPanel.java
Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java?rev=1429145&r1=1429144&r2=1429145&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java (original)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClient.java Fri Jan 4 21:48:40 2013
@@ -766,7 +766,7 @@ public class AiravataClient extends Obse
private Workflow extractWorkflow(String workflowName) throws AiravataAPIInvocationException {
Workflow workflowObj = null;
- if(getWorkflowManager().isWorkflowExists(workflowName)) {
+ if(!workflowName.contains("http://airavata.apache.org/xbaya/xwf")){//(getClient().getWorkflowManager().isWorkflowExists(workflowName)) {
workflowObj = getWorkflow(workflowName);
}else {
try{
Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/WorkflowManager.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/WorkflowManager.java?rev=1429145&r1=1429144&r2=1429145&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/WorkflowManager.java (original)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/WorkflowManager.java Fri Jan 4 21:48:40 2013
@@ -431,7 +431,7 @@ public interface WorkflowManager {
* @throws AiravataAPIInvocationException
* @throws Exception
*/
- public List<WorkflowInput> getWorkflowInputs(String workflowName) throws AiravataAPIInvocationException, Exception;
+ public List<WorkflowInput> getWorkflowInputs(String workflowName) throws AiravataAPIInvocationException;
/**
* Retrieve the workflow inputs for a workflow
@@ -440,7 +440,7 @@ public interface WorkflowManager {
* @throws AiravataAPIInvocationException
* @throws Exception
*/
- public List<WorkflowInput> getWorkflowInputs(WorkflowData workflowData) throws AiravataAPIInvocationException, Exception;
+ public List<WorkflowInput> getWorkflowInputs(WorkflowData workflowData) throws AiravataAPIInvocationException;
/**
* Retrieve all workflows in published space & user space accessible to the user.
@@ -449,10 +449,27 @@ public interface WorkflowManager {
*/
public List<WorkflowData> getAllWorkflows() throws AiravataAPIInvocationException;
+ /**
+ * Check to see if the workflow exists in user space
+ * @param workflowName
+ * @return
+ * @throws AiravataAPIInvocationException
+ */
public boolean isWorkflowExists(String workflowName) throws AiravataAPIInvocationException;
+ /**
+ * Update an existing workflow with the given workflow graph string
+ * @param workflowName
+ * @param workflowGraphXml
+ * @throws AiravataAPIInvocationException
+ */
public void updateWorkflow(String workflowName, String workflowGraphXml) throws AiravataAPIInvocationException;
+ /**
+ * Delete the workflow from the user space
+ * @param workflowName
+ * @throws AiravataAPIInvocationException
+ */
public void removeWorkflow(String workflowName) throws AiravataAPIInvocationException;
}
Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java?rev=1429145&r1=1429144&r2=1429145&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java (original)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java Fri Jan 4 21:48:40 2013
@@ -222,7 +222,8 @@ public class ExecutionManagerImpl implem
}
private Workflow extractWorkflow(String workflowName) throws AiravataAPIInvocationException {
Workflow workflowObj = null;
- if(getClient().getWorkflowManager().isWorkflowExists(workflowName)) {
+ //FIXME - There should be a better way to figure-out if the passed string is a name or an xml
+ if(!workflowName.contains("http://airavata.apache.org/xbaya/xwf")){//(getClient().getWorkflowManager().isWorkflowExists(workflowName)) {
workflowObj = getClient().getWorkflowManager().getWorkflow(workflowName);
}else {
try{
Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowManagerImpl.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowManagerImpl.java?rev=1429145&r1=1429144&r2=1429145&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowManagerImpl.java (original)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/WorkflowManagerImpl.java Fri Jan 4 21:48:40 2013
@@ -459,16 +459,24 @@ public class WorkflowManagerImpl impleme
}
@Override
- public List<WorkflowInput> getWorkflowInputs(String workflowName) throws Exception {
- return getWorkflow(workflowName).getWorkflowInputs();
+ public List<WorkflowInput> getWorkflowInputs(String workflowName) throws AiravataAPIInvocationException {
+ try {
+ return getWorkflow(workflowName).getWorkflowInputs();
+ } catch (Exception e) {
+ throw new AiravataAPIInvocationException(e);
+ }
}
@Override
- public List<WorkflowInput> getWorkflowInputs(WorkflowData workflowData) throws Exception {
- if (workflowData.isPublished()){
- return getWorkflowFromString(getClient().getRegistryClient().getPublishedWorkflowGraphXML(workflowData.getName())).getWorkflowInputs();
- }else{
- return getWorkflowInputs(workflowData.getName());
+ public List<WorkflowInput> getWorkflowInputs(WorkflowData workflowData) throws AiravataAPIInvocationException {
+ try {
+ if (workflowData.isPublished()){
+ return getWorkflowFromString(getClient().getRegistryClient().getPublishedWorkflowGraphXML(workflowData.getName())).getWorkflowInputs();
+ }else{
+ return getWorkflowInputs(workflowData.getName());
+ }
+ } catch (Exception e) {
+ throw new AiravataAPIInvocationException(e);
}
}
Modified: airavata/trunk/modules/integration-tests/src/test/java/org/apache/airavata/integration/TestMonitorListener.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/integration-tests/src/test/java/org/apache/airavata/integration/TestMonitorListener.java?rev=1429145&r1=1429144&r2=1429145&view=diff
==============================================================================
--- airavata/trunk/modules/integration-tests/src/test/java/org/apache/airavata/integration/TestMonitorListener.java (original)
+++ airavata/trunk/modules/integration-tests/src/test/java/org/apache/airavata/integration/TestMonitorListener.java Fri Jan 4 21:48:40 2013
@@ -9,8 +9,8 @@ import org.apache.airavata.registry.api.
import org.apache.airavata.registry.api.workflow.ExperimentData;
import org.apache.airavata.registry.api.workflow.NodeExecutionData;
import org.apache.airavata.ws.monitor.Monitor;
-import org.apache.airavata.ws.monitor.MonitorEvent;
-import org.apache.airavata.ws.monitor.MonitorEventData;
+import org.apache.airavata.ws.monitor.EventData;
+import org.apache.airavata.ws.monitor.EventDataRepository;
import org.apache.airavata.ws.monitor.MonitorEventListener;
import org.apache.airavata.ws.monitor.MonitorUtil;
import org.slf4j.Logger;
@@ -33,7 +33,7 @@ public class TestMonitorListener impleme
}
@Override
- public void notify(MonitorEventData eventData, MonitorEvent event) {
+ public void notify(EventDataRepository eventData, EventData event) {
Assert.assertNotNull(eventData);
Assert.assertNotNull(event);
Modified: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionStatus.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionStatus.java?rev=1429145&r1=1429144&r2=1429145&view=diff
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionStatus.java (original)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/workflow/WorkflowExecutionStatus.java Fri Jan 4 21:48:40 2013
@@ -72,7 +72,7 @@ public class WorkflowExecutionStatus {
}
}
- private State executionStatus;
+ private State executionStatus=State.UNKNOWN;
private Date statusUpdateTime = null;
private WorkflowExecution workflowInstance;
Modified: airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/UserWorkflowResourceClient.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/UserWorkflowResourceClient.java?rev=1429145&r1=1429144&r2=1429145&view=diff
==============================================================================
--- airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/UserWorkflowResourceClient.java (original)
+++ airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/UserWorkflowResourceClient.java Fri Jan 4 21:48:40 2013
@@ -98,7 +98,7 @@ public class UserWorkflowResourceClient
builder = BasicAuthHeaderUtil.getBuilder(
webResource, queryParams, userName, null, cookie, gateway);
- ClientResponse response = builder.accept(
+ ClientResponse response = builder.type(MediaType.APPLICATION_FORM_URLENCODED).accept(
MediaType.TEXT_PLAIN).get(ClientResponse.class);
int status = response.getStatus();
@@ -116,7 +116,8 @@ public class UserWorkflowResourceClient
} else if (status == ClientConstant.HTTP_UNAUTHORIZED) {
builder = BasicAuthHeaderUtil.getBuilder(
webResource, queryParams, userName, callback.getPassword(userName), null, gateway);
- response = builder.accept(MediaType.TEXT_PLAIN).get(ClientResponse.class);
+ response = builder.type(MediaType.APPLICATION_FORM_URLENCODED).accept(
+ MediaType.TEXT_PLAIN).get(ClientResponse.class);
status = response.getStatus();
if (status == ClientConstant.HTTP_OK) {
if (response.getCookies().size() > 0) {
Modified: airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/resources/UserWorkflowRegistryResource.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/resources/UserWorkflowRegistryResource.java?rev=1429145&r1=1429144&r2=1429145&view=diff
==============================================================================
--- airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/resources/UserWorkflowRegistryResource.java (original)
+++ airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/resources/UserWorkflowRegistryResource.java Fri Jan 4 21:48:40 2013
@@ -59,6 +59,7 @@ public class UserWorkflowRegistryResourc
*/
@GET
@Path(ResourcePathConstants.UserWFConstants.WORKFLOW_EXIST)
+ @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Produces(MediaType.TEXT_PLAIN)
public Response isWorkflowExists(@QueryParam("workflowName") String workflowName) {
AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
Copied: airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/EventData.java (from r1429134, airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEvent.java)
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/EventData.java?p2=airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/EventData.java&p1=airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEvent.java&r1=1429134&r2=1429145&rev=1429145&view=diff
==============================================================================
--- airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEvent.java (original)
+++ airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/EventData.java Fri Jan 4 21:48:40 2013
@@ -28,7 +28,7 @@ import java.util.Date;
import org.apache.airavata.ws.monitor.MonitorUtil.EventType;
import org.xmlpull.infoset.XmlElement;
-public class MonitorEvent {
+public class EventData {
private String timeText;
@@ -55,7 +55,7 @@ public class MonitorEvent {
*
* @param event
*/
- public MonitorEvent(XmlElement event) {
+ public EventData(XmlElement event) {
this.event = event;
parse();
}
Copied: airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/EventDataRepository.java (from r1429079, airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEventData.java)
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/EventDataRepository.java?p2=airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/EventDataRepository.java&p1=airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEventData.java&r1=1429079&r2=1429145&rev=1429145&view=diff
==============================================================================
--- airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEventData.java (original)
+++ airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/EventDataRepository.java Fri Jan 4 21:48:40 2013
@@ -36,7 +36,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xmlpull.infoset.XmlElement;
-public class MonitorEventData implements TableModel, BoundedRangeModel {
+public class EventDataRepository implements TableModel, BoundedRangeModel {
/**
* Column
@@ -73,13 +73,13 @@ public class MonitorEventData implements
}
}
- private static final Logger logger = LoggerFactory.getLogger(MonitorEventData.class);
+ private static final Logger logger = LoggerFactory.getLogger(EventDataRepository.class);
private List<TableModelListener> tableModelListeners;
private List<ChangeListener> sliderModelListeners;
- private List<MonitorEvent> events;
+ private List<EventData> events;
private int sliderValue;
@@ -96,26 +96,26 @@ public class MonitorEventData implements
* Constructs a MonitorEventData.
*
*/
- public MonitorEventData() {
+ public EventDataRepository() {
this(null);
}
/**
* Constructs a NotificationTableModel.
*/
- public MonitorEventData(EventFilter filter) {
+ public EventDataRepository(EventFilter filter) {
this.filter = filter;
this.tableModelListeners = new LinkedList<TableModelListener>();
this.sliderModelListeners = new LinkedList<ChangeListener>();
this.tableModelChangeEvent = new ChangeEvent(this); // We only need one.
- this.events = new ArrayList<MonitorEvent>();
+ this.events = new ArrayList<EventData>();
}
/**
* @param message
*/
public void addEvent(XmlElement message) {
- MonitorEvent event = new MonitorEvent(message);
+ EventData event = new EventData(message);
// no need the check for not null because second clause is evaluated only if
// not null
if (this.filter == null || this.filter.isAcceptable(event)) {
@@ -184,7 +184,7 @@ public class MonitorEventData implements
}
}
}
- private void triggerListenerForMonitorEvent(MonitorEvent event) {
+ private void triggerListenerForMonitorEvent(EventData event) {
for (MonitorEventListener listener : getMonitorEventListerners()) {
try {
listener.notify(this, event);
@@ -198,7 +198,7 @@ public class MonitorEventData implements
/**
* @return All events.
*/
- public List<MonitorEvent> getEvents() {
+ public List<EventData> getEvents() {
return this.events;
}
@@ -209,7 +209,7 @@ public class MonitorEventData implements
* The specified row.
* @return The notification at the specified row
*/
- public MonitorEvent getEvent(int index) {
+ public EventData getEvent(int index) {
return this.events.get(index);
}
@@ -286,7 +286,7 @@ public class MonitorEventData implements
public Object getValueAt(int rowIndex, int columnIndex) {
String value;
try {
- MonitorEvent event = this.events.get(rowIndex);
+ EventData event = this.events.get(rowIndex);
value = getTextAt(event, columnIndex);
} catch (RuntimeException e) {
// This should not happen, but if it happens it blocks the UI.
@@ -436,7 +436,7 @@ public class MonitorEventData implements
this.sliderModelListeners.remove(listener);
}
- private String getTextAt(MonitorEvent event, int columnIndex) {
+ private String getTextAt(EventData event, int columnIndex) {
Column[] columns = Column.values();
if (columnIndex < 0 || columnIndex >= columns.length) {
// Should not happen.
Modified: airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/EventFilter.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/EventFilter.java?rev=1429145&r1=1429144&r2=1429145&view=diff
==============================================================================
--- airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/EventFilter.java (original)
+++ airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/EventFilter.java Fri Jan 4 21:48:40 2013
@@ -23,5 +23,5 @@ package org.apache.airavata.ws.monitor;
public interface EventFilter {
- public boolean isAcceptable(MonitorEvent event);
+ public boolean isAcceptable(EventData event);
}
\ No newline at end of file
Modified: airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/Monitor.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/Monitor.java?rev=1429145&r1=1429144&r2=1429145&view=diff
==============================================================================
--- airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/Monitor.java (original)
+++ airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/Monitor.java Fri Jan 4 21:48:40 2013
@@ -44,7 +44,7 @@ public class Monitor extends EventProduc
protected static final String DEFAULT_MODEL_KEY = "_DEFAULT_MODEL_KEY";
- protected Map<String, MonitorEventData> eventDataMap = new HashMap<String, MonitorEventData>();
+ protected Map<String, EventDataRepository> eventDataMap = new HashMap<String, EventDataRepository>();
protected WsmgClient wsmgClient;
@@ -68,7 +68,7 @@ public class Monitor extends EventProduc
// The first one is special and it is for the main event panel display
// and
// it does not have and filters
- this.eventDataMap.put(DEFAULT_MODEL_KEY, new MonitorEventData());
+ this.eventDataMap.put(DEFAULT_MODEL_KEY, new EventDataRepository());
}
@@ -83,7 +83,7 @@ public class Monitor extends EventProduc
/**
* @return The event data;
*/
- public MonitorEventData getEventData() {
+ public EventDataRepository getEventData() {
// send the first one cos that is the default one
return this.eventDataMap.get(DEFAULT_MODEL_KEY);
}
@@ -91,7 +91,7 @@ public class Monitor extends EventProduc
/**
* @return The event data;
*/
- public MonitorEventData getEventData(String nodeID) {
+ public EventDataRepository getEventData(String nodeID) {
// send the first one cos that is the default one
return this.eventDataMap.get(nodeID);
}
@@ -116,11 +116,11 @@ public class Monitor extends EventProduc
final String nodeID = string;
// for each wsnode there is one data model which
- this.eventDataMap.put(nodeID, new MonitorEventData(new EventFilter() {
+ this.eventDataMap.put(nodeID, new EventDataRepository(new EventFilter() {
/**
- * @see org.apache.airavata.ws.monitor.EventFilter#isAcceptable(org.apache.airavata.ws.monitor.MonitorEvent)
+ * @see org.apache.airavata.ws.monitor.EventFilter#isAcceptable(org.apache.airavata.ws.monitor.EventData)
*/
- public boolean isAcceptable(MonitorEvent event) {
+ public boolean isAcceptable(EventData event) {
return event != null && event.getNodeID() != null && event.getNodeID().equals(nodeID);
}
}));
@@ -208,7 +208,7 @@ public class Monitor extends EventProduc
LinkedList<String> keysToBeRemoved = new LinkedList<String>();
// Remove everthing leaving only the last one
for (String key : keys) {
- MonitorEventData monitorEventData = this.eventDataMap.get(key);
+ EventDataRepository monitorEventData = this.eventDataMap.get(key);
monitorEventData.removeAllEvents();
if (!key.equals(DEFAULT_MODEL_KEY)) {
keysToBeRemoved.add(key);
Added: airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEvent.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEvent.java?rev=1429145&view=auto
==============================================================================
--- airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEvent.java (added)
+++ airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEvent.java Fri Jan 4 21:48:40 2013
@@ -0,0 +1,33 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.ws.monitor;
+
+import org.xmlpull.infoset.XmlElement;
+
+@Deprecated
+public class MonitorEvent extends EventData {
+
+ public MonitorEvent(XmlElement event) {
+ super(event);
+ }
+
+}
Propchange: airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEvent.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEventData.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEventData.java?rev=1429145&view=auto
==============================================================================
--- airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEventData.java (added)
+++ airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEventData.java Fri Jan 4 21:48:40 2013
@@ -0,0 +1,27 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.airavata.ws.monitor;
+
+@Deprecated
+public class MonitorEventData extends EventDataRepository {
+
+}
Propchange: airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEventData.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEventListener.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEventListener.java?rev=1429145&r1=1429144&r2=1429145&view=diff
==============================================================================
--- airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEventListener.java (original)
+++ airavata/trunk/modules/ws-messenger/message-monitor/src/main/java/org/apache/airavata/ws/monitor/MonitorEventListener.java Fri Jan 4 21:48:40 2013
@@ -25,10 +25,10 @@ public interface MonitorEventListener {
/**
* Gets triggered when a new message is received relevant for the experiment subscribed to
- * @param eventData - Contains a collection of events up to this point in monitoring
- * @param event - the new message related to the experiment
+ * @param eventDataRepo - Contains a collection of events up to this point in monitoring
+ * @param eventData - the new message related to the experiment
*/
- public void notify(MonitorEventData eventData, MonitorEvent event);
+ public void notify(EventDataRepository eventDataRepo, EventData eventData);
/**
* Set the Monitor object
Modified: airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorEventListener.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorEventListener.java?rev=1429145&r1=1429144&r2=1429145&view=diff
==============================================================================
--- airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorEventListener.java (original)
+++ airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorEventListener.java Fri Jan 4 21:48:40 2013
@@ -39,7 +39,7 @@ import org.apache.airavata.workflow.mode
import org.apache.airavata.workflow.model.graph.util.GraphUtil;
import org.apache.airavata.workflow.model.graph.ws.WSGraph;
import org.apache.airavata.workflow.model.wf.Workflow;
-import org.apache.airavata.ws.monitor.MonitorEvent;
+import org.apache.airavata.ws.monitor.EventData;
import org.apache.airavata.ws.monitor.MonitorException;
import org.apache.airavata.ws.monitor.MonitorUtil;
import org.apache.airavata.ws.monitor.MonitorUtil.EventType;
@@ -147,7 +147,7 @@ public class WorkflowInterpretorEventLis
try {
// String soapBody = WorkFlowUtils.getSoapBodyContent(message);
XmlElement event = XMLUtil.stringToXmlElement(message);
- handleEvent(new MonitorEvent(event), true, this.workflow.getGraph());
+ handleEvent(new EventData(event), true, this.workflow.getGraph());
// } catch (XMLStreamException e) {
// // Just log them because they can be unrelated messages sent to
@@ -160,7 +160,7 @@ public class WorkflowInterpretorEventLis
}
}
- private void handleEvent(MonitorEvent event, boolean forward, Graph graph) {
+ private void handleEvent(EventData event, boolean forward, Graph graph) {
EventType type = event.getType();
String nodeID = event.getNodeID();
Node node = graph.getNode(nodeID);
Modified: airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/modifier/WorkflowModifier.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/modifier/WorkflowModifier.java?rev=1429145&r1=1429144&r2=1429145&view=diff
==============================================================================
--- airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/modifier/WorkflowModifier.java (original)
+++ airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/modifier/WorkflowModifier.java Fri Jan 4 21:48:40 2013
@@ -44,8 +44,8 @@ import org.apache.airavata.workflow.mode
import org.apache.airavata.workflow.model.graph.ws.WSNode;
import org.apache.airavata.workflow.model.graph.ws.WSPort;
import org.apache.airavata.workflow.model.wf.Workflow;
-import org.apache.airavata.ws.monitor.MonitorEvent;
-import org.apache.airavata.ws.monitor.MonitorEventData;
+import org.apache.airavata.ws.monitor.EventData;
+import org.apache.airavata.ws.monitor.EventDataRepository;
import org.apache.airavata.ws.monitor.MonitorException;
import org.apache.airavata.ws.monitor.MonitorUtil;
import org.apache.airavata.ws.monitor.MonitorUtil.EventType;
@@ -64,7 +64,7 @@ public class WorkflowModifier {
private Workflow modifiedWorkflow;
- private MonitorEventData eventData;
+ private EventDataRepository eventData;
/**
* Constructs a WorkflowModifier.
@@ -72,7 +72,7 @@ public class WorkflowModifier {
* @param modifiedWorkflow
* @param eventData
*/
- public WorkflowModifier(Workflow modifiedWorkflow, MonitorEventData eventData) {
+ public WorkflowModifier(Workflow modifiedWorkflow, EventDataRepository eventData) {
this.modifiedWorkflow = modifiedWorkflow;
this.eventData = eventData;
}
@@ -195,8 +195,8 @@ public class WorkflowModifier {
private String getWorkflowInput(String nodeID) throws MonitorException {
logger.debug("Node:" + nodeID);
- List<MonitorEvent> events = this.eventData.getEvents();
- for (MonitorEvent event : events) {
+ List<EventData> events = this.eventData.getEvents();
+ for (EventData event : events) {
EventType type = event.getType();
// TODO change this to read from the notification from GPEL.
if (type != EventType.INVOKING_SERVICE) {
@@ -229,8 +229,8 @@ public class WorkflowModifier {
}
private String getOutput(String nodeID, String messageName, String parameterName) throws MonitorException {
- List<MonitorEvent> events = this.eventData.getEvents();
- for (MonitorEvent event : events) {
+ List<EventData> events = this.eventData.getEvents();
+ for (EventData event : events) {
// We need to find the notification that contains the output of the
// service invocation.
EventType type = event.getType();
Modified: airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/WorkflowModificationTestCase.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/WorkflowModificationTestCase.java?rev=1429145&r1=1429144&r2=1429145&view=diff
==============================================================================
--- airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/WorkflowModificationTestCase.java (original)
+++ airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/WorkflowModificationTestCase.java Fri Jan 4 21:48:40 2013
@@ -54,7 +54,7 @@ import org.apache.airavata.workflow.trac
import org.apache.airavata.workflow.tracking.impl.publish.NotificationPublisher;
import org.apache.airavata.ws.monitor.Monitor;
import org.apache.airavata.ws.monitor.MonitorConfiguration;
-import org.apache.airavata.ws.monitor.MonitorEventData;
+import org.apache.airavata.ws.monitor.EventDataRepository;
import org.apache.airavata.ws.monitor.MonitorException;
import org.apache.airavata.ws.monitor.event.Event;
import org.apache.airavata.ws.monitor.event.Event.Type;
@@ -134,7 +134,7 @@ public class WorkflowModificationTestCas
monitor = new Monitor(monitorConfiguration);
}
- MonitorEventData eventData = monitor.getEventData();
+ EventDataRepository eventData = monitor.getEventData();
MonitorCallback callback = new MonitorCallback(eventData);
LoopbackPublisher publisher = new LoopbackPublisher(callback, this.configuration.getTopic());
MonitorNotifier notifier = new MonitorNotifier(publisher);
@@ -344,14 +344,14 @@ public class WorkflowModificationTestCas
private class MonitorCallback implements Callback {
- private MonitorEventData eventData;
+ private EventDataRepository eventData;
/**
* Constructs a MonitorCallback.
*
* @param eventData
*/
- public MonitorCallback(MonitorEventData eventData) {
+ public MonitorCallback(EventDataRepository eventData) {
this.eventData = eventData;
}
Modified: airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/monitor/MonitorWindow.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/monitor/MonitorWindow.java?rev=1429145&r1=1429144&r2=1429145&view=diff
==============================================================================
--- airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/monitor/MonitorWindow.java (original)
+++ airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/monitor/MonitorWindow.java Fri Jan 4 21:48:40 2013
@@ -29,7 +29,7 @@ import javax.swing.JButton;
import javax.swing.JPanel;
import org.apache.airavata.common.utils.XMLUtil;
-import org.apache.airavata.ws.monitor.MonitorEventData;
+import org.apache.airavata.ws.monitor.EventDataRepository;
import org.apache.airavata.ws.monitor.MonitorUtil;
import org.apache.airavata.xbaya.ui.XBayaGUI;
import org.apache.airavata.xbaya.ui.dialogs.XBayaDialog;
@@ -92,20 +92,20 @@ public class MonitorWindow {
private void init() {
this.timeTextField = new XBayaTextField();
this.timeTextField.setEditable(false);
- XBayaLabel timeLabel = new XBayaLabel(MonitorEventData.Column.TIME.getName(), this.timeTextField);
+ XBayaLabel timeLabel = new XBayaLabel(EventDataRepository.Column.TIME.getName(), this.timeTextField);
this.idTextField = new XBayaTextField();
this.idTextField.setEditable(false);
- XBayaLabel idLabel = new XBayaLabel(MonitorEventData.Column.ID.getName(), this.idTextField);
+ XBayaLabel idLabel = new XBayaLabel(EventDataRepository.Column.ID.getName(), this.idTextField);
this.statusTextField = new XBayaTextField();
this.statusTextField.setEditable(false);
- XBayaLabel statusLabel = new XBayaLabel(MonitorEventData.Column.STATUS.getName(), this.statusTextField);
+ XBayaLabel statusLabel = new XBayaLabel(EventDataRepository.Column.STATUS.getName(), this.statusTextField);
this.messageTextArea = new XBayaTextArea();
this.messageTextArea.setSize(500, 500);
this.messageTextArea.setEditable(false);
- XBayaLabel messageLabel = new XBayaLabel(MonitorEventData.Column.MESSAGE.getName(), this.messageTextArea);
+ XBayaLabel messageLabel = new XBayaLabel(EventDataRepository.Column.MESSAGE.getName(), this.messageTextArea);
GridPanel infoPanel = new GridPanel();
infoPanel.add(timeLabel);
Modified: airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java?rev=1429145&r1=1429144&r2=1429145&view=diff
==============================================================================
--- airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java (original)
+++ airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/experiment/WorkflowInterpreterLaunchWindow.java Fri Jan 4 21:48:40 2013
@@ -37,10 +37,9 @@ import javax.swing.JPanel;
import javax.xml.namespace.QName;
import org.apache.airavata.client.api.AiravataAPI;
-import org.apache.airavata.client.stub.interpretor.WorkflowInterpretorStub;
+import org.apache.airavata.client.api.ExperimentAdvanceOptions;
import org.apache.airavata.common.utils.StringUtil;
import org.apache.airavata.common.utils.XMLUtil;
-import org.apache.airavata.common.workflow.execution.context.WorkflowContextHeaderBuilder;
import org.apache.airavata.workflow.model.graph.system.InputNode;
import org.apache.airavata.workflow.model.graph.util.GraphUtil;
import org.apache.airavata.workflow.model.graph.ws.WSNode;
@@ -307,81 +306,26 @@ public class WorkflowInterpreterLaunchWi
}
this.engine.getConfiguration().setTopic(topic);
- final String topicString = topic;
new Thread() {
- /**
- * @see java.lang.Thread#run()
- */
@Override
public void run() {
try {
-
- WorkflowInterpretorStub stub = new WorkflowInterpretorStub(engine.getConfiguration()
- .getWorkflowInterpreterURL().toString());
-// NameValue[] configurations = new NameValue[6];
-// configurations[0] = new NameValue();
-// configurations[0].setName(HeaderConstants.HEADER_ELEMENT_GFAC);
-// configurations[0].setValue(engine.getConfiguration().getGFacURL().toString());
-// configurations[1] = new NameValue();
-// configurations[1].setName(HeaderConstants.HEADER_ELEMENT_REGISTRY);
-// if (null == engine.getConfiguration().getRegistryURL()) {
-// configurations[1].setValue(XBayaConstants.REGISTRY_URL.toString());
-// } else {
-// configurations[1].setValue(engine.getConfiguration().getRegistryURL().toString());
-// }
-// configurations[2] = new NameValue();
-// configurations[2].setName(HeaderConstants.HEADER_ELEMENT_PROXYSERVER);
-// configurations[2].setValue(engine.getConfiguration().getMyProxyServer());
-//
-// configurations[3] = new NameValue();
-// configurations[3].setName(HeaderConstants.HEADER_ELEMENT_BROKER);
-// configurations[3].setValue(engine.getConfiguration().getBrokerURL().toString());
-//
-// configurations[4] = new NameValue();
-// configurations[4].setName(HeaderConstants.HEADER_ELEMENT_MSGBOX);
-// configurations[4].setValue(engine.getConfiguration().getMessageBoxURL().toString());
-//
-// configurations[5] = new NameValue();
-// configurations[5].setName(HeaderConstants.HEADER_ELEMENT_DSC);
-// configurations[5].setValue(engine.getConfiguration().getDSCURL().toString());
List<WorkflowInput> workflowInputs=new ArrayList<WorkflowInput>();
-// NameValue[] inputNameVals = new NameValue[inputNodes.size()];
for (int i = 0; i < inputNodes.size(); i++) {
InputNode inputNode = inputNodes.get(i);
workflowInputs.add(new WorkflowInput(inputNode.getID(), inputNode.getDefaultValue().toString()));
-// inputNameVals[i] = new NameValue();
-// InputNode inputNode = inputNodes.get(i);
-// String id = inputNode.getID();
-// String value = inputNode.getDefaultValue().toString();
-// inputNameVals[i].setName(id);
-// inputNameVals[i].setValue(value);
}
- XBayaConfiguration configuration = engine.getConfiguration();
-// String myProxyUsername = configuration.getRegistryUserName();
-// String myProxyPass = configuration.getRegistryPassphrase();
- //todo we need to add the workflowContext header in the message
-
- WorkflowContextHeaderBuilder builder = new WorkflowContextHeaderBuilder(configuration.getBrokerURL().toASCIIString(),
- configuration.getGFacURL().toASCIIString(),configuration.getRegistryURL().toASCIIString(),configuration.getTopic()
- ,null,configuration.getMessageBoxURL().toASCIIString());
AiravataAPI api = engine.getConfiguration().getAiravataAPI();
- String experimentId = api.getExecutionManager().runExperiment(api.getWorkflowManager().getWorkflowAsString(workflow), workflowInputs,api.getCurrentUser(),null,instanceNameFinal,builder);
+ ExperimentAdvanceOptions options = api.getExecutionManager().createExperimentAdvanceOptions(instanceNameFinal, api.getCurrentUser(), null);
+ String experimentId = api.getExecutionManager().runExperiment(api.getWorkflowManager().getWorkflowAsString(workflow), workflowInputs,options);
try {
WorkflowInterpreterLaunchWindow.this.engine.getMonitor().getConfiguration().setTopic(experimentId);
-
WorkflowInterpreterLaunchWindow.this.engine.getMonitor().start();
} catch (MonitorException e1) {
WorkflowInterpreterLaunchWindow.this.engine.getGUI().getErrorWindow().error(e1);
}
-
-
-// stub._getServiceClient().addHeader(AXIOMUtil.stringToOM(XMLUtil.xmlElementToString(builder.getXml())));
-// stub.launchWorkflow(workflow.toXMLText(), topicString, inputNameVals);
-//
-// api.getProvenanceManager().setExperimentName(topicString, instanceNameFinal);
-// api.getProvenanceManager().setExperimentUser(topicString, api.getAiravataManager().getUser().getUserName());
} catch (Exception e) {
WorkflowInterpreterLaunchWindow.this.engine.getGUI().getErrorWindow().error(e);
}
Modified: airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/monitor/MonitorEventHandler.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/monitor/MonitorEventHandler.java?rev=1429145&r1=1429144&r2=1429145&view=diff
==============================================================================
--- airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/monitor/MonitorEventHandler.java (original)
+++ airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/monitor/MonitorEventHandler.java Fri Jan 4 21:48:40 2013
@@ -48,8 +48,8 @@ import org.apache.airavata.workflow.mode
import org.apache.airavata.workflow.model.graph.util.GraphUtil;
import org.apache.airavata.workflow.model.graph.ws.WSGraph;
import org.apache.airavata.workflow.model.wf.Workflow;
-import org.apache.airavata.ws.monitor.MonitorEvent;
-import org.apache.airavata.ws.monitor.MonitorEventData;
+import org.apache.airavata.ws.monitor.EventData;
+import org.apache.airavata.ws.monitor.EventDataRepository;
import org.apache.airavata.ws.monitor.MonitorUtil;
import org.apache.airavata.ws.monitor.MonitorUtil.EventType;
import org.apache.airavata.xbaya.graph.controller.NodeController;
@@ -145,8 +145,8 @@ public class MonitorEventHandler impleme
public void stateChanged(ChangeEvent event) {
try {
Object source = event.getSource();
- if (source instanceof MonitorEventData) {
- handleChange((MonitorEventData) source);
+ if (source instanceof EventDataRepository) {
+ handleChange((EventDataRepository) source);
}
} catch (RuntimeException e) {
// Don't want to pop up an error dialog every time XBaya received an
@@ -158,7 +158,7 @@ public class MonitorEventHandler impleme
/**
* @param model
*/
- private void handleChange(MonitorEventData model) {
+ private void handleChange(EventDataRepository model) {
int newValue = model.getValue();
if (model.getEventSize() == 0) {
@@ -183,7 +183,7 @@ public class MonitorEventHandler impleme
this.xbayaGUI.getGraphCanvas().repaint();
}
- private void handleEvent(MonitorEvent event, boolean forward) {
+ private void handleEvent(EventData event, boolean forward) {
EventType type = event.getType();
//todo currrently we do not set the workflowID properly its just node ID
URI workflowID = event.getWorkflowID();
@@ -301,7 +301,7 @@ public class MonitorEventHandler impleme
* @param forward
* @param graph
*/
- private void handleEvent(MonitorEvent event, boolean forward, Graph graph) {
+ private void handleEvent(EventData event, boolean forward, Graph graph) {
EventType type = event.getType();
String nodeID = event.getNodeID();
Node node = graph.getNode(nodeID);
Modified: airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/views/MonitorPanel.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/views/MonitorPanel.java?rev=1429145&r1=1429144&r2=1429145&view=diff
==============================================================================
--- airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/views/MonitorPanel.java (original)
+++ airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/views/MonitorPanel.java Fri Jan 4 21:48:40 2013
@@ -43,7 +43,7 @@ import javax.swing.table.TableColumnMode
import org.apache.airavata.common.utils.BrowserLauncher;
import org.apache.airavata.common.utils.SwingUtil;
import org.apache.airavata.ws.monitor.Monitor;
-import org.apache.airavata.ws.monitor.MonitorEventData;
+import org.apache.airavata.ws.monitor.EventDataRepository;
import org.apache.airavata.ws.monitor.MonitorUtil;
import org.apache.airavata.xbaya.ui.XBayaGUI;
import org.apache.airavata.xbaya.ui.dialogs.monitor.MonitorWindow;
@@ -60,7 +60,7 @@ public class MonitorPanel implements XBa
private XBayaGUI xbayaGUI;
- private MonitorEventData tableSliderModel;
+ private EventDataRepository tableSliderModel;
private JTable table;
@@ -171,7 +171,7 @@ public class MonitorPanel implements XBa
String tip = null;
Point point = event.getPoint();
int colIndex = columnAtPoint(point);
- if (colIndex == MonitorEventData.Column.MESSAGE.ordinal()) {
+ if (colIndex == EventDataRepository.Column.MESSAGE.ordinal()) {
tip = "Double click here to see the full message.";
}
return tip;
@@ -194,7 +194,7 @@ public class MonitorPanel implements XBa
if (clickCount == 1) {
if (MonitorUtil.getType(message) == MonitorUtil.EventType.PUBLISH_URL) {
int column = MonitorPanel.this.table.columnAtPoint(point);
- if (column == MonitorEventData.Column.MESSAGE.ordinal()) {
+ if (column == EventDataRepository.Column.MESSAGE.ordinal()) {
String url = MonitorUtil.getLocation(message);
try {
BrowserLauncher.openURL(url);