incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1362405 [2/2] - in /sling/whiteboard/portal/container: ./ src/main/java/org/apache/sling/portal/container/ src/main/java/org/apache/sling/portal/container/internal/ src/main/java/org/apache/sling/portal/container/internal/impl/ src/main/ja...
Date Tue, 17 Jul 2012 08:27:10 GMT
Added: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/impl/SlingPortletEntityImpl.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/impl/SlingPortletEntityImpl.java?rev=1362405&view=auto
==============================================================================
--- sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/impl/SlingPortletEntityImpl.java (added)
+++ sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/impl/SlingPortletEntityImpl.java Tue Jul 17 08:27:09 2012
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.portal.container.internal.impl;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.portlet.Portlet;
+
+import org.apache.sling.portal.container.PortletEntityId;
+import org.apache.sling.portal.container.SlingPortletConfig;
+import org.apache.sling.portal.container.SlingPortletContext;
+import org.apache.sling.portal.container.SlingPortletEntity;
+
+/**
+ * Implementation of the portlet entity.
+ */
+public class SlingPortletEntityImpl implements SlingPortletEntity {
+
+    private final SlingPortletContext portletContext;
+
+    private final SlingPortletConfig portletConfig;
+
+    private Portlet portlet;
+
+    private boolean loaded = false;
+
+    private final PortletEntityId id;
+
+    private final Map<String, Object> attributes = Collections.synchronizedMap(new HashMap<String, Object>());
+
+    public SlingPortletEntityImpl(final PortletEntityId id,
+                   final SlingPortletConfig config,
+                   final SlingPortletContext context) {
+        this.id = id;
+        this.portletConfig = config;
+        this.portletContext = context;
+    }
+
+    public void setLoaded(final boolean flag) {
+        this.loaded = flag;
+    }
+
+    public void setPortlet(final Portlet portlet) {
+        this.portlet = portlet;
+    }
+
+    /**
+     * @see org.apache.sling.portal.container.SlingPortletEntity#getPortlet()
+     */
+    public Portlet getPortlet() {
+        return this.portlet;
+    }
+
+    /**
+     * @see org.apache.sling.portal.container.SlingPortletEntity#getPortletConfig()
+     */
+    public SlingPortletConfig getPortletConfig() {
+        return this.portletConfig;
+    }
+
+    /**
+     * @see org.apache.sling.portal.container.SlingPortletEntity#getPortletContext()
+     */
+    public SlingPortletContext getPortletContext() {
+        return this.portletContext;
+    }
+
+    /**
+     * @see org.apache.sling.portal.container.SlingPortletEntity#isLoaded()
+     */
+    public boolean isLoaded() {
+        return this.loaded;
+    }
+
+    /**
+     * @see org.apache.sling.portal.container.SlingPortletEntity#getPortletEntityId()
+     */
+    public PortletEntityId getPortletEntityId() {
+        return this.id;
+    }
+
+    /**
+     * @see org.apache.sling.portal.container.SlingPortletEntity#getAttribute(java.lang.String)
+     */
+    public Object getAttribute(final String name) {
+        return this.attributes.get(name);
+    }
+
+    /**
+     * @see org.apache.sling.portal.container.SlingPortletEntity#setAttribute(java.lang.String, java.lang.Object)
+     */
+    public void setAttribute(final String name, final Object value) {
+        if ( value == null ) {
+            this.attributes.remove(name);
+        } else {
+            this.attributes.put(name, value);
+        }
+    }
+}
+

Propchange: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/impl/SlingPortletEntityImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/impl/SlingPortletEntityImpl.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/impl/SlingPortletEntityImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/request/LinkTransformerFactory.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/request/LinkTransformerFactory.java?rev=1362405&r1=1362404&r2=1362405&view=diff
==============================================================================
--- sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/request/LinkTransformerFactory.java (original)
+++ sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/request/LinkTransformerFactory.java Tue Jul 17 08:27:09 2012
@@ -20,6 +20,10 @@ import java.io.IOException;
 
 import org.apache.cocoon.xml.sax.AbstractSAXPipe;
 import org.apache.cocoon.xml.sax.AttributesImpl;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Properties;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Service;
 import org.apache.sling.portal.container.internal.impl.DefaultPortalURLFactory;
 import org.apache.sling.rewriter.ProcessingComponentConfiguration;
 import org.apache.sling.rewriter.ProcessingContext;
@@ -32,11 +36,13 @@ import org.xml.sax.SAXException;
  * The link transformer factory for the portal link rewriter.
  * This link rewriter rewrites all links on the page to contain
  * the current state of the portlets on that page.
- * @scr.component metatype="no"
- * @scr.service
- * @scr.property name="pipeline.mode" value="global"
- * @scr.property name="service.ranking" value="999" type="Integer"
  */
+@Component
+@Service(value=TransformerFactory.class)
+@Properties({
+    @Property(name="pipeline.mode", value="global"),
+    @Property(name="service.ranking", intValue=999)
+})
 public class LinkTransformerFactory implements TransformerFactory {
 
     /**

Modified: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/request/PortalFilter.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/request/PortalFilter.java?rev=1362405&r1=1362404&r2=1362405&view=diff
==============================================================================
--- sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/request/PortalFilter.java (original)
+++ sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/request/PortalFilter.java Tue Jul 17 08:27:09 2012
@@ -27,6 +27,11 @@ import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Properties;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.Service;
 import org.apache.pluto.container.PortletContainerException;
 import org.apache.pluto.container.PortletWindow;
 import org.apache.sling.api.SlingHttpServletRequest;
@@ -38,18 +43,19 @@ import org.apache.sling.portal.container
  * This filter checks the url for special portal container parameters
  * and sets up the environment for portlet processing
  *
- * @scr.component label="%filter.name" description="%filter.description" metatype="false"
- * @scr.service interface="javax.servlet.Filter"
- *
- * @scr.property name="filter.scope" value="request" private="true"
- * @scr.property name="filter.order" value="-3000" type="Integer" private="true"
  */
+@Component
+@Service(value=Filter.class)
+@Properties({
+    @Property(name="filter.scope", value="request", propertyPrivate=true),
+    @Property(name="filter.order", intValue=-3000, propertyPrivate=true)
+})
 public class PortalFilter implements Filter {
 
-    /** @scr.reference */
+    @Reference
     private PortalURLFactory portalUrlFactory;
 
-    /** @scr.reference */
+    @Reference
     private SlingPortletContainer portletContainer;
 
     /**

Modified: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultContainerInfo.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultContainerInfo.java?rev=1362405&r1=1362404&r2=1362405&view=diff
==============================================================================
--- sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultContainerInfo.java (original)
+++ sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultContainerInfo.java Tue Jul 17 08:27:09 2012
@@ -29,7 +29,9 @@ public final class DefaultContainerInfo 
 
     private final String serverInfo;
 
-    public DefaultContainerInfo(String containerName, String containerVersion, String serverInfo) {
+    public DefaultContainerInfo(final String containerName,
+                    final String containerVersion,
+                    final String serverInfo) {
         this.containerName = containerName;
         this.containerVersion = containerVersion;
         this.serverInfo = serverInfo;

Modified: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultNamespaceMapper.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultNamespaceMapper.java?rev=1362405&r1=1362404&r2=1362405&view=diff
==============================================================================
--- sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultNamespaceMapper.java (original)
+++ sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultNamespaceMapper.java Tue Jul 17 08:27:09 2012
@@ -27,8 +27,8 @@ public class DefaultNamespaceMapper impl
     /**
      * @see org.apache.pluto.container.NamespaceMapper#encode(org.apache.pluto.container.PortletWindowID, java.lang.String)
      */
-    public String encode(PortletWindowID portletWindowId, String name) {
-        StringBuilder buffer = new StringBuilder(50);
+    public String encode(final PortletWindowID portletWindowId, final String name) {
+        final StringBuilder buffer = new StringBuilder(50);
         buffer.append("sp_");
         buffer.append(portletWindowId.getStringId());
         buffer.append('_');
@@ -39,11 +39,11 @@ public class DefaultNamespaceMapper impl
     /**
      * @see org.apache.pluto.container.NamespaceMapper#decode(org.apache.pluto.container.PortletWindowID, java.lang.String)
      */
-    public String decode(PortletWindowID portletWindowId, String name) {
+    public String decode(final PortletWindowID portletWindowId, final String name) {
         if (!name.startsWith("sp_")) {
             return null;
         }
-        StringBuilder buffer = new StringBuilder(50);
+        final StringBuilder buffer = new StringBuilder(50);
         buffer.append("sp_");
         buffer.append(portletWindowId.getStringId());
         buffer.append('_');

Modified: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletInvokerService.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletInvokerService.java?rev=1362405&r1=1362404&r2=1362405&view=diff
==============================================================================
--- sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletInvokerService.java (original)
+++ sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletInvokerService.java Tue Jul 17 08:27:09 2012
@@ -323,7 +323,7 @@ public class DefaultPortletInvokerServic
         }
 
         @Override
-        public RequestDispatcher getRequestDispatcher(String path) {
+        public RequestDispatcher getRequestDispatcher(final String path) {
             return this.servletContext.getRequestDispatcher(path);
         }
     }

Modified: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletPreferencesService.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletPreferencesService.java?rev=1362405&r1=1362404&r2=1362405&view=diff
==============================================================================
--- sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletPreferencesService.java (original)
+++ sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletPreferencesService.java Tue Jul 17 08:27:09 2012
@@ -40,10 +40,7 @@ import org.apache.pluto.container.om.por
 import org.apache.pluto.container.om.portlet.Preferences;
 import org.apache.sling.jcr.api.SlingRepository;
 import org.apache.sling.jcr.resource.JcrResourceUtil;
-import org.apache.sling.portal.container.ApplicationRegistryListener;
 import org.apache.sling.portal.container.PortletEntityId;
-import org.apache.sling.portal.container.PortletRegistryService;
-import org.apache.sling.portal.container.SlingPortletContext;
 import org.apache.sling.portal.container.SlingPortletWindow;
 import org.apache.sling.portal.container.internal.util.PortalUtil;
 import org.slf4j.Logger;
@@ -59,7 +56,7 @@ import org.slf4j.LoggerFactory;
  *
  */
 public class DefaultPortletPreferencesService
-    implements PortletPreferencesService, ApplicationRegistryListener {
+    implements PortletPreferencesService {
 
 	/** Logger. */
 	private final Logger logger = LoggerFactory.getLogger(this.getClass().getName());
@@ -77,12 +74,6 @@ public class DefaultPortletPreferencesSe
 
     private static final Map<String,PortletPreference> EMPTY_MAP = Collections.unmodifiableMap(new HashMap<String, PortletPreference>());
 
-    /** The admin session for the preferences observation. */
-    private final Session adminSession;
-
-    /** The registry. */
-    private final PortletRegistryService registry;
-
     private static final String DEFAULT_PREFS_PATH = "/etc/portal/preferences";
     private static final String DEFAULT_USER_PREFS_PATH = "/etc/portal/preferences/users";
     private static final String DEFAULT_ENTITY_PREFS_PATH = "/etc/portal/preferences/entites";
@@ -90,27 +81,24 @@ public class DefaultPortletPreferencesSe
 	/**
 	 * Construct a new service instance.
 	 */
-	public DefaultPortletPreferencesService(final SlingRepository repository, PortletRegistryService registry)
+	public DefaultPortletPreferencesService(final SlingRepository repository)
 	throws RepositoryException {
-	    this.adminSession = repository.loginAdministrative(null);
-	    // create preferences paths
-	    JcrResourceUtil.createPath(DEFAULT_PREFS_PATH, "sling:Folder", "sling:Folder", adminSession, true);
-        JcrResourceUtil.createPath(DEFAULT_USER_PREFS_PATH, "sling:Folder", "sling:Folder", adminSession, true);
-        JcrResourceUtil.createPath(DEFAULT_ENTITY_PREFS_PATH, "sling:Folder", "sling:Folder", adminSession, true);
-        this.registry = registry;
-        registry.addApplicationListener(this);
+	    final Session adminSession = repository.loginAdministrative(null);
+	    try {
+    	    // create preferences paths
+    	    JcrResourceUtil.createPath(DEFAULT_PREFS_PATH, "sling:Folder", "sling:Folder", adminSession, true);
+            JcrResourceUtil.createPath(DEFAULT_USER_PREFS_PATH, "sling:Folder", "sling:Folder", adminSession, true);
+            JcrResourceUtil.createPath(DEFAULT_ENTITY_PREFS_PATH, "sling:Folder", "sling:Folder", adminSession, true);
+	    } finally {
+            adminSession.logout();
+	    }
 	}
 
 	/**
 	 * Destroy this service.
 	 */
 	public void destroy() {
-	    if ( this.registry != null ) {
-	        this.registry.removeApplicationListener(this);
-	    }
-	    if ( this.adminSession != null ) {
-	        this.adminSession.logout();
-	    }
+	    // nothing to do for now
 	}
 
     /**
@@ -302,15 +290,4 @@ public class DefaultPortletPreferencesSe
         }
         return null;
     }
-
-    public void notifyPortletApplicationAdded(SlingPortletContext ctx) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void notifyPortletApplicationRemoved(SlingPortletContext ctx) {
-        // TODO Auto-generated method stub
-
-    }
-
 }
\ No newline at end of file

Modified: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletRegistryService.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletRegistryService.java?rev=1362405&r1=1362404&r2=1362405&view=diff
==============================================================================
--- sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletRegistryService.java (original)
+++ sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/DefaultPortletRegistryService.java Tue Jul 17 08:27:09 2012
@@ -36,7 +36,6 @@ import org.apache.pluto.container.om.por
 import org.apache.pluto.container.om.portlet.PortletDefinition;
 import org.apache.sling.portal.container.ApplicationRegistryListener;
 import org.apache.sling.portal.container.PortletEntityId;
-import org.apache.sling.portal.container.PortletEntityRegistryListener;
 import org.apache.sling.portal.container.PortletRegistryService;
 import org.apache.sling.portal.container.SlingPortletConfig;
 import org.apache.sling.portal.container.SlingPortletContext;
@@ -44,6 +43,7 @@ import org.apache.sling.portal.container
 import org.apache.sling.portal.container.api.PortletApplication;
 import org.apache.sling.portal.container.internal.impl.SlingPortletConfigImpl;
 import org.apache.sling.portal.container.internal.impl.SlingPortletContextImpl;
+import org.apache.sling.portal.container.internal.impl.SlingPortletEntityImpl;
 import org.apache.sling.portal.container.internal.util.ContextPathUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -66,24 +66,21 @@ public class DefaultPortletRegistryServi
     private final Logger logger = LoggerFactory.getLogger(this.getClass().getName());
 
     /** The portlet application descriptor service. */
-    private PortletAppDescriptorService portletDDService = new PortletAppDescriptorServiceImpl();
+    private final PortletAppDescriptorService portletDDService = new PortletAppDescriptorServiceImpl();
 
     /**
      * The PortletContext cache map: key is servlet context, and value is the
      * associated portlet context.
      */
-    private Map<String, SlingPortletContext> portletContexts = new HashMap<String, SlingPortletContext>();
+    private final Map<String, SlingPortletContext> portletContexts = new HashMap<String, SlingPortletContext>();
 
     /** Listeners for portlet applications. */
-    private List<ApplicationRegistryListener> appListeners = new ArrayList<ApplicationRegistryListener>();
-
-    /** Listeners for portlet entities. */
-    private List<PortletEntityRegistryListener> entityListeners = new ArrayList<PortletEntityRegistryListener>();
+    private final List<ApplicationRegistryListener> appListeners = new ArrayList<ApplicationRegistryListener>();
 
     /**
      * All registered portlets
      */
-    private final Map<PortletEntityId, PortletInfoImpl> portlets = new HashMap<PortletEntityId, PortletInfoImpl>();
+    private volatile Map<PortletEntityId, SlingPortletEntityImpl> portlets = new HashMap<PortletEntityId, SlingPortletEntityImpl>();
 
     /** The container info. */
     private final ContainerInfo containerInfo;
@@ -97,9 +94,10 @@ public class DefaultPortletRegistryServi
     }
 
 	/**
+	 * Add and removal of a portlet application can never be called concurrently!
 	 * @see org.apache.sling.portal.container.api.PortletApplicationRegistryListener#notifyPortletApplicationAdded(org.apache.sling.portal.container.api.PortletApplication)
 	 */
-	public void notifyPortletApplicationAdded(PortletApplication callback) {
+	public void notifyPortletApplicationAdded(final PortletApplication callback) {
 	    final ServletContext servletContext = callback.getServletContext();
         final String contextPath = ContextPathUtil.getContextPath(servletContext);
         final String applicationName = contextPath.substring(1);
@@ -118,33 +116,33 @@ public class DefaultPortletRegistryServi
                 this.portletContexts.put(applicationName, portletContext);
 
                 if (logger.isInfoEnabled()) {
+                    logger.info("Registering " + portletApp.getPortlets().size() + " portlets for " + portletContext.getApplicationName());
                     logger.info("Registered portlet application for context '/" + applicationName + "'");
-                    logger.info("Registering "+portletApp.getPortlets().size()+" portlets for context /"+portletContext.getApplicationName());
                 }
 
+                // we have to sync to handle add/remove
                 synchronized ( this.appListeners ) {
                     for(final ApplicationRegistryListener l : this.appListeners ) {
                         l.notifyPortletApplicationAdded(portletContext);
                     }
                 }
 
+                // create a copy of the portlets
+                final Map<PortletEntityId, SlingPortletEntityImpl> newPortlets = new HashMap<PortletEntityId, SlingPortletEntityImpl>(this.portlets);
+
                 // now register all portlets!
                 for (PortletDefinition portlet: portletApp.getPortlets()) {
                     final PortletEntityId id = new PortletEntityId(appName, portlet.getPortletName(), 0);
 
                     // create portlet config
                     final SlingPortletConfig config = new SlingPortletConfigImpl(portletContext, portlet);
-                    final PortletInfoImpl info = new PortletInfoImpl(id);
-                    info.portletConfig = config;
-                    info.portletContext = portletContext;
-
-                    this.portlets.put(id, info);
-                    synchronized ( this.entityListeners ) {
-                        for(final PortletEntityRegistryListener l : this.entityListeners ) {
-                            l.notifyPortletEntityAdded(info);
-                        }
-                    }
+                    final SlingPortletEntityImpl info = new SlingPortletEntityImpl(id, config, portletContext);
+
+                    newPortlets.put(id, info);
                 }
+                // switch to copy
+                this.portlets = newPortlets;
+
                 // store context path in servlet context!
                 servletContext.setAttribute(SC_ATTR_APP, applicationName);
             } catch (final PortletContainerException pce) {
@@ -158,34 +156,43 @@ public class DefaultPortletRegistryServi
     }
 
     /**
+     * Add and removal of a portlet application can never be called concurrently!
      * @see org.apache.sling.portal.container.api.PortletApplicationRegistryListener#notifyPortletApplicationRemoved(org.apache.sling.portal.container.api.PortletApplication)
      */
-    public void notifyPortletApplicationRemoved(PortletApplication callback) {
+    public void notifyPortletApplicationRemoved(final PortletApplication callback) {
         final ServletContext servletContext = callback.getServletContext();
         final String applicationName = (String) servletContext.getAttribute(SC_ATTR_APP);
         if ( applicationName != null ) {
             servletContext.removeAttribute(SC_ATTR_APP);
             final SlingPortletContext portletContext = this.portletContexts.remove(applicationName);
             if ( portletContext != null ) {
+                // we have to sync to handle add/remove
                 synchronized ( this.appListeners ) {
                     for(final ApplicationRegistryListener l : this.appListeners ) {
                         l.notifyPortletApplicationRemoved(portletContext);
                     }
                 }
+                // create a copy of the portlets
+                final Map<PortletEntityId, SlingPortletEntityImpl> newPortlets = new HashMap<PortletEntityId, SlingPortletEntityImpl>(this.portlets);
+
                 final String appName = portletContext.getApplicationName();
-                final Iterator<Map.Entry<PortletEntityId, PortletInfoImpl>> i = this.portlets.entrySet().iterator();
+                int count = 0;
+                final Iterator<Map.Entry<PortletEntityId, SlingPortletEntityImpl>> i = newPortlets.entrySet().iterator();
                 while ( i .hasNext() ) {
-                    final Map.Entry<PortletEntityId, PortletInfoImpl> current = i.next();
+                    final Map.Entry<PortletEntityId, SlingPortletEntityImpl> current = i.next();
                     if ( current.getKey().getApplicationName().equals(appName) ) {
-                        synchronized ( this.entityListeners ) {
-                            for(final PortletEntityRegistryListener l : this.entityListeners ) {
-                                l.notifyPortletEntityRemoved(current.getValue());
-                            }
-                        }
                         this.unloadPortlet(current.getValue());
                         i.remove();
+                        count++;
                     }
                 }
+                // switch to copy
+                this.portlets = newPortlets;
+
+                if (logger.isInfoEnabled()) {
+                    logger.info("Unregistering " + count + " portlets from " + appName);
+                    logger.info("Unregistered portlet application for context '/" + applicationName + "'");
+                }
             }
         }
     }
@@ -193,7 +200,7 @@ public class DefaultPortletRegistryServi
     /**
      * @see org.apache.sling.portal.container.PortletRegistryService#getPortletEntity(org.apache.sling.portal.container.PortletEntityId)
      */
-    public SlingPortletEntity getPortletEntity(PortletEntityId identifier)
+    public SlingPortletEntity getPortletEntity(final PortletEntityId identifier)
     throws PortletContainerException {
         final SlingPortletEntity info = this.portlets.get(identifier);
         if ( info != null ) {
@@ -212,7 +219,7 @@ public class DefaultPortletRegistryServi
         }
         synchronized ( info ) {
             if ( !info.isLoaded() ) {
-                final PortletInfoImpl infoImp = (PortletInfoImpl)info;
+                final SlingPortletEntityImpl infoImp = (SlingPortletEntityImpl)info;
                 Portlet portlet = null;
                 final PortletDefinition portletDD = info.getPortletConfig().getPortletDefinition();
 
@@ -223,15 +230,15 @@ public class DefaultPortletRegistryServi
                     portlet = (Portlet) clazz.newInstance();
                     portlet.init(info.getPortletConfig());
 
-                    infoImp.portlet = portlet;
-                } catch (ClassNotFoundException e) {
+                    infoImp.setPortlet(portlet);
+                } catch (final ClassNotFoundException e) {
                     throw new PortletContainerException("Class " + portletDD.getPortletClass() + " not found for portlet.");
-                } catch (InstantiationException e) {
+                } catch (final InstantiationException e) {
                     throw new PortletContainerException("Unable to instantiate portlet " + portletDD.getPortletClass());
-                } catch (IllegalAccessException e) {
+                } catch (final IllegalAccessException e) {
                     throw new PortletContainerException("Unable to instantiate portlet " + portletDD.getPortletClass());
                 } finally {
-                    infoImp.loaded = true;
+                    infoImp.setLoaded(true);
                     Thread.currentThread().setContextClassLoader(oldCL);
                 }
             }
@@ -241,23 +248,13 @@ public class DefaultPortletRegistryServi
     /**
      * @see org.apache.sling.portal.container.PortletRegistryService#unloadPortlet(org.apache.sling.portal.container.SlingPortletEntity, boolean, int)
      */
-    public void unloadPortlet(final SlingPortletEntity info, final boolean isPermanent, final int unavailableSeconds) {
+    public void unloadPortlet(final SlingPortletEntity info,
+                    final boolean isPermanent,
+                    final int unavailableSeconds) {
         if ( logger.isInfoEnabled() ) {
             logger.info("Unloading portlet " + info.getPortletEntityId() + " permanent: " + isPermanent + ", unavailable for seconds: " + unavailableSeconds);
         }
-        synchronized ( info ) {
-            final PortletInfoImpl infoImp = (PortletInfoImpl)info;
-            if ( infoImp.portlet != null ) {
-                final ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
-                try {
-                    Thread.currentThread().setContextClassLoader(infoImp.portletContext.getContextClassLoader());
-                    infoImp.portlet.destroy();
-                    infoImp.portlet = null;
-                } finally {
-                    Thread.currentThread().setContextClassLoader(oldCL);
-                }
-            }
-        }
+        this.unloadPortlet(info);
     }
 
     /**
@@ -265,13 +262,14 @@ public class DefaultPortletRegistryServi
      */
     private void unloadPortlet(final SlingPortletEntity info) {
         synchronized ( info ) {
-            final PortletInfoImpl infoImp = (PortletInfoImpl)info;
-            if ( infoImp.portlet != null ) {
+            final SlingPortletEntityImpl infoImp = (SlingPortletEntityImpl)info;
+            if ( infoImp.getPortlet() != null ) {
                 final ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
                 try {
-                    Thread.currentThread().setContextClassLoader(infoImp.portletContext.getContextClassLoader());
-                    infoImp.portlet.destroy();
-                    infoImp.portlet = null;
+                    Thread.currentThread().setContextClassLoader(infoImp.getPortletContext().getContextClassLoader());
+                    infoImp.getPortlet().destroy();
+                    infoImp.setPortlet(null);
+                    infoImp.setLoaded(false);
                 } finally {
                     Thread.currentThread().setContextClassLoader(oldCL);
                 }
@@ -286,14 +284,16 @@ public class DefaultPortletRegistryServi
      * @return the Portlet Application Deployment Descriptor.
      * @throws PortletContainerException
      */
-    private PortletApplicationDefinition createDefinition(ServletContext servletContext, String name, String contextPath)
+    private PortletApplicationDefinition createDefinition(final ServletContext servletContext,
+                    final String name,
+                    final String contextPath)
     throws PortletContainerException {
         PortletApplicationDefinition portletApp = null;
         final ClassLoader oldTCCL = Thread.currentThread().getContextClassLoader();
         try {
             Thread.currentThread().setContextClassLoader(ServletContext.class.getClassLoader());
-            InputStream paIn = servletContext.getResourceAsStream(PORTLET_XML);
-            InputStream webIn = servletContext.getResourceAsStream(WEB_XML);
+            final InputStream paIn = servletContext.getResourceAsStream(PORTLET_XML);
+            final InputStream webIn = servletContext.getResourceAsStream(WEB_XML);
             if (paIn == null) {
                 throw new PortletContainerException("Cannot find '" + PORTLET_XML +
                     "'. Are you sure it is in the deployed package?");
@@ -304,7 +304,7 @@ public class DefaultPortletRegistryServi
             }
             portletApp = portletDDService.read(name, contextPath, paIn);
             portletDDService.mergeWebDescriptor(portletApp, webIn);
-        } catch (Exception ex) {
+        } catch (final Exception ex) {
             throw new PortletContainerException("Unable to load portlet descriptor for context " + contextPath, ex);
         } finally {
             Thread.currentThread().setContextClassLoader(oldTCCL);
@@ -323,7 +323,7 @@ public class DefaultPortletRegistryServi
     /**
      * @see org.apache.sling.portal.container.PortletRegistryService#addApplicationListener(org.apache.sling.portal.container.ApplicationRegistryListener)
      */
-    public void addApplicationListener(ApplicationRegistryListener listener) {
+    public void addApplicationListener(final ApplicationRegistryListener listener) {
         if ( listener != null ) {
             synchronized ( this.appListeners ) {
                 this.appListeners.add(listener);
@@ -334,63 +334,11 @@ public class DefaultPortletRegistryServi
     /**
      * @see org.apache.sling.portal.container.PortletRegistryService#removeApplicationListener(org.apache.sling.portal.container.ApplicationRegistryListener)
      */
-    public void removeApplicationListener(ApplicationRegistryListener listener) {
+    public void removeApplicationListener(final ApplicationRegistryListener listener) {
         if ( listener != null ) {
             synchronized ( this.appListeners ) {
                 this.appListeners.remove(listener);
             }
         }
     }
-
-    /**
-     * @see org.apache.sling.portal.container.PortletRegistryService#addPortletEntityListener(org.apache.sling.portal.container.PortletEntityRegistryListener)
-     */
-    public void addPortletEntityListener(PortletEntityRegistryListener listener) {
-        if ( listener != null ) {
-            synchronized ( this.entityListeners ) {
-                this.entityListeners.add(listener);
-            }
-        }
-    }
-
-    /**
-     * @see org.apache.sling.portal.container.PortletRegistryService#removePortletEntityListener(org.apache.sling.portal.container.PortletEntityRegistryListener)
-     */
-    public void removePortletEntityListener(PortletEntityRegistryListener listener) {
-        if ( listener != null ) {
-            synchronized ( this.entityListeners ) {
-                this.entityListeners.remove(listener);
-            }
-        }
-    }
-
-    public static final class PortletInfoImpl implements SlingPortletEntity {
-        public SlingPortletContext portletContext;
-        public SlingPortletConfig portletConfig;
-        public Portlet portlet;
-        public boolean loaded = false;
-        private final PortletEntityId id;
-
-        public PortletInfoImpl(final PortletEntityId id) {
-            this.id = id;
-        }
-        public Portlet getPortlet() {
-            return this.portlet;
-        }
-        public SlingPortletConfig getPortletConfig() {
-            return this.portletConfig;
-        }
-        public SlingPortletContext getPortletContext() {
-            return this.portletContext;
-        }
-        public boolean isLoaded() {
-            return this.loaded;
-        }
-        public PortletDefinition getPortletDefinition() {
-            return this.portletConfig.getPortletDefinition();
-        }
-        public PortletEntityId getPortletEntityId() {
-            return this.id;
-        }
-    }
 }

Modified: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/FilterManagerServiceImpl.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/FilterManagerServiceImpl.java?rev=1362405&r1=1362404&r2=1362405&view=diff
==============================================================================
--- sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/FilterManagerServiceImpl.java (original)
+++ sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/services/FilterManagerServiceImpl.java Tue Jul 17 08:27:09 2012
@@ -56,7 +56,7 @@ public class FilterManagerServiceImpl
      * Constructor.
      * @param registry The portlet registry
      */
-    public FilterManagerServiceImpl(PortletRegistryService registry) {
+    public FilterManagerServiceImpl(final PortletRegistryService registry) {
         this.registry = registry;
         registry.addApplicationListener(this);
     }
@@ -100,7 +100,7 @@ public class FilterManagerServiceImpl
         return FilterManagerImpl.EMPTY_FILTER_LIST;
     }
 
-    private boolean isLifeCycle(Filter filter, String lifeCycle){
+    private boolean isLifeCycle(final Filter filter, final String lifeCycle){
         List <String> lifeCyclesList = filter.getLifecycles();
         for (String string : lifeCyclesList) {
             if (string.equals(lifeCycle)) {
@@ -110,7 +110,7 @@ public class FilterManagerServiceImpl
         return false;
     }
 
-    private boolean isFilter(FilterMapping filterMapping,String portletName){
+    private boolean isFilter(final FilterMapping filterMapping, final String portletName){
         List <String> portletNamesList = filterMapping.getPortletNames();
         for (String portletNameFromFilterList : portletNamesList) {
             if (portletNameFromFilterList.endsWith("*")){
@@ -134,7 +134,7 @@ public class FilterManagerServiceImpl
     /**
      * @see org.apache.sling.portal.container.ApplicationRegistryListener#notifyPortletApplicationAdded(org.apache.sling.portal.container.SlingPortletContext)
      */
-    public void notifyPortletApplicationAdded(SlingPortletContext ctx) {
+    public void notifyPortletApplicationAdded(final SlingPortletContext ctx) {
         // cache filters
         final Map<String, PortletFilter> appFilters = new HashMap<String, PortletFilter>();
         //the filter is specified for the portlet, check the filter for the lifecycle
@@ -149,13 +149,13 @@ public class FilterManagerServiceImpl
                 portletFilter.init(config);
 
                 appFilters.put(name, portletFilter);
-            } catch (ClassNotFoundException e) {
+            } catch (final ClassNotFoundException e) {
                 filterInitEx = e;
-            } catch (InstantiationException e) {
+            } catch (final InstantiationException e) {
                 filterInitEx = e;
-            } catch (IllegalAccessException e) {
+            } catch (final IllegalAccessException e) {
                 filterInitEx = e;
-            } catch (PortletException e) {
+            } catch (final PortletException e) {
                 filterInitEx = e;
             }
             if ( filterInitEx != null ) {
@@ -168,7 +168,7 @@ public class FilterManagerServiceImpl
     /**
      * @see org.apache.sling.portal.container.ApplicationRegistryListener#notifyPortletApplicationRemoved(org.apache.sling.portal.container.SlingPortletContext)
      */
-    public void notifyPortletApplicationRemoved(SlingPortletContext ctx) {
+    public void notifyPortletApplicationRemoved(final SlingPortletContext ctx) {
         // remove filters from cache
         final Map<String, PortletFilter> appFilters = this.filters.remove(ctx.getPortletApplicationDefinition().getName());
         if ( appFilters != null ) {

Modified: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/ui/UIServlet.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/ui/UIServlet.java?rev=1362405&r1=1362404&r2=1362405&view=diff
==============================================================================
--- sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/ui/UIServlet.java (original)
+++ sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/ui/UIServlet.java Tue Jul 17 08:27:09 2012
@@ -22,6 +22,11 @@ import java.util.Iterator;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Properties;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.Service;
 import org.apache.sling.api.SlingHttpServletRequest;
 import org.apache.sling.api.SlingHttpServletResponse;
 import org.apache.sling.api.servlets.SlingSafeMethodsServlet;
@@ -34,12 +39,14 @@ import org.slf4j.LoggerFactory;
 /**
  * Exports a list of all available portlet entities as options.
  *
- * @scr.component  metatype="false"
- * @scr.service
- * @scr.property name="sling.servlet.paths" values.1="/libs/foundation/components/portlet/entities"
- * @scr.property name="sling.servlet.extensions" values="json"
- * @scr.property name="sling.servlet.methods" values="GET"
  */
+@Component
+@Service(value=javax.servlet.Servlet.class)
+@Properties({
+    @Property(name="sling.servlet.paths", value="/libs/foundation/components/portlet/entities"),
+    @Property(name="sling.servlet.extensions", value="json"),
+    @Property(name="sling.servlet.methods", value="GET")
+})
 public class UIServlet extends SlingSafeMethodsServlet {
 
     /**
@@ -47,13 +54,13 @@ public class UIServlet extends SlingSafe
      */
     private final Logger logger = LoggerFactory.getLogger(this.getClass());
 
-    /** @scr.reference */
+    @Reference
     private SlingPortletContainer container;
 
     /**
      * {@inheritDoc}
      */
-    protected void doGet(SlingHttpServletRequest req, SlingHttpServletResponse resp)
+    protected void doGet(final SlingHttpServletRequest req, final SlingHttpServletResponse resp)
     throws ServletException, IOException {
         try {
             final JSONWriter w = new JSONWriter(resp.getWriter());
@@ -72,7 +79,7 @@ public class UIServlet extends SlingSafe
                 w.endObject();
             }
             w.endArray();
-        } catch (Exception e) {
+        } catch (final Exception e) {
             logger.error("Error while generating JSON list", e);
             resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.toString());
             return;

Modified: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/util/ContextPathUtil.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/util/ContextPathUtil.java?rev=1362405&r1=1362404&r2=1362405&view=diff
==============================================================================
--- sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/util/ContextPathUtil.java (original)
+++ sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/util/ContextPathUtil.java Tue Jul 17 08:27:09 2012
@@ -41,7 +41,7 @@ public abstract class ContextPathUtil {
     static {
         try {
             contextPathGetter = ServletContext.class.getMethod("getContextPath", (Class[])null);
-        } catch (NoSuchMethodException e) {
+        } catch (final NoSuchMethodException e) {
             LOGGER.warn("Servlet 2.4 or below detected. Unable to find getContextPath on ServletContext.");
         }
     }
@@ -51,7 +51,7 @@ public abstract class ContextPathUtil {
      * If Servlet API 2.5 (or above) is available we can directly use that method.
      * If not we try different approaches to get the context path.
      */
-    public static String getContextPath(ServletContext context) {
+    public static String getContextPath(final ServletContext context) {
         String contextPath = null;
         if (contextPathGetter != null) {
             try {
@@ -71,13 +71,13 @@ public abstract class ContextPathUtil {
     private static final String WEB_XML = "/WEB-INF/web.xml";
     private static final String JNDI_PREFIX = "jndi:/";
 
-    private static String resolveContextPathFromResourcePath(ServletContext context) {
+    private static String resolveContextPathFromResourcePath(final ServletContext context) {
         try {
-            URL webXmlUrl = context.getResource(WEB_XML);
+            final URL webXmlUrl = context.getResource(WEB_XML);
             String path = webXmlUrl.toExternalForm();
             path = path.substring(0, path.indexOf(WEB_XML));
 
-            int slash = path.lastIndexOf('/');
+            final int slash = path.lastIndexOf('/');
             if ((slash < JNDI_PREFIX.length()) && path.startsWith(JNDI_PREFIX)) {
                 // Tomcat resources look like "jndi:/hostname/contextPath/WEB-INF/web.xml"
                 // where "/contextPath" is "" for the ROOT context.
@@ -88,8 +88,8 @@ public abstract class ContextPathUtil {
                 path = path.substring(slash);
             }
 
-            int id = path.indexOf(".war");
-            if(id > 0) {
+            final int id = path.indexOf(".war");
+            if (id > 0) {
                 path = path.substring(0, id);
             }
             // check if path starts with '_', if remove it
@@ -97,13 +97,13 @@ public abstract class ContextPathUtil {
                 path = path.charAt(0) + path.substring(2);
             }
             return path;
-        } catch (MalformedURLException e) {
+        } catch (final MalformedURLException e) {
             LOGGER.warn("Error retrieving web.xml from ServletContext. Unable to derive contextPath.");
             return null;
         }
     }
 
-    private static String computeContextPath(ServletContext context) {
+    private static String computeContextPath(final ServletContext context) {
         final String path = resolveContextPathFromResourcePath(context);
         if ( path == null ) {
             LOGGER.warn("Unable to resolve context path.");

Modified: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/util/PortalUtil.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/util/PortalUtil.java?rev=1362405&r1=1362404&r2=1362405&view=diff
==============================================================================
--- sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/util/PortalUtil.java (original)
+++ sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/internal/util/PortalUtil.java Tue Jul 17 08:27:09 2012
@@ -21,7 +21,7 @@ import javax.portlet.PortletRequest;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletRequestWrapper;
 
-import org.apache.jackrabbit.util.ISO9075;
+import org.apache.jackrabbit.util.Text;
 import org.apache.pluto.container.PortletInvokerService;
 import org.apache.pluto.container.PortletRequestContext;
 import org.apache.sling.api.SlingHttpServletRequest;
@@ -60,16 +60,11 @@ public abstract class PortalUtil {
         return session.getUserID().equals("anonymous");
     }
 
-    public static String encodePropertyName(String name) {
-        name = name.replace("%", "%1");
-        name = name.replace(":", "%2");
-        return ISO9075.encode(name);
+    public static String encodePropertyName(final String name) {
+        return Text.escapeIllegalJcrChars(name);
     }
 
-    public static String decodePropertyName(String name) {
-        name = ISO9075.decode(name);
-        name = name.replace("%2", ":");
-        name = name.replace("%1", "%");
-        return name;
+    public static String decodePropertyName(final String name) {
+        return Text.unescapeIllegalJcrChars(name);
     }
 }

Added: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/spi/PortalCCPPProfileService.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/spi/PortalCCPPProfileService.java?rev=1362405&view=auto
==============================================================================
--- sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/spi/PortalCCPPProfileService.java (added)
+++ sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/spi/PortalCCPPProfileService.java Tue Jul 17 08:27:09 2012
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.portal.container.spi;
+
+import org.apache.pluto.container.CCPPProfileService;
+
+/**
+ * Optional service for creating CCPP profiles.
+ */
+public interface PortalCCPPProfileService extends CCPPProfileService {
+
+    // marker interface
+}

Propchange: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/spi/PortalCCPPProfileService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/spi/PortalCCPPProfileService.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/spi/PortalCCPPProfileService.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/spi/PortalEventCoordinatorService.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/spi/PortalEventCoordinatorService.java?rev=1362405&view=auto
==============================================================================
--- sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/spi/PortalEventCoordinatorService.java (added)
+++ sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/spi/PortalEventCoordinatorService.java Tue Jul 17 08:27:09 2012
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.portal.container.spi;
+
+import java.util.List;
+
+import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.portal.container.SlingPortletWindow;
+
+/**
+ * Required service for event delivery
+ */
+public interface PortalEventCoordinatorService {
+
+    /**
+     * Return all portlet window's that might get events for the current request.
+     * @return List of portlet window ids - list might be empty - but not <code>null</code>
+     */
+    List<SlingPortletWindow> getPortletWindow(final SlingHttpServletRequest request);
+}

Propchange: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/spi/PortalEventCoordinatorService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/spi/PortalEventCoordinatorService.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/spi/PortalEventCoordinatorService.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/spi/PortalUserInfoService.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/spi/PortalUserInfoService.java?rev=1362405&view=auto
==============================================================================
--- sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/spi/PortalUserInfoService.java (added)
+++ sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/spi/PortalUserInfoService.java Tue Jul 17 08:27:09 2012
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.portal.container.spi;
+
+import org.apache.pluto.container.UserInfoService;
+
+/**
+ * Optional service for providing user information
+ */
+public interface PortalUserInfoService extends UserInfoService {
+
+    // marker interface
+}

Propchange: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/spi/PortalUserInfoService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/spi/PortalUserInfoService.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision rev url

Propchange: sling/whiteboard/portal/container/src/main/java/org/apache/sling/portal/container/spi/PortalUserInfoService.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message