You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ta...@apache.org on 2004/08/03 07:06:36 UTC

cvs commit: jakarta-jetspeed/fusion/src/java/org/apache/jetspeed/fusion/tools/pamanager FusionPAM.java

taylor      2004/08/02 22:06:36

  Modified:    fusion/src/java/org/apache/jetspeed/fusion/tools/pamanager
                        FusionPAM.java
  Log:
  Portlet application registration (sans deploy) an registration UI completed
  CVS: ----------------------------------------------------------------------
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  Changes    Path
  1.9       +39 -2     jakarta-jetspeed/fusion/src/java/org/apache/jetspeed/fusion/tools/pamanager/FusionPAM.java
  
  Index: FusionPAM.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/fusion/src/java/org/apache/jetspeed/fusion/tools/pamanager/FusionPAM.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- FusionPAM.java	1 Aug 2004 15:53:34 -0000	1.8
  +++ FusionPAM.java	3 Aug 2004 05:06:36 -0000	1.9
  @@ -19,6 +19,8 @@
   import java.util.Enumeration;
   import java.util.Iterator;
   
  +import javax.servlet.ServletContext;
  +
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   import org.apache.jetspeed.Jetspeed;
  @@ -394,10 +396,12 @@
           {
               if (existed)
               {
  +                System.out.println("Un Deploying");
                   fusionUndeploy(portletApplicationName, false);
               }
               try
               {
  +                System.out.println("Deploying");
                   fusionDeploy(portletApplicationName);
               }
               catch (Exception e)
  @@ -407,7 +411,33 @@
           }
           return registered;
       }
  -    
  +
  +    public boolean registerPortletApplication(
  +                            String portletApplicationName,
  +                            String contextName,
  +                            ServletContext context)
  +    throws RegistryException
  +    {
  +        boolean existed = (registry.getPortletApplication(portletApplicationName) != null);
  +        boolean registered = super.registerPortletApplication(portletApplicationName, contextName, context);
  +        if (registered)
  +        {
  +            if (existed)
  +            {
  +                fusionUndeploy(portletApplicationName, false);
  +            }
  +            try
  +            {
  +                fusionDeploy(portletApplicationName);
  +            }
  +            catch (Exception e)
  +            {
  +                throw new RegistryException(e);
  +            }               
  +        }
  +        return registered;
  +    }
  +   
       private void fusionUndeploy(String paName, boolean zapPSML)
       {
           PortletRegistryComponent registry = (PortletRegistryComponent) Jetspeed.getComponentManager().getComponent(PortletRegistryComponent.class);
  @@ -443,5 +473,12 @@
           }
           //TurbineServices.getInstance().shutdownServices();
           
  +    }
  +    
  +    public void unregister( String paName ) 
  +    throws PortletApplicationException
  +    {
  +        fusionUndeploy(paName, true);        
  +        super.unregister(paName);
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org