You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2011/07/03 02:29:37 UTC

svn commit: r1142350 [14/18] - in /incubator/airavata/donations/ogce-donation/modules/ws-messaging: broker/ broker/customLibs/ broker/customLibs/activeMQ/ broker/src/ broker/src/main/ broker/src/main/java/ broker/src/main/java/wsmg/ broker/src/main/jav...

Added: incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/ConstructorProps.java
URL: http://svn.apache.org/viewvc/incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/ConstructorProps.java?rev=1142350&view=auto
==============================================================================
--- incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/ConstructorProps.java (added)
+++ incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/ConstructorProps.java Sun Jul  3 00:29:24 2011
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Lanka Software Foundation (LSF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The LSF 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 edu.indiana.extreme.lead.workflow_tracking.common;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * simple helper class to set properties as a chain. Extends Properties, so can be passed
+ * as constructor to notifier factory. can also load an external propetirs file that conforms
+ * to Java Properties file schema at http://java.sun.com/dtd/properties.dtd.
+ *
+ * e.g. props = util.Props.newProps(CONSTS.WORKFLOW_ID, "wfId001").
+ *                 set(CONSTS.NODE_ID, "nodeId001").
+ *                 set(CONSTS.TIMESTEP, "time0001").
+ *                 set(CONSTS.BROKER_URL, "rainier:12346"));
+ *     Notifier notifier = NotifierFactory.createNotifier(props);
+ *
+ * @version $Revision: 1.1 $
+ * @author 
+ */
+public class ConstructorProps  {
+
+    private Map<ConstructorConsts, Object> localMap;
+    public ConstructorProps() {
+        localMap = new HashMap<ConstructorConsts, Object>();
+    }
+
+    public static ConstructorProps newProps() {
+        return new ConstructorProps();
+    }
+
+    public static ConstructorProps newProps(ConstructorConsts key, Object value) {
+        return newProps().set(key, value);
+    }
+
+    public ConstructorProps set(ConstructorConsts key, Object value) {
+        if(!key.checkValueType(value.getClass()))
+            throw new ClassCastException("passed value class type: " + value.getClass() +
+                                         " != expected class type: " + key.getValueType() +
+                                         " for key: " + key);
+        localMap.put(key, value);
+        return this;
+    }
+
+    public Object get(ConstructorConsts key) {
+        return localMap.get(key);
+    }
+
+    public Object get(ConstructorConsts key, Object defaultValue) {
+        Object value = localMap.get(key);
+        return value == null ? defaultValue : value;
+    }
+}
+
+

Added: incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/DataDurationObj.java
URL: http://svn.apache.org/viewvc/incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/DataDurationObj.java?rev=1142350&view=auto
==============================================================================
--- incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/DataDurationObj.java (added)
+++ incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/DataDurationObj.java Sun Jul  3 00:29:24 2011
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Lanka Software Foundation (LSF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The LSF 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 edu.indiana.extreme.lead.workflow_tracking.common;
+
+import java.net.URI;
+
+/**
+ * Convinience class to record notification related information about a file/directory.
+ *
+ *
+ * @version $Revision: 1.1 $
+ * @author 
+ */
+public interface DataDurationObj extends DurationObj {
+
+    public DataObj getDataObj();
+    public URI getRemoteLocation();
+}
+
+
+

Added: incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/DataObj.java
URL: http://svn.apache.org/viewvc/incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/DataObj.java?rev=1142350&view=auto
==============================================================================
--- incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/DataObj.java (added)
+++ incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/DataObj.java Sun Jul  3 00:29:24 2011
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Lanka Software Foundation (LSF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The LSF 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 edu.indiana.extreme.lead.workflow_tracking.common;
+
+import java.net.URI;
+import java.util.List;
+
+/**
+ * Convinience class to record notification related information about a file/directory.
+ *
+ *
+ * @version $Revision: 1.1 $
+ * @author 
+ */
+public interface DataObj {
+
+    public URI getId();
+
+    public URI getLocalLocation();
+
+    public List<URI> getLocations();
+
+    public long getSizeInBytes();
+
+}
+
+
+
+

Added: incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/DurationObj.java
URL: http://svn.apache.org/viewvc/incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/DurationObj.java?rev=1142350&view=auto
==============================================================================
--- incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/DurationObj.java (added)
+++ incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/DurationObj.java Sun Jul  3 00:29:24 2011
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Lanka Software Foundation (LSF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The LSF 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 edu.indiana.extreme.lead.workflow_tracking.common;
+
+/**
+ * Convinience class to record the state of computation related notifications.
+ *
+ * @version $Revision: 1.1 $
+ * @author 
+ */
+public interface DurationObj {
+
+    public long markStartTimeMillis();
+
+    public long getStartTimeMillis();
+
+    public long markEndTimeMillis();
+
+    public long getEndTimeMillis();
+
+    public long getDurationMillis();
+}
+
+
+
+
+

Added: incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/InvocationContext.java
URL: http://svn.apache.org/viewvc/incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/InvocationContext.java?rev=1142350&view=auto
==============================================================================
--- incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/InvocationContext.java (added)
+++ incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/InvocationContext.java Sun Jul  3 00:29:24 2011
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Lanka Software Foundation (LSF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The LSF 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 edu.indiana.extreme.lead.workflow_tracking.common;
+
+
+
+/**
+ * TODO
+ *
+ * @version $Revision: 1.1 $
+ * @author 
+ */
+public interface InvocationContext extends InvocationEntity {
+
+    public InvocationEntity getRemoteEntity();
+
+}
+
+
+
+
+
+
+

Added: incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/InvocationEntity.java
URL: http://svn.apache.org/viewvc/incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/InvocationEntity.java?rev=1142350&view=auto
==============================================================================
--- incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/InvocationEntity.java (added)
+++ incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/InvocationEntity.java Sun Jul  3 00:29:24 2011
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Lanka Software Foundation (LSF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The LSF 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 edu.indiana.extreme.lead.workflow_tracking.common;
+
+import java.net.URI;
+
+import edu.indiana.extreme.lead.workflow_tracking.types.BaseIDType;
+
+/**
+ * TODO
+ *
+ * @version $Revision: 1.2 $
+ * @author 
+ */
+public interface InvocationEntity {
+
+    public String getWorkflowNodeID();
+
+    public URI getServiceID();
+
+    public Integer getWorkflowTimestep();
+
+    public URI getWorkflowID();
+
+    public BaseIDType toBaseIDType();
+}
+
+
+
+
+
+

Added: incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/NotifierConfig.java
URL: http://svn.apache.org/viewvc/incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/NotifierConfig.java?rev=1142350&view=auto
==============================================================================
--- incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/NotifierConfig.java (added)
+++ incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/NotifierConfig.java Sun Jul  3 00:29:24 2011
@@ -0,0 +1,27 @@
+package edu.indiana.extreme.lead.workflow_tracking.common;
+
+import org.apache.axis2.addressing.EndpointReference;
+
+public class NotifierConfig {
+    private EndpointReference bokerEpr; 
+    private String publisherImpl;
+    private boolean enableAsyncPublishing; 
+    public EndpointReference getBokerEpr() {
+        return bokerEpr;
+    }
+    public void setBokerEpr(EndpointReference bokerEpr) {
+        this.bokerEpr = bokerEpr;
+    }
+    public String getPublisherImpl() {
+        return publisherImpl;
+    }
+    public void setPublisherImpl(String publisherImpl) {
+        this.publisherImpl = publisherImpl;
+    }
+    public boolean isEnableAsyncPublishing() {
+        return enableAsyncPublishing;
+    }
+    public void setEnableAsyncPublishing(boolean enableAsyncPublishing) {
+        this.enableAsyncPublishing = enableAsyncPublishing;
+    } 
+}

Added: incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/NotifierCreationException.java
URL: http://svn.apache.org/viewvc/incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/NotifierCreationException.java?rev=1142350&view=auto
==============================================================================
--- incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/NotifierCreationException.java (added)
+++ incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/NotifierCreationException.java Sun Jul  3 00:29:24 2011
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Lanka Software Foundation (LSF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The LSF 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 edu.indiana.extreme.lead.workflow_tracking.common;
+
+/**
+ * TODO
+ *
+ * @version $Revision: 1.1 $
+ * @author 
+ */
+public class NotifierCreationException extends NotifierException {
+    public NotifierCreationException(String msg) {
+        super(msg);
+    }
+    public NotifierCreationException(Throwable ex) {
+        super(ex);
+    }
+}
+
+
+
+
+
+

Added: incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/NotifierException.java
URL: http://svn.apache.org/viewvc/incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/NotifierException.java?rev=1142350&view=auto
==============================================================================
--- incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/NotifierException.java (added)
+++ incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/NotifierException.java Sun Jul  3 00:29:24 2011
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Lanka Software Foundation (LSF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The LSF 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 edu.indiana.extreme.lead.workflow_tracking.common;
+
+/**
+ * TODO
+ *
+ * @version $Revision: 1.1 $
+ * @author 
+ */
+public class NotifierException extends RuntimeException {
+    public NotifierException(String msg) {
+        super(msg);
+    }
+    public NotifierException(Throwable ex) {
+        super(ex);
+    }
+    public NotifierException(String msg, Throwable ex) {
+        super(msg, ex);
+    }
+}
+
+
+
+
+
+
+

Added: incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/NotifierVersion.java
URL: http://svn.apache.org/viewvc/incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/NotifierVersion.java?rev=1142350&view=auto
==============================================================================
--- incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/NotifierVersion.java (added)
+++ incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/NotifierVersion.java Sun Jul  3 00:29:24 2011
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Lanka Software Foundation (LSF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The LSF 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 edu.indiana.extreme.lead.workflow_tracking.common;
+
+/**
+ * One place to put and check required version number.
+ *
+ * @version $Revision: 1.28 $
+ * @author 
+ */
+public class NotifierVersion {
+
+    private final static String TYPES_VERSION = "2.6";
+    private final static String IMPL_VERSION = "2.8.0";
+
+    public static String getTypesVersion(){ return TYPES_VERSION; }
+    public static String getImplVersion(){ return IMPL_VERSION; }
+
+    /**
+     * Print version when exxecuted from command line.
+     */
+    public static void main(String[] args) {
+        String IMPL_OPT = "-impl";
+        String TYPE_OPT = "-types";
+        if (IMPL_OPT.equals(args[0])) {
+            System.out.println(IMPL_VERSION);
+        } else if (TYPE_OPT.equals(args[0])) {
+                System.out.println(TYPES_VERSION);
+            } else {
+                System.out.println(NotifierVersion.class.getName() + " Error: "
+                                   + TYPE_OPT + " or " + IMPL_OPT + " is required");
+                System.exit(-1);
+            }
+    }
+}
+
+
+
+
+
+
+

Added: incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/WorkflowTrackingContext.java
URL: http://svn.apache.org/viewvc/incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/WorkflowTrackingContext.java?rev=1142350&view=auto
==============================================================================
--- incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/WorkflowTrackingContext.java (added)
+++ incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/common/WorkflowTrackingContext.java Sun Jul  3 00:29:24 2011
@@ -0,0 +1,62 @@
+package edu.indiana.extreme.lead.workflow_tracking.common;
+
+import java.util.Properties;
+
+import org.apache.axis2.addressing.EndpointReference;
+
+public class WorkflowTrackingContext {
+    private EndpointReference brokerEpr;
+    private String globalAnnotations;
+    private InvocationEntity myself;
+    private String publisherImpl;
+    private boolean enableAsyncPublishing; 
+    
+    public void setGlobalAnnotations(Properties globalAnnotations) {
+        StringBuffer buf = new StringBuffer();
+        if(globalAnnotations != null){
+            for(Object key:globalAnnotations.keySet()){
+                buf.append("<").append(key).append(">").append(globalAnnotations.get(key)).append("</").append(key).append(">");
+            }
+        }
+        this.globalAnnotations = buf.toString();
+    }
+
+    public String getGlobalAnnotations(){
+        return globalAnnotations;
+    }
+
+    public InvocationEntity getMyself() {
+        return myself;
+    }
+
+    public void setMyself(InvocationEntity myself) {
+        this.myself = myself;
+    }
+
+    public EndpointReference getBrokerEpr() {
+        return brokerEpr;
+    }
+
+    public void setBrokerEpr(EndpointReference brokerEpr) {
+        this.brokerEpr = brokerEpr;
+    }
+
+    public String getPublisherImpl() {
+        return publisherImpl;
+    }
+
+    public void setPublisherImpl(String publisherImpl) {
+        this.publisherImpl = publisherImpl;
+    }
+
+    public boolean isEnableAsyncPublishing() {
+        return enableAsyncPublishing;
+    }
+
+    public void setEnableAsyncPublishing(boolean enableAsyncPublishing) {
+        this.enableAsyncPublishing = enableAsyncPublishing;
+    }
+    
+    
+    
+}

Added: incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/impl/GenericNotifierImpl.java
URL: http://svn.apache.org/viewvc/incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/impl/GenericNotifierImpl.java?rev=1142350&view=auto
==============================================================================
--- incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/impl/GenericNotifierImpl.java (added)
+++ incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/impl/GenericNotifierImpl.java Sun Jul  3 00:29:24 2011
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Lanka Software Foundation (LSF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The LSF 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 edu.indiana.extreme.lead.workflow_tracking.impl;
+
+import org.apache.log4j.Logger;
+
+import edu.indiana.extreme.lead.workflow_tracking.AbstractNotifier;
+import edu.indiana.extreme.lead.workflow_tracking.GenericNotifier;
+import edu.indiana.extreme.lead.workflow_tracking.WorkflowTrackingException;
+import edu.indiana.extreme.lead.workflow_tracking.common.InvocationContext;
+import edu.indiana.extreme.lead.workflow_tracking.common.InvocationEntity;
+import edu.indiana.extreme.lead.workflow_tracking.common.WorkflowTrackingContext;
+import edu.indiana.extreme.lead.workflow_tracking.impl.state.InvocationContextImpl;
+import edu.indiana.extreme.lead.workflow_tracking.types.BaseNotificationType;
+import edu.indiana.extreme.lead.workflow_tracking.types.LogDebugDocument;
+import edu.indiana.extreme.lead.workflow_tracking.types.LogExceptionDocument;
+import edu.indiana.extreme.lead.workflow_tracking.types.LogInfoDocument;
+import edu.indiana.extreme.lead.workflow_tracking.types.LogWarningDocument;
+import edu.indiana.extreme.lead.workflow_tracking.types.PublishURLDocument;
+
+/**
+ * DOES NOT SUPPORT MULTI_THREADING -- PUBLISHER QUEUE, DATA CONSUMED/PRODUCED
+ * BATCHING
+ * 
+ * The constructor of this class uses the following properties from CONSTS:
+ * BROKER_URL, TOPIC, WORKFLOW_ID, NODE_ID, TIMESTEP, SERVICE_ID, ASYNC_PUB_MODE
+ * 
+ * @version $Revision: 1.18 $
+ * @author
+ */
+public class GenericNotifierImpl extends AbstractNotifier implements
+		GenericNotifier {
+
+	// private AnnotationProps globalAnnotations;
+
+	protected static final org.apache.log4j.Logger logger = Logger
+			.getLogger(GenericNotifierImpl.class);
+
+	public GenericNotifierImpl() throws WorkflowTrackingException {
+		super();
+	}
+
+	
+	public InvocationContext createInitialContext(
+			WorkflowTrackingContext context) {
+		if (context.getMyself() == null) {
+			throw new RuntimeException(
+					"Local entity passed to createInitialContext was NULL");
+		}
+		return new InvocationContextImpl(context.getMyself(), null);
+	}
+
+	
+	public InvocationContext createInvocationContext(
+			WorkflowTrackingContext context, InvocationEntity remoteEntity) {
+
+		if (context.getMyself() == null) {
+			throw new RuntimeException(
+					"Local entity passed to createInitialContext was NULL");
+		}
+
+		if (remoteEntity == null) {
+			throw new RuntimeException(
+					"Remote entity passed to createInitialContext was NULL");
+		}
+
+		return new InvocationContextImpl(context.getMyself(), remoteEntity);
+	}
+
+	
+	public void debug(WorkflowTrackingContext context,
+			String... descriptionAndAnnotation) {
+		LogDebugDocument logMsg = LogDebugDocument.Factory.newInstance();
+		BaseNotificationType log = logMsg.addNewLogDebug();
+		// add timestamp and notification source; add description, and
+		// annotation if present
+		sendNotification(context, logMsg, descriptionAndAnnotation, null);
+	}
+
+	
+	public void exception(WorkflowTrackingContext context,
+			String... descriptionAndAnnotation) {
+		LogExceptionDocument logMsg = LogExceptionDocument.Factory
+				.newInstance();
+		BaseNotificationType log = logMsg.addNewLogException();
+		sendNotification(context, logMsg, descriptionAndAnnotation, null);
+	}
+
+	
+	public void info(WorkflowTrackingContext context,
+			String... descriptionAndAnnotation) {
+		LogInfoDocument logMsg = LogInfoDocument.Factory.newInstance();
+		BaseNotificationType log = logMsg.addNewLogInfo();
+		// add timestamp and notification source; add description, and
+		// annotation if present
+		// publish activity
+		sendNotification(context, logMsg, descriptionAndAnnotation, null);
+	}
+
+	
+	public void publishURL(WorkflowTrackingContext context, String title,
+			String url, String... descriptionAndAnnotation) {
+		PublishURLDocument pubMsg = PublishURLDocument.Factory.newInstance();
+		PublishURLDocument.PublishURL pub = pubMsg.addNewPublishURL();
+		pub.setTitle(title);
+		pub.setLocation(url);
+		sendNotification(context, pubMsg,
+				descriptionAndAnnotation, null);
+	}
+
+	
+	public void warning(WorkflowTrackingContext context,
+			String... descriptionAndAnnotation) {
+		LogWarningDocument logMsg = LogWarningDocument.Factory.newInstance();
+		BaseNotificationType log = logMsg.addNewLogWarning();
+		sendNotification(context, logMsg, descriptionAndAnnotation, null);
+	}
+
+}

Added: incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/impl/NotifierImpl.java
URL: http://svn.apache.org/viewvc/incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/impl/NotifierImpl.java?rev=1142350&view=auto
==============================================================================
--- incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/impl/NotifierImpl.java (added)
+++ incubator/airavata/donations/ogce-donation/modules/ws-messaging/workflow-tracking/src/main/java/edu/indiana/extreme/lead/workflow_tracking/impl/NotifierImpl.java Sun Jul  3 00:29:24 2011
@@ -0,0 +1,566 @@
+/*
+ * Licensed to the Lanka Software Foundation (LSF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The LSF 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 edu.indiana.extreme.lead.workflow_tracking.impl;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import edu.indiana.extreme.lead.calder.types.CalderClusterNotificationType;
+import edu.indiana.extreme.lead.calder.types.CalderNotificationType;
+import edu.indiana.extreme.lead.calder.types.QueryActiveDocument;
+import edu.indiana.extreme.lead.calder.types.QueryExpiredDocument;
+import edu.indiana.extreme.lead.calder.types.QueryFailedToStartDocument;
+import edu.indiana.extreme.lead.calder.types.QueryNoDetectionDocument;
+import edu.indiana.extreme.lead.calder.types.QueryPublishResultDocument;
+import edu.indiana.extreme.lead.calder.types.QueryStartedDocument;
+import edu.indiana.extreme.lead.calder.types.TriggerFoundDocument;
+import edu.indiana.extreme.lead.commons.LeadCrosscutParametersUtil;
+import edu.indiana.extreme.lead.workflow_tracking.Notifier;
+import edu.indiana.extreme.lead.workflow_tracking.common.DataDurationObj;
+import edu.indiana.extreme.lead.workflow_tracking.common.DataObj;
+import edu.indiana.extreme.lead.workflow_tracking.common.DurationObj;
+import edu.indiana.extreme.lead.workflow_tracking.common.WorkflowTrackingContext;
+import edu.indiana.extreme.lead.workflow_tracking.impl.state.DataDurationImpl;
+import edu.indiana.extreme.lead.workflow_tracking.impl.state.DataObjImpl;
+import edu.indiana.extreme.lead.workflow_tracking.impl.state.DurationImpl;
+import edu.indiana.extreme.lead.workflow_tracking.types.ApplicationAuditDocument;
+import edu.indiana.extreme.lead.workflow_tracking.types.ApplicationAuditType;
+import edu.indiana.extreme.lead.workflow_tracking.types.ComputationDurationDocument;
+import edu.indiana.extreme.lead.workflow_tracking.types.DataReceiveDurationDocument;
+import edu.indiana.extreme.lead.workflow_tracking.types.DataSendDurationDocument;
+import edu.indiana.extreme.lead.workflow_tracking.types.DataTransferDurationType;
+import edu.indiana.extreme.lead.workflow_tracking.types.JobStatusDocument;
+import edu.indiana.extreme.lead.workflow_tracking.types.JobStatusType;
+import edu.indiana.extreme.lead.workflow_tracking.types.ResourceMappingDocument;
+import edu.indiana.extreme.lead.workflow_tracking.types.ResourceMappingType;
+
+/**
+ * DOES NOT SUPPORT MULTI_THREADING -- PUBLISHER QUEUE, DATA CONSUMED/PRODUCED
+ * BATCHING * Utility to create and send Lead notification messages for an
+ * application (script/web service). Since it extends WorkflowNotifierImpl, it
+ * can also send workflow related notifications.
+ * 
+ * The constructor of this class uses the following properties from CONSTS:
+ * BROKER_URL, TOPIC, WORKFLOW_ID, NODE_ID, TIMESTEP, SERVICE_ID, SERVICE_WSDL,
+ * IN_XML_MESSAGE, NAME_RESOLVER_URL, FILE_ACCESS_PROTOCOL,
+ * DISABLE_NAME_RESOLVER, BATCH_PROVENANCE_MSGS, ASYNC_PUB_MODE
+ * 
+ * @version $Revision: 1.14 $
+ * @author 
+ */
+public class NotifierImpl extends ProvenanceNotifierImpl implements Notifier {
+
+    private static final String WFT_NS = "http://lead.extreme.indiana.edu/namespaces/2006/06/workflow_tracking";
+
+    private static final HashMap<String, String> NS_MAP = new HashMap<String, String>();
+    static {
+        NS_MAP.put("", WFT_NS);
+    }
+
+//    public NotifierImpl(ConstructorProps props) throws XMLStreamException, IOException {
+//        super( props);
+//    }
+
+    /**
+     * @param batchProvMessages
+     *            whether provenance messages should be batched and sent as one
+     *            message
+     * @param publisher
+     *            a NotificationPublisher used to send the notifications
+     * 
+     */
+    public NotifierImpl() {}
+
+    // //////////////////////////////////////////////////////////////////////////////////////////////
+    //
+    // AUDIT NOTIFIER
+    //
+    // //////////////////////////////////////////////////////////////////////////////////////////////
+
+    /**
+     * {@inheritDoc}
+     * 
+     */
+    public void resourceMapping(WorkflowTrackingContext context, String mappedResource,
+            int retryStatusCount, String... descriptionAndAnnotation) {
+
+        ResourceMappingDocument mapMsg = ResourceMappingDocument.Factory
+                .newInstance();
+        ResourceMappingType map = mapMsg.addNewResourceMapping();
+        map.setMappedResource(mappedResource);
+        map.setRetryStatusCount(retryStatusCount);
+
+        sendNotification(context, mapMsg, descriptionAndAnnotation, "[Resource mapping done for" + mappedResource + "]");
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     */
+    public void jobStatus(WorkflowTrackingContext context, String status,
+            int retryCount, String... descriptionAndAnnotation) {
+
+        JobStatusDocument jobMsg = JobStatusDocument.Factory.newInstance();
+        JobStatusType job = jobMsg.addNewJobStatus();
+        job.setJobStatus(status);
+        job.setRetryCount(retryCount);
+
+        sendNotification(context, jobMsg, descriptionAndAnnotation, "[Job status is "
+                + status + "]");
+    }
+
+    // //////////////////////////////////////////////////////////////////////////////////////////////
+    //
+    // AUDIT NOTIFIER
+    //
+    // //////////////////////////////////////////////////////////////////////////////////////////////
+
+    /**
+     * {@inheritDoc}
+     * 
+     */
+    public void appAudit(WorkflowTrackingContext context, String name, URI jobHandle,
+            String host, String queueName, String jobId, String dName,
+            String projectId, String rsl, String... descriptionAndAnnotation) {
+        final ApplicationAuditDocument appAuditMsg = ApplicationAuditDocument.Factory
+                .newInstance();
+        final ApplicationAuditType appAudit = appAuditMsg
+                .addNewApplicationAudit();
+        appAudit.setJobHandle(jobHandle.toString());
+        appAudit.setName(name);
+        appAudit.setHost(host);
+        appAudit.setQueueName(queueName); // queueName is an optional element
+        appAudit.setJobId(jobId); // jobId is an optional element
+        appAudit.setDistinguishedName(dName);
+        appAudit.setProjectId(projectId); // projectId is an optional element
+        appAudit.setRsl(rsl);
+        
+        sendNotification(context, appAuditMsg, descriptionAndAnnotation,  "[Audit msg for '"
+                + name + "' at host " + host + " for DN " + dName + "]" // default
+        );
+    }
+
+    // //////////////////////////////////////////////////////////////////////////////////////////////
+    //
+    // PERFORMANCE NOTIFIER
+    //
+    // //////////////////////////////////////////////////////////////////////////////////////////////
+    /**
+     * {@inheritDoc}
+     * 
+     */
+    public DurationObj computationStarted() {
+
+        return new DurationImpl();
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     */
+    public DurationObj computationFinished(WorkflowTrackingContext context,
+            DurationObj compObj, String... descriptionAndAnnotation) {
+
+        if (context == null)
+            throw new RuntimeException("Local entity passed was NULL.");
+        if (compObj == null)
+            throw new RuntimeException("Comp duration object passed was NULL.");
+
+        // mark computation end
+        compObj.markEndTimeMillis();
+
+        // create activity
+        ComputationDurationDocument activity = ComputationDurationDocument.Factory
+                .newInstance();
+        ComputationDurationDocument.ComputationDuration activityType = activity
+                .addNewComputationDuration();
+
+        activityType.setDurationInMillis(compObj.getDurationMillis());
+
+        sendNotification(context, activity, descriptionAndAnnotation, "[Computation Time taken = " + compObj.getDurationMillis()
+                        + " ms]");
+
+        return compObj;
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     */
+    public DurationObj computationDuration(WorkflowTrackingContext context,
+            long durationMillis, String... descriptionAndAnnotation) {
+
+        DurationObj compObj = new DurationImpl(durationMillis);
+        return computationFinished(context, compObj, descriptionAndAnnotation);
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     */
+    public DataDurationObj dataSendStarted(DataObj dataObj, URI remoteLocation) {
+
+        return new DataDurationImpl(dataObj, remoteLocation);
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     */
+    public DataDurationObj dataSendFinished(WorkflowTrackingContext context,
+            DataDurationObj dataDurationObj, String... descriptionAndAnnotation) {
+
+        if (context == null)
+            throw new RuntimeException("Local entity passed was NULL.");
+        if (dataDurationObj == null)
+            throw new RuntimeException("Data duration object passed was NULL.");
+
+        DataObj dataObj = null;
+        if ((dataObj = dataDurationObj.getDataObj()) == null)
+            throw new RuntimeException(
+                    "Data duration object's DataObje was NULL.");
+        if (dataObj.getId() == null)
+            throw new RuntimeException("Data object's ID was NULL.");
+        if (dataObj.getLocalLocation() == null)
+            throw new RuntimeException(
+                    "Local file URL passed in DataDurationObj.getDataObj was NULL.");
+        if (dataDurationObj.getRemoteLocation() == null)
+            throw new RuntimeException(
+                    "Remote file URL passed in DataDurationObj was NULL.");
+
+        // mark computation end
+        dataDurationObj.markEndTimeMillis();
+
+        // create activity
+        DataSendDurationDocument activity = DataSendDurationDocument.Factory
+                .newInstance();
+        DataTransferDurationType activityType = activity
+                .addNewDataSendDuration();
+
+        activityType.setId(dataObj.getId().toString());
+        activityType.setDurationInMillis(dataDurationObj.getDurationMillis());
+        activityType.setSizeInBytes(dataObj.getSizeInBytes());
+
+        activityType.setSource(dataObj.getLocalLocation().toString());
+
+        activityType.setTarget(dataDurationObj.getRemoteLocation().toString());
+
+        sendNotification(context, activity, descriptionAndAnnotation, "[Data at "
+                + dataObj.getLocalLocation() + " was sent to "
+                + dataDurationObj.getRemoteLocation() + "]");
+
+        return dataDurationObj;
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     */
+    public DataDurationObj dataSendDuration(WorkflowTrackingContext context,
+            URI dataID, URI localLocation, URI remoteLocation, int sizeInBytes,
+            long durationMillis, String... descriptionAndAnnotation) {
+
+        List<URI> locations = new ArrayList<URI>(2);
+        locations.add(localLocation);
+        locations.add(remoteLocation);
+
+        DataObj dataObj = new DataObjImpl(dataID, locations, sizeInBytes);
+        DataDurationObj dataDurationObj = new DataDurationImpl(dataObj,
+                remoteLocation, durationMillis);
+
+        return dataSendFinished(context, dataDurationObj,
+                descriptionAndAnnotation);
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     */
+    public DataDurationObj dataReceiveStarted(URI dataID, URI remoteLocation,
+            URI localLocation) {
+
+        List<URI> locations = new ArrayList<URI>(2);
+        locations.add(localLocation);
+        locations.add(remoteLocation);
+
+        DataObj dataObj = new DataObjImpl(dataID, locations);
+        DataDurationObj dataDurationObj = new DataDurationImpl(dataObj,
+                remoteLocation);
+
+        return dataDurationObj;
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     */
+    public DataDurationObj dataReceiveFinished(WorkflowTrackingContext context,
+            DataDurationObj dataDurationObj, String... descriptionAndAnnotation) {
+
+        if (context == null)
+            throw new RuntimeException("Local entity passed was NULL.");
+        if (dataDurationObj == null)
+            throw new RuntimeException("Data duration object passed was NULL.");
+
+        DataObj dataObj = null;
+        if ((dataObj = dataDurationObj.getDataObj()) == null)
+            throw new RuntimeException(
+                    "Data duration object's DataObj was NULL.");
+        if (dataObj.getId() == null)
+            throw new RuntimeException("Data object's ID was NULL.");
+        if (dataObj.getLocalLocation() == null)
+            throw new RuntimeException(
+                    "Local file URL passed in DataDurationObj.getDataObj was NULL.");
+        if (dataDurationObj.getRemoteLocation() == null)
+            throw new RuntimeException(
+                    "Remote file URL passed in DataDurationObj was NULL.");
+
+        // mark computation end
+        dataDurationObj.markEndTimeMillis();
+
+        // create activity
+        DataReceiveDurationDocument activity = DataReceiveDurationDocument.Factory
+                .newInstance();
+        DataTransferDurationType activityType = activity
+                .addNewDataReceiveDuration();
+
+        activityType.setId(dataObj.getId().toString());
+        activityType.setDurationInMillis(dataDurationObj.getDurationMillis());
+        activityType.setSizeInBytes(dataObj.getSizeInBytes());
+
+        activityType.setSource(dataObj.getLocalLocation().toString());
+
+        activityType.setTarget(dataDurationObj.getRemoteLocation().toString());
+
+        sendNotification(context, activity, descriptionAndAnnotation, "[Data from "
+                + dataDurationObj.getRemoteLocation() + " was received at "
+                + dataObj.getLocalLocation() + "]");
+
+        return dataDurationObj;
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     */
+    public DataDurationObj dataReceiveDuration(WorkflowTrackingContext context,
+            URI dataID, URI remoteLocation, URI localLocation, int sizeInBytes,
+            long durationMillis, String... descriptionAndAnnotation) {
+
+        List<URI> locations = new ArrayList<URI>(2);
+        locations.add(localLocation);
+        locations.add(remoteLocation);
+
+        DataObj dataObj = new DataObjImpl(dataID, locations, sizeInBytes);
+        DataDurationObj dataDurationObj = new DataDurationImpl(dataObj,
+                remoteLocation, durationMillis);
+
+        return dataReceiveFinished(context, dataDurationObj,
+                descriptionAndAnnotation);
+    }
+
+    public void queryStarted(WorkflowTrackingContext context, String radarName,
+            String... descriptionAndAnnotation) {
+
+        QueryStartedDocument queryStartedDoc = QueryStartedDocument.Factory
+                .newInstance();
+        CalderNotificationType calderNotificationType = queryStartedDoc
+                .addNewQueryStarted();
+        calderNotificationType.setRadarName(radarName);
+
+        sendNotification(context, queryStartedDoc, descriptionAndAnnotation, "[Query started for " + radarName + "]");
+    }
+
+    public void queryFailedToStart(WorkflowTrackingContext context, String radarName,
+            String... descriptionAndAnnotation) {
+        QueryFailedToStartDocument queryFailedToStartDoc = QueryFailedToStartDocument.Factory
+                .newInstance();
+        CalderNotificationType calderNotificationType = queryFailedToStartDoc
+                .addNewQueryFailedToStart();
+        calderNotificationType.setRadarName(radarName);
+
+        sendNotification(context, queryFailedToStartDoc, descriptionAndAnnotation, "[Query failed to start for " + radarName + "]");
+
+    }
+
+    public void queryActive(WorkflowTrackingContext context, String radarName,
+            String... descriptionAndAnnotation) {
+        QueryActiveDocument queryActiveDoc = QueryActiveDocument.Factory
+                .newInstance();
+        CalderNotificationType calderNotificationType = queryActiveDoc
+                .addNewQueryActive();
+        calderNotificationType.setRadarName(radarName);
+
+        sendNotification(context, queryActiveDoc, descriptionAndAnnotation, "[Query active for " + radarName + "]");
+
+    }
+
+    public void queryExpired(WorkflowTrackingContext context, String radarName,
+            String... descriptionAndAnnotation) {
+        QueryExpiredDocument queryExpiredDoc = QueryExpiredDocument.Factory
+                .newInstance();
+        CalderNotificationType calderNotificationType = queryExpiredDoc
+                .addNewQueryExpired();
+        calderNotificationType.setRadarName(radarName);
+
+        sendNotification(context, queryExpiredDoc, descriptionAndAnnotation, "[Query Expired for " + radarName + "]");
+
+    }
+
+    public void triggerFound(WorkflowTrackingContext context, String radarName,
+            String... descriptionAndAnnotation) {
+        TriggerFoundDocument triggerFoundDoc = TriggerFoundDocument.Factory
+                .newInstance();
+        CalderNotificationType calderNotificationType = triggerFoundDoc
+                .addNewTriggerFound();
+        calderNotificationType.setRadarName(radarName);
+
+        sendNotification(context, triggerFoundDoc, descriptionAndAnnotation, "[Trigger found for " + radarName + "]");
+
+    }
+
+    public void queryPublishResult(WorkflowTrackingContext context,
+            LeadCrosscutParametersUtil leadCrosscutParametersUtil) {
+        QueryPublishResultDocument queryPublishResultDoc = QueryPublishResultDocument.Factory
+                .newInstance();
+        CalderClusterNotificationType calderClusterNotificationType = queryPublishResultDoc
+                .addNewQueryPublishResult();
+        calderClusterNotificationType.setCtrlat(leadCrosscutParametersUtil
+                .getCenterLatitude());
+        calderClusterNotificationType.setCtrlon(leadCrosscutParametersUtil
+                .getCenterLongitude());
+        calderClusterNotificationType.setNorthbc(leadCrosscutParametersUtil
+                .getNorthBc());
+        calderClusterNotificationType.setSouthbc(leadCrosscutParametersUtil
+                .getSouthBc());
+        calderClusterNotificationType.setEastbc(leadCrosscutParametersUtil
+                .getEastBc());
+        calderClusterNotificationType.setWestbc(leadCrosscutParametersUtil
+                .getWestBc());
+
+        sendNotification(context, queryPublishResultDoc, null, "[Clustering result for query found at " +
+         leadCrosscutParametersUtil.getCenterLatitude() + " "+
+         leadCrosscutParametersUtil.getCenterLongitude() +"]");
+
+    }
+
+    public void queryNoDetection(WorkflowTrackingContext context, String... descriptionAndAnnotation){
+        QueryNoDetectionDocument queryNoDetectionDoc = QueryNoDetectionDocument.Factory
+        .newInstance();
+        CalderNotificationType calderNotificationType = queryNoDetectionDoc.addNewQueryNoDetection();
+        calderNotificationType.setRadarName("");
+        sendNotification(context, queryNoDetectionDoc, descriptionAndAnnotation, "[No mining results detected for query]");        
+    }
+
+    // /**
+    // * Create a notifier object with the default values set. Creating this is
+    // convinient
+    // * if the same service/application needs to generate multiple messages,
+    // since the various
+    // * IDs passed in the constructor will be filled into the message
+    // automatically. If you're
+    // * sending just a single message from a service/app, you can use the
+    // static methods that are
+    // * available.
+    // *
+    // * @param brokerLoc_ the location of the broker service in the form
+    // "host:port"
+    // * @param topic_ the topic to which messages should be sent
+    // * @param workflowID_ the workflow instance ID to which this
+    // service/application belongs
+    // * @param nodeID_ the node ID within the workflow which this
+    // service/application represents
+    // * @param wfTimeStep_ the unique timestep within the workflow instance at
+    // which this
+    // * service/application invocation is taking place
+    // * @param serviceID_
+    // * @param serviceWsdl_ the concrete WSDL of the service (or service
+    // wrapper of an
+    // * application) which is sending the notification. This is used
+    // * to retrieve the unique service QName that can identify this
+    // * service instance, and to get the schema for the response message
+    // * @param incomingMessageXml_ the icoming message that started this
+    // service that should contain
+    // * end point reference (ReplyTo EPR is minimum) where the results of
+    // * this service/application should be sent to.
+    // * @param nameResolverWsdl_ WSDL location of name resolver
+    // * @param fileProtocol_ the protocol used to access local files created by
+    // this application. e.g. gridftp://, http://, ftp://, etc. Defaults to
+    // file://.
+    // * @param enableNameResolver whether name resolution is enabled
+    // * @param batchProvMessages whether provenance messages should be batched
+    // and sent as one message
+    // */
+    // private void init(String brokerLoc_, String topic_,
+    // String workflowID_, String nodeID_, String wfTimeStep_,
+    // String serviceID_, String serviceWsdl_,
+    // String incomingMessageXml_,
+    // String nameResolverWsdl_,
+    // String fileProtocol_,
+    // boolean enableNameResolver,
+    // boolean enableBatchProvenance) {
+    //
+
+    /**
+     * Method main. Simple self test by generating some notifications
+     * 
+     * @param args
+     *            a String[]
+     * 
+     */
+    // public static void main(String args[]) throws Exception {
+    //
+    // System.err.println("Started " + NotifierImpl.class);
+    //
+    // for (int i=0; i < 10; i++) {
+    // ProvenanceNotifier n =
+    // new NotifierImpl(Props.newProps(BROKER_URL,
+    // "rainier.extreme.indiana.edu:12346"). // brokerLoc
+    // set(TOPIC, "lead_wft_test_topic"). // topic
+    // set(WORKFLOW_ID, "wfId93643").
+    // set(NODE_ID, "nodeId26").
+    // set(TIMESTEP, "12"). // id'ss
+    // set(SERVICE_ID, "http://service.qname/").
+    // set(NAME_RESOLVER_URL,
+    // "http://rainier.extreme.indiana.edu:33330/name_resolver?wsdl").
+    // set(ENABLE_NAME_RESOLVER, "true")
+    // );
+    //
+    // n.serviceInvoked("SampleApplication");
+    // //n.debug("debug message from the applcation..");
+    // //n.publishURL("LEAD home", "http://lead.ou.edu");
+    // n.dataConsumed("urn:lead-ou-edu:iub:f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
+    // "/foo/bar/input.data");
+    // n.fileProduced("/foo/bar/output.data");
+    // n.dataConsumed("urn:lead-ou-edu:iub:f81d4fae-7dec-11d0-a765-00a0c91e6bf7",
+    // "/acme/input.2");
+    // n.fileProduced("/acme/output.2");
+    // n.sendingResult(null, null);
+    // }
+    // //n.workflowFinishedSuccess("rainier.extreme.indiana.edu:12346",
+    // "lead_wft_test_topic", "wfId93643");
+    // System.err.println("finsished " + NotifierImpl.class);
+    // }
+}
+
+