[jboss-svn-commits] JBoss Portal SVN: r5687 - in trunk/federation/src/main/org/jboss/portal/federation: . impl

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Nov 20 14:25:28 EST 2006


Author: julien at jboss.com
Date: 2006-11-20 14:25:15 -0500 (Mon, 20 Nov 2006)
New Revision: 5687

Modified:
   trunk/federation/src/main/org/jboss/portal/federation/FederatingPortletInvoker.java
   trunk/federation/src/main/org/jboss/portal/federation/impl/FederatingPortletInvokerService.java
Log:
return the federated invoker on invoker registration

Modified: trunk/federation/src/main/org/jboss/portal/federation/FederatingPortletInvoker.java
===================================================================
--- trunk/federation/src/main/org/jboss/portal/federation/FederatingPortletInvoker.java	2006-11-20 16:58:25 UTC (rev 5686)
+++ trunk/federation/src/main/org/jboss/portal/federation/FederatingPortletInvoker.java	2006-11-20 19:25:15 UTC (rev 5687)
@@ -42,7 +42,7 @@
     * @param registration the invoker to register
     * @throws IllegalArgumentException if the invoker is null or already registered
     */
-   void registerInvoker(PortletInvokerRegistration registration) throws IllegalArgumentException;
+   FederatedPortletInvoker registerInvoker(PortletInvokerRegistration registration) throws IllegalArgumentException;
 
    /**
     * Unregister an invoker.

Modified: trunk/federation/src/main/org/jboss/portal/federation/impl/FederatingPortletInvokerService.java
===================================================================
--- trunk/federation/src/main/org/jboss/portal/federation/impl/FederatingPortletInvokerService.java	2006-11-20 16:58:25 UTC (rev 5686)
+++ trunk/federation/src/main/org/jboss/portal/federation/impl/FederatingPortletInvokerService.java	2006-11-20 19:25:15 UTC (rev 5687)
@@ -60,7 +60,7 @@
    /** The registred FederatedPortletInvokers. */
    private Map registry = new HashMap();
 
-   public synchronized void registerInvoker(PortletInvokerRegistration registration)
+   public synchronized FederatedPortletInvoker registerInvoker(PortletInvokerRegistration registration)
    {
       if (registration == null)
       {
@@ -72,8 +72,10 @@
          throw new IllegalArgumentException("Attempting dual registration of " + id);
       }
       Map copy = new HashMap(registry);
-      copy.put(id, new FederatedPortletInvokerService(this, registration));
+      FederatedPortletInvokerService invoker = new FederatedPortletInvokerService(this, registration);
+      copy.put(id, invoker);
       registry = copy;
+      return invoker;
    }
 
    public synchronized void unregisterInvoker(PortletInvokerRegistration registration)




More information about the jboss-svn-commits mailing list