[savara-commits] savara SVN: r660 - in branches/experimental/2.0.x/bundles/org.savara.activity: src/main/java/org/savara/activity and 3 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Fri Feb 11 11:47:04 EST 2011
Author: objectiser
Date: 2011-02-11 11:47:02 -0500 (Fri, 11 Feb 2011)
New Revision: 660
Added:
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityAnalyser.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityNotifier.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityProcessor.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityProcessorFactory.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityStore.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityValidator.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/DefaultActivityProcessor.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/ComponentActivity.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/InteractionActivity.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageParameter.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Status.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/test/java/org/savara/activity/DefaultActivityProcessorTest.java
Removed:
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Error.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Facet.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/InstanceFinished.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/InstanceStarted.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Interaction.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Lifecycle.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageReceived.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageSent.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Process.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Task.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/services/
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/validation/
branches/experimental/2.0.x/bundles/org.savara.activity/src/test/java/org/savara/activity/validation/
Modified:
branches/experimental/2.0.x/bundles/org.savara.activity/schema/Activity.xsd
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Activity.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Analysis.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Context.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/ObjectFactory.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/ProtocolAnalysis.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/package-info.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/osgi/Activator.java
Log:
Initial refactoring based on the design note: http://community.jboss.org/wiki/DesignNoteActivityMonitoringManagementinSAVARA
Modified: branches/experimental/2.0.x/bundles/org.savara.activity/schema/Activity.xsd
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/schema/Activity.xsd 2011-02-11 15:40:48 UTC (rev 659)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/schema/Activity.xsd 2011-02-11 16:47:02 UTC (rev 660)
@@ -3,110 +3,66 @@
<complexType name="Activity">
<sequence>
- <element name="facet" type="tns:Facet" maxOccurs="unbounded" minOccurs="1"></element>
<element name="analysis" type="tns:Analysis" minOccurs="0"
maxOccurs="unbounded">
</element>
+ <element name="context" type="tns:Context" minOccurs="0"
+ maxOccurs="unbounded">
+ </element>
</sequence>
<attribute name="id" type="ID"></attribute>
- <attribute name="componentName" type="string"></attribute>
- <attribute name="componentInstanceId" type="string"></attribute>
<attribute name="timestamp" type="dateTime"></attribute>
</complexType>
- <complexType name="Facet" abstract="true"></complexType>
+ <complexType name="Analysis" abstract="true"></complexType>
<complexType name="Context">
- <complexContent>
- <extension base="tns:Facet">
- <attribute name="name" type="string"></attribute>
- <attribute name="value" type="string"></attribute>
- </extension>
- </complexContent>
+ <attribute name="name" type="string"></attribute>
+ <attribute name="value" type="string"></attribute>
</complexType>
- <complexType name="Process">
+ <complexType name="ComponentActivity">
<complexContent>
- <extension base="tns:Facet">
- <!-- May be the same as the 'componentInstanceId' -->
- <attribute name="instanceId" type="string"></attribute>
- <attribute name="definitionId" type="string"></attribute>
- <attribute name="name" type="string"></attribute>
+ <extension base="tns:Activity">
+ <attribute name="instanceId" type="string"></attribute>
+ <attribute name="componentId" type="string"></attribute>
+ <attribute name="componentName" type="string"></attribute>
+ <attribute name="status" type="tns:Status"></attribute>
</extension>
</complexContent>
</complexType>
-
- <complexType name="Task">
+
+ <simpleType name="Status">
+ <restriction base="string">
+ <enumeration value="Started"></enumeration>
+ <enumeration value="Finished"></enumeration>
+ </restriction>
+ </simpleType>
+
+ <complexType name="InteractionActivity">
<complexContent>
- <extension base="tns:Facet">
- <attribute name="definitionId" type="string"></attribute>
- <attribute name="name" type="string"></attribute>
- </extension>
- </complexContent>
- </complexType>
-
- <complexType name="Error">
- <complexContent>
- <extension base="tns:Facet">
- <attribute name="description" type="string"></attribute>
- <attribute name="type" type="string"></attribute>
- </extension>
- </complexContent>
- </complexType>
-
- <complexType name="Interaction" abstract="true">
- <complexContent>
- <extension base="tns:Facet">
+ <extension base="tns:Activity">
<sequence>
- <element name="value" type="anyURI"></element>
+ <element name="parameter" type="tns:MessageParameter"></element>
</sequence>
+ <attribute name="destinationType" type="string"></attribute>
+ <attribute name="destinationAddress" type="string"></attribute>
+ <attribute name="replyToAddress" type="string"></attribute>
<attribute name="operationName" type="string"></attribute>
<attribute name="faultName" type="string"></attribute>
- <attribute name="messageType" type="string"></attribute>
<attribute name="request" type="boolean" default="true"></attribute>
+ <attribute name="outbound" type="boolean" default="true"></attribute>
</extension>
</complexContent>
</complexType>
- <complexType name="MessageSent">
- <complexContent>
- <extension base="tns:Interaction">
- <attribute name="destination" type="string"></attribute>
- </extension>
- </complexContent>
+ <complexType name="MessageParameter">
+ <sequence>
+ <element name="value" type="anyURI"></element>
+ </sequence>
+ <attribute name="type" type="string"></attribute>
</complexType>
-
- <complexType name="MessageReceived">
- <complexContent>
- <extension base="tns:Interaction">
- <attribute name="source" type="string"></attribute>
- </extension>
- </complexContent>
- </complexType>
- <complexType name="Lifecycle" abstract="true">
- <complexContent>
- <extension base="tns:Facet">
- </extension>
- </complexContent>
- </complexType>
-
- <complexType name="InstanceFinished">
- <complexContent>
- <extension base="tns:Lifecycle">
- </extension>
- </complexContent>
- </complexType>
-
- <complexType name="InstanceStarted">
- <complexContent>
- <extension base="tns:Lifecycle">
- </extension>
- </complexContent>
- </complexType>
-
- <complexType name="Analysis" abstract="true"></complexType>
-
<complexType name="ProtocolAnalysis">
<complexContent>
<extension base="tns:Analysis">
@@ -116,5 +72,7 @@
</extension>
</complexContent>
</complexType>
-
+
+
+ <element name="activity" type="tns:Activity"></element>
</schema>
\ No newline at end of file
Copied: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityAnalyser.java (from rev 648, branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/validation/ActivityAnalyser.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityAnalyser.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityAnalyser.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008-11, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.activity;
+
+import org.savara.activity.model.Activity;
+
+/**
+ * This interface is used to provide activity analysis capabilities.
+ *
+ */
+public interface ActivityAnalyser {
+
+ /**
+ * This method analyses the supplied activity.
+ *
+ * @param activity The activity to be analysed
+ */
+ public void analyse(Activity activity);
+
+}
Copied: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityNotifier.java (from rev 648, branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/services/ActivityNotificationService.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityNotifier.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityNotifier.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008-11, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.activity;
+
+import org.savara.activity.model.Activity;
+import org.savara.common.config.Configuration;
+
+/**
+ * This interface represents the activity notification service,
+ * used to publish activity records after they have been
+ * recorded.
+ *
+ */
+public interface ActivityNotifier {
+
+ /**
+ * This method initializes the notification service using
+ * the supplied configuration.
+ *
+ * @param config
+ */
+ public void initialize(Configuration config);
+
+ /**
+ * This method publishes the supplied activity event.
+ *
+ * @param activity The activity event
+ */
+ public void publish(Activity activity);
+
+ /**
+ * This method closes the notification service.
+ */
+ public void close();
+
+}
Copied: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityProcessor.java (from rev 648, branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/validation/ActivityValidationManager.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityProcessor.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityProcessor.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008-11, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.activity;
+
+import org.savara.activity.model.Activity;
+
+/**
+ * This interface represents the activity processor
+ * responsible for managing a set of analysers and validators,
+ * and applying a supplied activity against them. The analysers
+ * are applied prior to the validators, to derived additional
+ * information that may be required during validation.
+ */
+public interface ActivityProcessor {
+
+ /**
+ * This method adds a new activity validator.
+ *
+ * @param validator The validator
+ */
+ public void addActivityValidator(ActivityValidator validator);
+
+ /**
+ * This method removes an existing activity validator.
+ *
+ * @param validator The validator
+ */
+ public void removeActivityValidator(ActivityValidator validator);
+
+ /**
+ * This method adds a new activity analyser.
+ *
+ * @param analyser The analyser
+ */
+ public void addActivityAnalyser(ActivityAnalyser analyser);
+
+ /**
+ * This method removes an existing activity analyser.
+ *
+ * @param analyser The analyser
+ */
+ public void removeActivityAnalyser(ActivityAnalyser analyser);
+
+ /**
+ * This method processes the supplied activity event against
+ * any predefined analysers and validators.
+ *
+ * @param activity The activity event to be processed
+ */
+ public void process(Activity activity);
+
+}
Copied: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityProcessorFactory.java (from rev 648, branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/validation/ActivityValidationManagerFactory.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityProcessorFactory.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityProcessorFactory.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008-11, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.activity;
+
+/**
+ * This class provides a factory for the ActivityProcessor
+ * component.
+ *
+ */
+public class ActivityProcessorFactory {
+
+ private static ActivityProcessor m_instance=null;
+
+ /**
+ * This method returns the activity processor.
+ *
+ * @return The activity processor
+ */
+ public static ActivityProcessor getActivityProcessor() {
+ return(m_instance);
+ }
+
+ /**
+ * This method sets the activity processor associated with the
+ * factory.
+ *
+ * @param processor The activity processor
+ */
+ public static void setActivityProcessor(ActivityProcessor processor) {
+ m_instance = processor;
+ }
+}
Copied: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityStore.java (from rev 648, branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/services/ActivityLogService.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityStore.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityStore.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008-11, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.activity;
+
+import org.savara.activity.model.Activity;
+import org.savara.common.config.Configuration;
+
+/**
+ * This interface represents the activity store
+ * used to log activity events in a persistence store
+ * and provide a query mechanism.
+ *
+ */
+public interface ActivityStore {
+
+ /**
+ * This method initializes the log service using
+ * the supplied configuration.
+ *
+ * @param config
+ */
+ public void initialize(Configuration config);
+
+ /**
+ * This method logs the activity record.
+ *
+ * @param activity The activity
+ */
+ public void store(Activity activity);
+
+ /**
+ * This method retrieves the activity record
+ * associated with the supplied id.
+ *
+ * @param id The activity id, or null if not found
+ */
+ public Activity queryById(String id);
+
+ /**
+ * This method closes the log service.
+ */
+ public void close();
+
+}
Copied: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityValidator.java (from rev 648, branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/validation/ActivityValidator.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityValidator.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityValidator.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008-11, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.activity;
+
+import org.savara.activity.model.Activity;
+
+/**
+ * This interface is used to provide activity validation capabilities.
+ *
+ */
+public interface ActivityValidator {
+
+ /**
+ * This method validates the supplied activity.
+ *
+ * @param activity The activity to be validated
+ */
+ public void validate(Activity activity);
+
+}
Copied: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/DefaultActivityProcessor.java (from rev 648, branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/validation/DefaultActivityValidationManager.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/DefaultActivityProcessor.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/DefaultActivityProcessor.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -0,0 +1,93 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008-11, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.activity;
+
+import org.savara.activity.model.Activity;
+
+/**
+ * This class implements a default activity validation manager
+ * responsible for managing a set of analysers and validators,
+ * and applying a supplied activity against them. The analysers
+ * are applied prior to the validators, to derived additional
+ * information that may be required during validation.
+ */
+public class DefaultActivityProcessor implements ActivityProcessor {
+
+ private java.util.List<ActivityValidator> m_validators=new java.util.Vector<ActivityValidator>();
+ private java.util.List<ActivityAnalyser> m_analysers=new java.util.Vector<ActivityAnalyser>();
+
+ protected java.util.List<ActivityAnalyser> getAnalysers() {
+ return(m_analysers);
+ }
+
+ protected java.util.List<ActivityValidator> getValidators() {
+ return(m_validators);
+ }
+
+ /**
+ * This method adds a new activity validator.
+ *
+ * @param validator The validator
+ */
+ public void addActivityValidator(ActivityValidator validator) {
+ m_validators.add(validator);
+ }
+
+ /**
+ * This method removes an existing activity validator.
+ *
+ * @param validator The validator
+ */
+ public void removeActivityValidator(ActivityValidator validator) {
+ m_validators.remove(validator);
+ }
+
+ /**
+ * This method adds a new activity analyser.
+ *
+ * @param analyser The analyser
+ */
+ public void addActivityAnalyser(ActivityAnalyser analyser) {
+ m_analysers.add(analyser);
+ }
+
+ /**
+ * This method removes an existing activity analyser.
+ *
+ * @param analyser The analyser
+ */
+ public void removeActivityAnalyser(ActivityAnalyser analyser) {
+ m_analysers.remove(analyser);
+ }
+
+ /**
+ * This method processes the supplied activity event against
+ * any predefined analysers and validators.
+ *
+ * @param activity The activity event to be processed
+ */
+ public void process(Activity activity) {
+ for (ActivityAnalyser aa : m_analysers) {
+ aa.analyse(activity);
+ }
+ for (ActivityValidator av : m_validators) {
+ av.validate(activity);
+ }
+ }
+
+}
Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Activity.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Activity.java 2011-02-11 15:40:48 UTC (rev 659)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Activity.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -1,8 +1,8 @@
//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.26 at 04:49:35 PM GMT
+// Generated on: 2011.02.11 at 03:55:15 PM GMT
//
@@ -13,9 +13,9 @@
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
@@ -32,12 +32,10 @@
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
- * <element name="facet" type="{http://www.savara.org/activity}Facet" maxOccurs="unbounded"/>
* <element name="analysis" type="{http://www.savara.org/activity}Analysis" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="context" type="{http://www.savara.org/activity}Context" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
- * <attribute name="componentName" type="{http://www.w3.org/2001/XMLSchema}string" />
- * <attribute name="componentInstanceId" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="timestamp" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
* </restriction>
* </complexContent>
@@ -48,83 +46,82 @@
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Activity", propOrder = {
- "facet",
- "analysis"
+ "analysis",
+ "context"
})
+ at XmlSeeAlso({
+ ComponentActivity.class,
+ InteractionActivity.class
+})
public class Activity {
- @XmlElement(required = true)
- protected List<Facet> facet;
protected List<Analysis> analysis;
- @XmlAttribute(name = "id")
+ protected List<Context> context;
+ @XmlAttribute
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
protected String id;
- @XmlAttribute(name = "componentName")
- protected String componentName;
- @XmlAttribute(name = "componentInstanceId")
- protected String componentInstanceId;
- @XmlAttribute(name = "timestamp")
+ @XmlAttribute
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar timestamp;
/**
- * Gets the value of the facet property.
+ * Gets the value of the analysis property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the facet property.
+ * This is why there is not a <CODE>set</CODE> method for the analysis property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
- * getFacet().add(newItem);
+ * getAnalysis().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
- * {@link Facet }
+ * {@link Analysis }
*
*
*/
- public List<Facet> getFacet() {
- if (facet == null) {
- facet = new ArrayList<Facet>();
+ public List<Analysis> getAnalysis() {
+ if (analysis == null) {
+ analysis = new ArrayList<Analysis>();
}
- return this.facet;
+ return this.analysis;
}
/**
- * Gets the value of the analysis property.
+ * Gets the value of the context property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the analysis property.
+ * This is why there is not a <CODE>set</CODE> method for the context property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
- * getAnalysis().add(newItem);
+ * getContext().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
- * {@link Analysis }
+ * {@link Context }
*
*
*/
- public List<Analysis> getAnalysis() {
- if (analysis == null) {
- analysis = new ArrayList<Analysis>();
+ public List<Context> getContext() {
+ if (context == null) {
+ context = new ArrayList<Context>();
}
- return this.analysis;
+ return this.context;
}
/**
@@ -152,54 +149,6 @@
}
/**
- * Gets the value of the componentName property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getComponentName() {
- return componentName;
- }
-
- /**
- * Sets the value of the componentName property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setComponentName(String value) {
- this.componentName = value;
- }
-
- /**
- * Gets the value of the componentInstanceId property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getComponentInstanceId() {
- return componentInstanceId;
- }
-
- /**
- * Sets the value of the componentInstanceId property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setComponentInstanceId(String value) {
- this.componentInstanceId = value;
- }
-
- /**
* Gets the value of the timestamp property.
*
* @return
Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Analysis.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Analysis.java 2011-02-11 15:40:48 UTC (rev 659)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Analysis.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -1,8 +1,8 @@
//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.26 at 04:49:35 PM GMT
+// Generated on: 2011.02.11 at 03:55:15 PM GMT
//
Added: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/ComponentActivity.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/ComponentActivity.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/ComponentActivity.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -0,0 +1,148 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2011.02.11 at 03:55:15 PM GMT
+//
+
+
+package org.savara.activity.model;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for ComponentActivity complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="ComponentActivity">
+ * <complexContent>
+ * <extension base="{http://www.savara.org/activity}Activity">
+ * <attribute name="instanceId" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="componentId" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="componentName" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="status" type="{http://www.savara.org/activity}Status" />
+ * </extension>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "ComponentActivity")
+public class ComponentActivity
+ extends Activity
+{
+
+ @XmlAttribute
+ protected String instanceId;
+ @XmlAttribute
+ protected String componentId;
+ @XmlAttribute
+ protected String componentName;
+ @XmlAttribute
+ protected Status status;
+
+ /**
+ * Gets the value of the instanceId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getInstanceId() {
+ return instanceId;
+ }
+
+ /**
+ * Sets the value of the instanceId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setInstanceId(String value) {
+ this.instanceId = value;
+ }
+
+ /**
+ * Gets the value of the componentId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getComponentId() {
+ return componentId;
+ }
+
+ /**
+ * Sets the value of the componentId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setComponentId(String value) {
+ this.componentId = value;
+ }
+
+ /**
+ * Gets the value of the componentName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getComponentName() {
+ return componentName;
+ }
+
+ /**
+ * Sets the value of the componentName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setComponentName(String value) {
+ this.componentName = value;
+ }
+
+ /**
+ * Gets the value of the status property.
+ *
+ * @return
+ * possible object is
+ * {@link Status }
+ *
+ */
+ public Status getStatus() {
+ return status;
+ }
+
+ /**
+ * Sets the value of the status property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Status }
+ *
+ */
+ public void setStatus(Status value) {
+ this.status = value;
+ }
+
+}
Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Context.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Context.java 2011-02-11 15:40:48 UTC (rev 659)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Context.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -1,8 +1,8 @@
//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.26 at 04:49:35 PM GMT
+// Generated on: 2011.02.11 at 03:55:15 PM GMT
//
@@ -22,10 +22,10 @@
* <pre>
* <complexType name="Context">
* <complexContent>
- * <extension base="{http://www.savara.org/activity}Facet">
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
* <attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" />
- * </extension>
+ * </restriction>
* </complexContent>
* </complexType>
* </pre>
@@ -34,13 +34,11 @@
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Context")
-public class Context
- extends Facet
-{
+public class Context {
- @XmlAttribute(name = "name")
+ @XmlAttribute
protected String name;
- @XmlAttribute(name = "value")
+ @XmlAttribute
protected String value;
/**
Deleted: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Error.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Error.java 2011-02-11 15:40:48 UTC (rev 659)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Error.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -1,94 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.26 at 04:49:35 PM GMT
-//
-
-
-package org.savara.activity.model;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for Error complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Error">
- * <complexContent>
- * <extension base="{http://www.savara.org/activity}Facet">
- * <attribute name="description" type="{http://www.w3.org/2001/XMLSchema}string" />
- * <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
- * </extension>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "Error")
-public class Error
- extends Facet
-{
-
- @XmlAttribute(name = "description")
- protected String description;
- @XmlAttribute(name = "type")
- protected String type;
-
- /**
- * Gets the value of the description property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * Sets the value of the description property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setDescription(String value) {
- this.description = value;
- }
-
- /**
- * Gets the value of the type property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getType() {
- return type;
- }
-
- /**
- * Sets the value of the type property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setType(String value) {
- this.type = value;
- }
-
-}
Deleted: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Facet.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Facet.java 2011-02-11 15:40:48 UTC (rev 659)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Facet.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -1,46 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.26 at 04:49:35 PM GMT
-//
-
-
-package org.savara.activity.model;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for Facet complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Facet">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "Facet")
- at XmlSeeAlso({
- Error.class,
- Context.class,
- Process.class,
- Task.class,
- Interaction.class,
- Lifecycle.class
-})
-public abstract class Facet {
-
-
-}
Deleted: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/InstanceFinished.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/InstanceFinished.java 2011-02-11 15:40:48 UTC (rev 659)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/InstanceFinished.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -1,39 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.26 at 04:49:35 PM GMT
-//
-
-
-package org.savara.activity.model;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for InstanceFinished complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="InstanceFinished">
- * <complexContent>
- * <extension base="{http://www.savara.org/activity}Lifecycle">
- * </extension>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "InstanceFinished")
-public class InstanceFinished
- extends Lifecycle
-{
-
-
-}
Deleted: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/InstanceStarted.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/InstanceStarted.java 2011-02-11 15:40:48 UTC (rev 659)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/InstanceStarted.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -1,39 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.26 at 04:49:35 PM GMT
-//
-
-
-package org.savara.activity.model;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for InstanceStarted complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="InstanceStarted">
- * <complexContent>
- * <extension base="{http://www.savara.org/activity}Lifecycle">
- * </extension>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "InstanceStarted")
-public class InstanceStarted
- extends Lifecycle
-{
-
-
-}
Deleted: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Interaction.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Interaction.java 2011-02-11 15:40:48 UTC (rev 659)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Interaction.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -1,191 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.26 at 04:49:35 PM GMT
-//
-
-
-package org.savara.activity.model;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for Interaction complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Interaction">
- * <complexContent>
- * <extension base="{http://www.savara.org/activity}Facet">
- * <sequence>
- * <element name="value" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
- * </sequence>
- * <attribute name="operationName" type="{http://www.w3.org/2001/XMLSchema}string" />
- * <attribute name="faultName" type="{http://www.w3.org/2001/XMLSchema}string" />
- * <attribute name="messageType" type="{http://www.w3.org/2001/XMLSchema}string" />
- * <attribute name="request" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
- * </extension>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "Interaction", propOrder = {
- "value"
-})
- at XmlSeeAlso({
- MessageReceived.class,
- MessageSent.class
-})
-public abstract class Interaction
- extends Facet
-{
-
- @XmlElement(required = true)
- @XmlSchemaType(name = "anyURI")
- protected String value;
- @XmlAttribute(name = "operationName")
- protected String operationName;
- @XmlAttribute(name = "faultName")
- protected String faultName;
- @XmlAttribute(name = "messageType")
- protected String messageType;
- @XmlAttribute(name = "request")
- protected Boolean request;
-
- /**
- * Gets the value of the value property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getValue() {
- return value;
- }
-
- /**
- * Sets the value of the value property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setValue(String value) {
- this.value = value;
- }
-
- /**
- * Gets the value of the operationName property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getOperationName() {
- return operationName;
- }
-
- /**
- * Sets the value of the operationName property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setOperationName(String value) {
- this.operationName = value;
- }
-
- /**
- * Gets the value of the faultName property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getFaultName() {
- return faultName;
- }
-
- /**
- * Sets the value of the faultName property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setFaultName(String value) {
- this.faultName = value;
- }
-
- /**
- * Gets the value of the messageType property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getMessageType() {
- return messageType;
- }
-
- /**
- * Sets the value of the messageType property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setMessageType(String value) {
- this.messageType = value;
- }
-
- /**
- * Gets the value of the request property.
- *
- * @return
- * possible object is
- * {@link Boolean }
- *
- */
- public boolean isRequest() {
- if (request == null) {
- return true;
- } else {
- return request;
- }
- }
-
- /**
- * Sets the value of the request property.
- *
- * @param value
- * allowed object is
- * {@link Boolean }
- *
- */
- public void setRequest(Boolean value) {
- this.request = value;
- }
-
-}
Added: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/InteractionActivity.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/InteractionActivity.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/InteractionActivity.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -0,0 +1,269 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2011.02.11 at 03:55:15 PM GMT
+//
+
+
+package org.savara.activity.model;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for InteractionActivity complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="InteractionActivity">
+ * <complexContent>
+ * <extension base="{http://www.savara.org/activity}Activity">
+ * <sequence>
+ * <element name="parameter" type="{http://www.savara.org/activity}MessageParameter"/>
+ * </sequence>
+ * <attribute name="destinationType" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="destinationAddress" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="replyToAddress" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="operationName" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="faultName" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="request" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+ * <attribute name="outbound" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+ * </extension>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "InteractionActivity", propOrder = {
+ "parameter"
+})
+public class InteractionActivity
+ extends Activity
+{
+
+ @XmlElement(required = true)
+ protected MessageParameter parameter;
+ @XmlAttribute
+ protected String destinationType;
+ @XmlAttribute
+ protected String destinationAddress;
+ @XmlAttribute
+ protected String replyToAddress;
+ @XmlAttribute
+ protected String operationName;
+ @XmlAttribute
+ protected String faultName;
+ @XmlAttribute
+ protected Boolean request;
+ @XmlAttribute
+ protected Boolean outbound;
+
+ /**
+ * Gets the value of the parameter property.
+ *
+ * @return
+ * possible object is
+ * {@link MessageParameter }
+ *
+ */
+ public MessageParameter getParameter() {
+ return parameter;
+ }
+
+ /**
+ * Sets the value of the parameter property.
+ *
+ * @param value
+ * allowed object is
+ * {@link MessageParameter }
+ *
+ */
+ public void setParameter(MessageParameter value) {
+ this.parameter = value;
+ }
+
+ /**
+ * Gets the value of the destinationType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getDestinationType() {
+ return destinationType;
+ }
+
+ /**
+ * Sets the value of the destinationType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setDestinationType(String value) {
+ this.destinationType = value;
+ }
+
+ /**
+ * Gets the value of the destinationAddress property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getDestinationAddress() {
+ return destinationAddress;
+ }
+
+ /**
+ * Sets the value of the destinationAddress property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setDestinationAddress(String value) {
+ this.destinationAddress = value;
+ }
+
+ /**
+ * Gets the value of the replyToAddress property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getReplyToAddress() {
+ return replyToAddress;
+ }
+
+ /**
+ * Sets the value of the replyToAddress property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setReplyToAddress(String value) {
+ this.replyToAddress = value;
+ }
+
+ /**
+ * Gets the value of the operationName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getOperationName() {
+ return operationName;
+ }
+
+ /**
+ * Sets the value of the operationName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setOperationName(String value) {
+ this.operationName = value;
+ }
+
+ /**
+ * Gets the value of the faultName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getFaultName() {
+ return faultName;
+ }
+
+ /**
+ * Sets the value of the faultName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setFaultName(String value) {
+ this.faultName = value;
+ }
+
+ /**
+ * Gets the value of the request property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public boolean isRequest() {
+ if (request == null) {
+ return true;
+ } else {
+ return request;
+ }
+ }
+
+ /**
+ * Sets the value of the request property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setRequest(Boolean value) {
+ this.request = value;
+ }
+
+ /**
+ * Gets the value of the outbound property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public boolean isOutbound() {
+ if (outbound == null) {
+ return true;
+ } else {
+ return outbound;
+ }
+ }
+
+ /**
+ * Sets the value of the outbound property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setOutbound(Boolean value) {
+ this.outbound = value;
+ }
+
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Lifecycle.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Lifecycle.java 2011-02-11 15:40:48 UTC (rev 659)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Lifecycle.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -1,44 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.26 at 04:49:35 PM GMT
-//
-
-
-package org.savara.activity.model;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlSeeAlso;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for Lifecycle complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Lifecycle">
- * <complexContent>
- * <extension base="{http://www.savara.org/activity}Facet">
- * </extension>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "Lifecycle")
- at XmlSeeAlso({
- InstanceStarted.class,
- InstanceFinished.class
-})
-public abstract class Lifecycle
- extends Facet
-{
-
-
-}
Added: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageParameter.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageParameter.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageParameter.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -0,0 +1,99 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2011.02.11 at 03:55:15 PM GMT
+//
+
+
+package org.savara.activity.model;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for MessageParameter complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="MessageParameter">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="value" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
+ * </sequence>
+ * <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "MessageParameter", propOrder = {
+ "value"
+})
+public class MessageParameter {
+
+ @XmlElement(required = true)
+ @XmlSchemaType(name = "anyURI")
+ protected String value;
+ @XmlAttribute
+ protected String type;
+
+ /**
+ * Gets the value of the value property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * Sets the value of the value property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Gets the value of the type property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * Sets the value of the type property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setType(String value) {
+ this.type = value;
+ }
+
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageReceived.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageReceived.java 2011-02-11 15:40:48 UTC (rev 659)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageReceived.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -1,67 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.26 at 04:49:35 PM GMT
-//
-
-
-package org.savara.activity.model;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for MessageReceived complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="MessageReceived">
- * <complexContent>
- * <extension base="{http://www.savara.org/activity}Interaction">
- * <attribute name="source" type="{http://www.w3.org/2001/XMLSchema}string" />
- * </extension>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "MessageReceived")
-public class MessageReceived
- extends Interaction
-{
-
- @XmlAttribute(name = "source")
- protected String source;
-
- /**
- * Gets the value of the source property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getSource() {
- return source;
- }
-
- /**
- * Sets the value of the source property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setSource(String value) {
- this.source = value;
- }
-
-}
Deleted: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageSent.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageSent.java 2011-02-11 15:40:48 UTC (rev 659)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/MessageSent.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -1,67 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.26 at 04:49:35 PM GMT
-//
-
-
-package org.savara.activity.model;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for MessageSent complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="MessageSent">
- * <complexContent>
- * <extension base="{http://www.savara.org/activity}Interaction">
- * <attribute name="destination" type="{http://www.w3.org/2001/XMLSchema}string" />
- * </extension>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "MessageSent")
-public class MessageSent
- extends Interaction
-{
-
- @XmlAttribute(name = "destination")
- protected String destination;
-
- /**
- * Gets the value of the destination property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getDestination() {
- return destination;
- }
-
- /**
- * Sets the value of the destination property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setDestination(String value) {
- this.destination = value;
- }
-
-}
Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/ObjectFactory.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/ObjectFactory.java 2011-02-11 15:40:48 UTC (rev 659)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/ObjectFactory.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -1,14 +1,17 @@
//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.26 at 04:49:35 PM GMT
+// Generated on: 2011.02.11 at 03:55:15 PM GMT
//
package org.savara.activity.model;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
/**
@@ -28,6 +31,7 @@
@XmlRegistry
public class ObjectFactory {
+ private final static QName _Activity_QNAME = new QName("http://www.savara.org/activity", "activity");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.savara.activity.model
@@ -37,14 +41,6 @@
}
/**
- * Create an instance of {@link Process }
- *
- */
- public Process createProcess() {
- return new Process();
- }
-
- /**
* Create an instance of {@link Activity }
*
*/
@@ -61,59 +57,44 @@
}
/**
- * Create an instance of {@link ProtocolAnalysis }
+ * Create an instance of {@link InteractionActivity }
*
*/
- public ProtocolAnalysis createProtocolAnalysis() {
- return new ProtocolAnalysis();
+ public InteractionActivity createInteractionActivity() {
+ return new InteractionActivity();
}
/**
- * Create an instance of {@link MessageReceived }
+ * Create an instance of {@link MessageParameter }
*
*/
- public MessageReceived createMessageReceived() {
- return new MessageReceived();
+ public MessageParameter createMessageParameter() {
+ return new MessageParameter();
}
/**
- * Create an instance of {@link Error }
+ * Create an instance of {@link ComponentActivity }
*
*/
- public Error createError() {
- return new Error();
+ public ComponentActivity createComponentActivity() {
+ return new ComponentActivity();
}
/**
- * Create an instance of {@link Task }
+ * Create an instance of {@link ProtocolAnalysis }
*
*/
- public Task createTask() {
- return new Task();
+ public ProtocolAnalysis createProtocolAnalysis() {
+ return new ProtocolAnalysis();
}
/**
- * Create an instance of {@link InstanceFinished }
+ * Create an instance of {@link JAXBElement }{@code <}{@link Activity }{@code >}}
*
*/
- public InstanceFinished createInstanceFinished() {
- return new InstanceFinished();
+ @XmlElementDecl(namespace = "http://www.savara.org/activity", name = "activity")
+ public JAXBElement<Activity> createActivity(Activity value) {
+ return new JAXBElement<Activity>(_Activity_QNAME, Activity.class, null, value);
}
- /**
- * Create an instance of {@link MessageSent }
- *
- */
- public MessageSent createMessageSent() {
- return new MessageSent();
- }
-
- /**
- * Create an instance of {@link InstanceStarted }
- *
- */
- public InstanceStarted createInstanceStarted() {
- return new InstanceStarted();
- }
-
}
Deleted: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Process.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Process.java 2011-02-11 15:40:48 UTC (rev 659)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Process.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -1,121 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.26 at 04:49:35 PM GMT
-//
-
-
-package org.savara.activity.model;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for Process complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Process">
- * <complexContent>
- * <extension base="{http://www.savara.org/activity}Facet">
- * <attribute name="instanceId" type="{http://www.w3.org/2001/XMLSchema}string" />
- * <attribute name="definitionId" type="{http://www.w3.org/2001/XMLSchema}string" />
- * <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
- * </extension>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "Process")
-public class Process
- extends Facet
-{
-
- @XmlAttribute(name = "instanceId")
- protected String instanceId;
- @XmlAttribute(name = "definitionId")
- protected String definitionId;
- @XmlAttribute(name = "name")
- protected String name;
-
- /**
- * Gets the value of the instanceId property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getInstanceId() {
- return instanceId;
- }
-
- /**
- * Sets the value of the instanceId property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setInstanceId(String value) {
- this.instanceId = value;
- }
-
- /**
- * Gets the value of the definitionId property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getDefinitionId() {
- return definitionId;
- }
-
- /**
- * Sets the value of the definitionId property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setDefinitionId(String value) {
- this.definitionId = value;
- }
-
- /**
- * Gets the value of the name property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the value of the name property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setName(String value) {
- this.name = value;
- }
-
-}
Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/ProtocolAnalysis.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/ProtocolAnalysis.java 2011-02-11 15:40:48 UTC (rev 659)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/ProtocolAnalysis.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -1,8 +1,8 @@
//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.26 at 04:49:35 PM GMT
+// Generated on: 2011.02.11 at 03:55:15 PM GMT
//
@@ -39,11 +39,11 @@
extends Analysis
{
- @XmlAttribute(name = "protocol")
+ @XmlAttribute
protected String protocol;
- @XmlAttribute(name = "role")
+ @XmlAttribute
protected String role;
- @XmlAttribute(name = "expected")
+ @XmlAttribute
protected Boolean expected;
/**
Added: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Status.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Status.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Status.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -0,0 +1,58 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2011.02.11 at 03:55:15 PM GMT
+//
+
+
+package org.savara.activity.model;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for Status.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * <p>
+ * <pre>
+ * <simpleType name="Status">
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ * <enumeration value="Started"/>
+ * <enumeration value="Finished"/>
+ * </restriction>
+ * </simpleType>
+ * </pre>
+ *
+ */
+ at XmlType(name = "Status")
+ at XmlEnum
+public enum Status {
+
+ @XmlEnumValue("Started")
+ STARTED("Started"),
+ @XmlEnumValue("Finished")
+ FINISHED("Finished");
+ private final String value;
+
+ Status(String v) {
+ value = v;
+ }
+
+ public String value() {
+ return value;
+ }
+
+ public static Status fromValue(String v) {
+ for (Status c: Status.values()) {
+ if (c.value.equals(v)) {
+ return c;
+ }
+ }
+ throw new IllegalArgumentException(v);
+ }
+
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Task.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Task.java 2011-02-11 15:40:48 UTC (rev 659)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/Task.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -1,94 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.26 at 04:49:35 PM GMT
-//
-
-
-package org.savara.activity.model;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for Task complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Task">
- * <complexContent>
- * <extension base="{http://www.savara.org/activity}Facet">
- * <attribute name="definitionId" type="{http://www.w3.org/2001/XMLSchema}string" />
- * <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
- * </extension>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name = "Task")
-public class Task
- extends Facet
-{
-
- @XmlAttribute(name = "definitionId")
- protected String definitionId;
- @XmlAttribute(name = "name")
- protected String name;
-
- /**
- * Gets the value of the definitionId property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getDefinitionId() {
- return definitionId;
- }
-
- /**
- * Sets the value of the definitionId property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setDefinitionId(String value) {
- this.definitionId = value;
- }
-
- /**
- * Gets the value of the name property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getName() {
- return name;
- }
-
- /**
- * Sets the value of the name property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setName(String value) {
- this.name = value;
- }
-
-}
Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/package-info.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/package-info.java 2011-02-11 15:40:48 UTC (rev 659)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/model/package-info.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -1,8 +1,8 @@
//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-146
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2011.01.26 at 04:49:35 PM GMT
+// Generated on: 2011.02.11 at 03:55:15 PM GMT
//
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.savara.org/activity", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/osgi/Activator.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/osgi/Activator.java 2011-02-11 15:40:48 UTC (rev 659)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/osgi/Activator.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -24,10 +24,10 @@
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.util.tracker.ServiceTracker;
-import org.savara.activity.validation.ActivityAnalyser;
-import org.savara.activity.validation.ActivityValidationManager;
-import org.savara.activity.validation.ActivityValidationManagerFactory;
-import org.savara.activity.validation.ActivityValidator;
+import org.savara.activity.ActivityAnalyser;
+import org.savara.activity.ActivityProcessor;
+import org.savara.activity.ActivityProcessorFactory;
+import org.savara.activity.ActivityValidator;
public class Activator implements BundleActivator {
@@ -52,9 +52,9 @@
Properties props = new Properties();
// Register activity validation manager
- final ActivityValidationManager avm=ActivityValidationManagerFactory.getActivityValidationManager();
+ final ActivityProcessor avm=ActivityProcessorFactory.getActivityProcessor();
- context.registerService(ActivityValidationManager.class.getName(),
+ context.registerService(ActivityProcessor.class.getName(),
avm, props);
_log.fine("Registered Activity Validation Manager");
Copied: branches/experimental/2.0.x/bundles/org.savara.activity/src/test/java/org/savara/activity/DefaultActivityProcessorTest.java (from rev 648, branches/experimental/2.0.x/bundles/org.savara.activity/src/test/java/org/savara/activity/validation/DefaultActivityValidationManagerTest.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/test/java/org/savara/activity/DefaultActivityProcessorTest.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/test/java/org/savara/activity/DefaultActivityProcessorTest.java 2011-02-11 16:47:02 UTC (rev 660)
@@ -0,0 +1,127 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008-11, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.activity;
+
+import org.junit.Test;
+import org.savara.activity.ActivityAnalyser;
+import org.savara.activity.ActivityProcessor;
+import org.savara.activity.ActivityValidator;
+import org.savara.activity.DefaultActivityProcessor;
+import org.savara.activity.model.Activity;
+
+import static org.junit.Assert.*;
+
+public class DefaultActivityProcessorTest {
+
+ @Test
+ public void testAddRemoveAnalyser() {
+ DefaultActivityProcessor avm=new DefaultActivityProcessor();
+
+ TestAnalyser ta=new TestAnalyser();
+ avm.addActivityAnalyser(ta);
+
+ if (avm.getAnalysers().contains(ta) == false) {
+ fail("Analyser not found");
+ }
+
+ avm.removeActivityAnalyser(ta);
+
+ if (avm.getAnalysers().contains(ta) == true) {
+ fail("Analyser not removed");
+ }
+ }
+
+ @Test
+ public void testAddRemoveValidator() {
+ DefaultActivityProcessor avm=new DefaultActivityProcessor();
+
+ TestValidator tv=new TestValidator();
+ avm.addActivityValidator(tv);
+
+ if (avm.getValidators().contains(tv) == false) {
+ fail("Validator not found");
+ }
+
+ avm.removeActivityValidator(tv);
+
+ if (avm.getValidators().contains(tv) == true) {
+ fail("Validator not removed");
+ }
+ }
+
+ @Test
+ public void testAnalysisBeforeValidate() {
+ ActivityProcessor avm=new DefaultActivityProcessor();
+
+ TestOrderAnalyserValidator tav=new TestOrderAnalyserValidator();
+
+ avm.addActivityAnalyser(tav);
+ avm.addActivityValidator(tav);
+
+ Activity act=new Activity();
+
+ avm.process(act);
+ }
+
+ public class TestAnalyser implements ActivityAnalyser {
+
+ private Activity m_activity=null;
+
+ public Activity getActivity() {
+ return(m_activity);
+ }
+
+ public void analyse(Activity activity) {
+ m_activity = activity;
+ }
+
+ }
+
+ public class TestValidator implements ActivityValidator {
+
+ private Activity m_activity=null;
+
+ public Activity getActivity() {
+ return(m_activity);
+ }
+
+ public void validate(Activity activity) {
+ m_activity = activity;
+ }
+ }
+
+ public class TestOrderAnalyserValidator implements ActivityAnalyser, ActivityValidator {
+
+ private Activity m_activity=null;
+
+ public void validate(Activity activity) {
+ if (m_activity != activity) {
+ // Should be activity that was analysed
+ fail("Activity did not match");
+ }
+ }
+
+ public void analyse(Activity activity) {
+ if (m_activity != null) {
+ fail("Activity should not be set");
+ }
+ m_activity = activity;
+ }
+
+ }
+}
More information about the savara-commits
mailing list