[savara-commits] savara SVN: r598 - in branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity: services and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Jan 19 18:31:05 EST 2011


Author: objectiser
Date: 2011-01-19 18:31:05 -0500 (Wed, 19 Jan 2011)
New Revision: 598

Added:
   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/services/ActivityLogService.java
   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/services/ActivityQueryService.java
Log:
Initial APIs for the activity log, notification and query services (currently no query methods on query service).

Added: 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/services/ActivityLogService.java	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/services/ActivityLogService.java	2011-01-19 23:31:05 UTC (rev 598)
@@ -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.services;
+
+import org.savara.activity.model.Activity;
+import org.savara.activity.validation.ActivityValidationManager;
+import org.savara.common.config.Configuration;
+
+/**
+ * This interface represents the activity log service,
+ * used to store activity events in a persistence store.
+ *
+ */
+public interface ActivityLogService {
+
+	/**
+	 * This method initializes the log service using
+	 * the supplied configuration.
+	 * 
+	 * @param config
+	 */
+	public void initialize(Configuration config);
+	
+	/**
+	 * This method sets the activity validation manager to be used to
+	 * validate any logged activity events.
+	 * 
+	 * @param manager The manager
+	 */
+	public void setActivityValidationManager(ActivityValidationManager manager);
+	
+	/**
+	 * This method sets the optional activity notification service to use
+	 * to publish newly logged activity records.
+	 * 
+	 * @param notifer The notification service
+	 */
+	public void setActivityNotificationService(ActivityNotificationService notifer);
+	
+	/**
+	 * This method logs the activity record.
+	 * 
+	 * @param activity The activity
+	 */
+	public void log(Activity activity);
+	
+	/**
+	 * This method closes the log service.
+	 */
+	public void close();
+	
+}

Added: 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/services/ActivityNotificationService.java	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/services/ActivityNotificationService.java	2011-01-19 23:31:05 UTC (rev 598)
@@ -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.services;
+
+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 ActivityNotificationService {
+
+	/**
+	 * 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();
+	
+}

Added: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/services/ActivityQueryService.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/services/ActivityQueryService.java	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/services/ActivityQueryService.java	2011-01-19 23:31:05 UTC (rev 598)
@@ -0,0 +1,42 @@
+/*
+ * 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.services;
+
+import org.savara.common.config.Configuration;
+
+/**
+ * This interface represents the activity query service,
+ * used to query activity records in a persistence store.
+ *
+ */
+public interface ActivityQueryService {
+
+	/**
+	 * This method initializes the query service using
+	 * the supplied configuration.
+	 * 
+	 * @param config
+	 */
+	public void initialize(Configuration config);
+	
+	/**
+	 * This method closes the query service.
+	 */
+	public void close();
+	
+}



More information about the savara-commits mailing list