portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wea...@apache.org
Subject cvs commit: jakarta-jetspeed-2/components/registry/src/java/org/apache/jetspeed/components/portletregistry PersistenceBrokerPortletRegistry.java
Date Tue, 01 Feb 2005 16:59:20 GMT
weaver      2005/02/01 08:59:20

  Modified:    jetspeed-api/src/java/org/apache/jetspeed/components/portletregistry
                        PortletRegistry.java
               portal/src/java/org/apache/jetspeed/tools/pamanager
                        FileSystemPAM.java
               components/registry/src/java/org/apache/jetspeed/components/portletregistry
                        PersistenceBrokerPortletRegistry.java
  Log:
  added named check for portlet applications
  
  Revision  Changes    Path
  1.4       +11 -0     jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/components/portletregistry/PortletRegistry.java
  
  Index: PortletRegistry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/components/portletregistry/PortletRegistry.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PortletRegistry.java	3 Nov 2004 17:51:22 -0000	1.3
  +++ PortletRegistry.java	1 Feb 2005 16:59:19 -0000	1.4
  @@ -119,6 +119,17 @@
        * is alreay registered, <code>false</code> if it has not.
        */
       boolean portletApplicationExists( String appIentity );
  +    
  +    /**
  +     * 
  +     * <p>
  +     * namedPortletApplicationExists
  +     * </p>
  +     *
  +     * @param appName
  +     * @return
  +     */
  +    boolean namedPortletApplicationExists( String appName );
   
       /**
        * Checks whether or not a portlet with this identity has all ready
  
  
  
  1.47      +7 -1      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager/FileSystemPAM.java
  
  Index: FileSystemPAM.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager/FileSystemPAM.java,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- FileSystemPAM.java	28 Jan 2005 01:39:07 -0000	1.46
  +++ FileSystemPAM.java	1 Feb 2005 16:59:19 -0000	1.47
  @@ -387,6 +387,12 @@
               // save it to the registry
               log.info("Saving the portlet.xml in the registry...");
            
  +            if(registry.namedPortletApplicationExists(app.getName()))
  +            {
  +                log.warn("Deployment has found an app with the application name, "+app.getName()+
  +                        ".  The existing app will be removed in favor of this one.");
  +                undeploy(paWar);
  +            }
               registry.registerPortletApplication(app);
               log.info("Committing registry changes...");
               
  
  
  
  1.3       +12 -1     jakarta-jetspeed-2/components/registry/src/java/org/apache/jetspeed/components/portletregistry/PersistenceBrokerPortletRegistry.java
  
  Index: PersistenceBrokerPortletRegistry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/registry/src/java/org/apache/jetspeed/components/portletregistry/PersistenceBrokerPortletRegistry.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PersistenceBrokerPortletRegistry.java	3 Nov 2004 17:52:21 -0000	1.2
  +++ PersistenceBrokerPortletRegistry.java	1 Feb 2005 16:59:20 -0000	1.3
  @@ -51,6 +51,12 @@
    */
   public class PersistenceBrokerPortletRegistry extends InitablePersistenceBrokerDaoSupport
implements PortletRegistry
   {
  +    
  +    /**
  +     * The separator used to create a unique portlet name as
  +     * {portletApplication}::{portlet}
  +     */
  +    static final String PORTLET_UNIQUE_NAME_SEPARATOR = "::";
   
       /**
        *  
  @@ -168,6 +174,11 @@
       {
           return getPortletApplicationByIdentifier(appIdentity) != null;
       }
  +    
  +    public boolean namedPortletApplicationExists( String appName )
  +    {
  +        return getPortletApplication(appName) != null;
  +    }
   
       public boolean portletDefinitionExists( String portletName, MutablePortletApplication
app )
       {
  
  
  

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


Mime
View raw message