[jboss-svn-commits] JBoss Portal SVN: r5587 - in trunk/wsrp/src/main/org/jboss/portal/wsrp: . registration registration/producer

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Sun Nov 5 12:09:51 EST 2006


Author: julien at jboss.com
Date: 2006-11-05 12:09:48 -0500 (Sun, 05 Nov 2006)
New Revision: 5587

Added:
   trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/
   trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/
   trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/Consumer.java
   trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/ConsumerRegistration.java
   trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/ConsumerRegistry.java
   trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/NoSuchConsumerException.java
   trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/NoSuchRegistrationException.java
   trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/RegistrationException.java
   trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/RegistrationFailedException.java
Log:
added producer registration as it should be seen by the managing entity (i.e the portal). Indeed there are specific needs where the registration of a consumer must be attached to the set of portlet state in order to provide manageability of such state by the system administrator

Added: trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/Consumer.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/Consumer.java	2006-11-05 15:56:13 UTC (rev 5586)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/Consumer.java	2006-11-05 17:09:48 UTC (rev 5587)
@@ -0,0 +1,71 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+package org.jboss.portal.wsrp.registration.producer;
+
+import java.util.Collection;
+
+/**
+ * A well known consumer (a business entity) in the portal.
+ *
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface Consumer
+{
+   /**
+    * Return the consumer name.
+    *
+    * @return the consumer name
+    */
+   String getName();
+
+   /**
+    * Return all the registrations for the specified consumer.
+    *
+    * @return the consumer registrations
+    */
+   Collection getRegistrations() throws RegistrationException;
+
+   /**
+    * Return a specific registration for this consumer.
+    *
+    * @param registrationId the registration id
+    * @return the registration
+    */
+   ConsumerRegistration getRegistration(String registrationId) throws RegistrationException, NoSuchRegistrationException;
+
+   /**
+    * Create a new registration for this consumer.
+    *
+    * @param state the state
+    * @return the created registration
+    */
+   ConsumerRegistration createRegistration(Object state) throws RegistrationException;
+
+   /**
+    * Destroy a specific registration.
+    *
+    * @param registrationId the registration id
+    */
+   void destroyRegistration(String registrationId) throws RegistrationException, NoSuchRegistrationException;
+}

Added: trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/ConsumerRegistration.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/ConsumerRegistration.java	2006-11-05 15:56:13 UTC (rev 5586)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/ConsumerRegistration.java	2006-11-05 17:09:48 UTC (rev 5587)
@@ -0,0 +1,39 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+package org.jboss.portal.wsrp.registration.producer;
+
+/**
+ * A registration.
+ *
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface ConsumerRegistration
+{
+   /**
+    * The registration id.
+    *
+    * @return the registration id
+    */
+   String getId();
+}

Added: trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/ConsumerRegistry.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/ConsumerRegistry.java	2006-11-05 15:56:13 UTC (rev 5586)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/ConsumerRegistry.java	2006-11-05 17:09:48 UTC (rev 5587)
@@ -0,0 +1,62 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+package org.jboss.portal.wsrp.registration.producer;
+
+import java.util.Collection;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public interface ConsumerRegistry
+{
+   /**
+    * Return a collection of the known consumers.
+    *
+    * @return the consumer collection
+    */
+   Collection getConsumers() throws RegistrationException;
+
+   /**
+    * Return a specific consumer in the portal
+    *
+    * @param consumerName the consumer name
+    * @return the consumer registration
+    */
+   Consumer getConsumer(String consumerName) throws RegistrationException, NoSuchConsumerException;
+
+   /**
+    * Create a specific consumer in the portal.
+    *
+    * @param consumerName the consumer name
+    * @return the newly created consumer
+    */
+   Consumer createConsumer(String consumerName) throws RegistrationException;
+
+   /**
+    * Destroy a specific consumer in the portal.
+    *
+    * @param consumerName the consumer name
+    */
+   void destroyConsumer(String consumerName) throws RegistrationException, NoSuchConsumerException;
+}

Added: trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/NoSuchConsumerException.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/NoSuchConsumerException.java	2006-11-05 15:56:13 UTC (rev 5586)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/NoSuchConsumerException.java	2006-11-05 17:09:48 UTC (rev 5587)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+package org.jboss.portal.wsrp.registration.producer;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class NoSuchConsumerException extends RegistrationException
+{
+   public NoSuchConsumerException()
+   {
+   }
+
+   public NoSuchConsumerException(String message)
+   {
+      super(message);
+   }
+
+   public NoSuchConsumerException(String message, Throwable cause)
+   {
+      super(message, cause);
+   }
+
+   public NoSuchConsumerException(Throwable cause)
+   {
+      super(cause);
+   }
+}

Added: trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/NoSuchRegistrationException.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/NoSuchRegistrationException.java	2006-11-05 15:56:13 UTC (rev 5586)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/NoSuchRegistrationException.java	2006-11-05 17:09:48 UTC (rev 5587)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+package org.jboss.portal.wsrp.registration.producer;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class NoSuchRegistrationException extends RegistrationException
+{
+   public NoSuchRegistrationException()
+   {
+   }
+
+   public NoSuchRegistrationException(String message)
+   {
+      super(message);
+   }
+
+   public NoSuchRegistrationException(String message, Throwable cause)
+   {
+      super(message, cause);
+   }
+
+   public NoSuchRegistrationException(Throwable cause)
+   {
+      super(cause);
+   }
+}

Added: trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/RegistrationException.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/RegistrationException.java	2006-11-05 15:56:13 UTC (rev 5586)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/RegistrationException.java	2006-11-05 17:09:48 UTC (rev 5587)
@@ -0,0 +1,49 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+package org.jboss.portal.wsrp.registration.producer;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class RegistrationException extends Exception
+{
+   public RegistrationException()
+   {
+   }
+
+   public RegistrationException(String message)
+   {
+      super(message);
+   }
+
+   public RegistrationException(String message, Throwable cause)
+   {
+      super(message, cause);
+   }
+
+   public RegistrationException(Throwable cause)
+   {
+      super(cause);
+   }
+}

Added: trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/RegistrationFailedException.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/RegistrationFailedException.java	2006-11-05 15:56:13 UTC (rev 5586)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/registration/producer/RegistrationFailedException.java	2006-11-05 17:09:48 UTC (rev 5587)
@@ -0,0 +1,31 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+package org.jboss.portal.wsrp.registration.producer;
+
+/**
+ * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class RegistrationFailedException
+{
+}




More information about the jboss-svn-commits mailing list