portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r758134 [3/5] - in /portals/jetspeed-2/portal/trunk: applications/jetspeed/src/main/webapp/WEB-INF/templates/layout/html/solo/ applications/jetspeed/src/main/webapp/decorations/layout/blueocean/ applications/jetspeed/src/main/webapp/decorat...
Date Wed, 25 Mar 2009 03:25:00 GMT
Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContext.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContext.java?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContext.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContext.java Wed Mar 25 03:24:47 2009
@@ -32,17 +32,16 @@
 import org.apache.jetspeed.Jetspeed;
 import org.apache.jetspeed.PortalReservedParameters;
 import org.apache.jetspeed.aggregator.ContentDispatcher;
-import org.apache.jetspeed.aggregator.ContentDispatcherCtrl;
+import org.apache.jetspeed.aggregator.impl.PortletAggregatorFragmentImpl;
 import org.apache.jetspeed.capabilities.CapabilityMap;
 import org.apache.jetspeed.container.ContainerConstants;
 import org.apache.jetspeed.container.PortletWindow;
-import org.apache.jetspeed.container.PortletWindowID;
-import org.apache.jetspeed.container.PortletWindowRequestContext;
 import org.apache.jetspeed.container.url.PortalURL;
-import org.apache.jetspeed.engine.servlet.ServletRequestFactory;
-import org.apache.jetspeed.engine.servlet.ServletResponseFactory;
+import org.apache.jetspeed.om.page.ContentFragment;
+import org.apache.jetspeed.om.page.ContentFragmentImpl;
 import org.apache.jetspeed.om.page.ContentPage;
 import org.apache.jetspeed.om.page.ContentPageImpl;
+import org.apache.jetspeed.om.page.Fragment;
 import org.apache.jetspeed.om.portlet.Language;
 import org.apache.jetspeed.pipeline.Pipeline;
 import org.apache.jetspeed.portalsite.PortalSiteRequestContext;
@@ -54,6 +53,7 @@
 import org.apache.jetspeed.security.User;
 import org.apache.jetspeed.util.JetspeedLocale;
 import org.apache.jetspeed.om.portlet.PortletDefinition;
+import org.apache.jetspeed.om.window.impl.PortletWindowImpl;
 
 /**
  * Jetspeed Request Context is associated with each portal request. The request
@@ -67,8 +67,9 @@
 public class JetspeedRequestContext implements RequestContext
 {
     private static final String ACTION_ERROR_ATTR = "org.apache.jetspeed.action.error:";
+    private static final String INSTANT_WINDOWS_SESSION_KEY = "org.apache.jetspeed.instant.windows";
     
-    private final ThreadLocal<PortletWindowRequestContext> pwrc = new ThreadLocal<PortletWindowRequestContext>();
+    private final ThreadLocal<PortletWindow> currentWindow = new ThreadLocal<PortletWindow>();
     
     private RequestContextComponent rcc;
     private HttpServletRequest request;
@@ -90,10 +91,8 @@
     private PortletWindow actionWindow;
     private String encoding;
     private String requestPath = null;
-    private Map<PortletWindowID, HttpServletRequest> requestsForWindows;
-    private Map<PortletWindowID, HttpServletResponse> responsesForWindows;
     private final Map<String, Object> objects;
-    private final Map<PortletWindowID, Map<String, Object>> portletWindowAttributesMap;
+    private final Map<String, PortletWindow> portletWindows;
     
     /**
      * Create a new Request Context
@@ -115,16 +114,16 @@
         this.response = response;
         this.config = config;
         this.session = request.getSession();
-        this.requestsForWindows = new HashMap<PortletWindowID, HttpServletRequest>();
-        this.responsesForWindows = new HashMap<PortletWindowID, HttpServletResponse>();
         this.objects = objects;
-        this.portletWindowAttributesMap = new HashMap<PortletWindowID,Map<String, Object>>();
+        this.portletWindows = new HashMap<String,PortletWindow>();
 
         // set context in Request for later use
         if (null != this.request)
         {
             this.request.setAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE, this);
             this.request.setAttribute(ContainerConstants.PORTAL_CONTEXT, this.request.getContextPath());
+            this.request.setAttribute(PortalReservedParameters.REQUEST_CONTEXT_OBJECTS, objects);
+            
             PortalRequestFactory prf = null;
             try
             {
@@ -182,6 +181,10 @@
     public void setPage( ContentPage page )
     {
         this.page = page;
+        if (page != null)
+        {
+            getRequest().setAttribute(PortalReservedParameters.PAGE_ATTRIBUTE, page);
+        }
     }
 
     public PortletDefinition getPortletDefinition()
@@ -309,81 +312,6 @@
         this.encoding = enc;
     }
 
-    public PortletWindowRequestContext getCurrentPortletWindowRequestContext()
-    {
-        return pwrc.get();
-    }
-    
-    public void setCurrentPortletWindowRequestContext(PortletWindowRequestContext value)
-    {
-        if (value == null)
-        {
-            pwrc.remove();
-        }
-        else
-        {
-            pwrc.set(value);
-        }
-    }
-
-    /**
-     * <p>
-     * getRequestForWindow
-     * </p>
-     * 
-     * @see org.apache.jetspeed.request.RequestContext#getRequestForWindow(org.apache.jetspeed.container.PortletWindow)
-     * @param window
-     * @return
-     */
-    public HttpServletRequest getRequestForWindow( PortletWindow window )
-    {
-        if (!requestsForWindows.containsKey(window.getId()))
-        {            
-            ServletRequestFactory reqFactory = rcc.getServletRequestFactory(); 
-            HttpServletRequest requestWrapper = reqFactory.getServletRequest(request, window);
-            requestsForWindows.put(window.getId(), requestWrapper);
-            return requestWrapper;
-        }
-        else
-        {
-            return (HttpServletRequest) requestsForWindows.get(window.getId());
-        }
-
-    }
-
-    /**
-     * <p>
-     * getResponseForWindow
-     * </p>
-     * 
-     * @see org.apache.jetspeed.request.RequestContext#getResponseForWindow(org.apache.jetspeed.container.PortletWindow)
-     * @param window
-     * @return
-     */
-    public HttpServletResponse getResponseForWindow( PortletWindow window )
-    {
-        HttpServletResponse wrappedResponse = null;
-
-        if (!responsesForWindows.containsKey(window.getId()))
-        {
-            if (getContentDispatcher() != null)
-            {
-                wrappedResponse = ((ContentDispatcherCtrl) getContentDispatcher()).getResponseForWindow(window, this);
-            }
-            else
-            {
-                ServletResponseFactory rspFactory = rcc.getServletResponseFactory(); 
-                wrappedResponse = rspFactory.getServletResponse(this.response);
-            }
-            responsesForWindows.put(window.getId(), wrappedResponse);
-            return wrappedResponse;
-        }
-        else
-        {
-            return (HttpServletResponse) responsesForWindows.get(window.getId());
-        }
-    }
-
     /**
      * @see org.apache.jetspeed.request.RequestContext#getSubject()
      */
@@ -674,19 +602,120 @@
         return objects;
     }
     
-    public synchronized Map<String, Object> getPortletWindowAttributes(PortletWindow window)
+    public PortletWindow getCurrentPortletWindow()
+    {
+        return currentWindow.get();
+    }
+    
+    public void setCurrentPortletWindow(PortletWindow window)
+    {
+        currentWindow.set(window);
+    }
+    
+    public synchronized PortletWindow getPortletWindow(String windowId)
+    {
+        return portletWindows.get(windowId);
+    }
+    
+    public synchronized PortletWindow getPortletWindow(ContentFragment fragment)
     {
-        Map<String, Object> attributes = portletWindowAttributesMap.get(window.getId());
-        if (attributes == null)
+        PortletWindow window = portletWindows.get(fragment.getId());
+        if (window == null)
         {
-            attributes = new HashMap<String, Object>();
-            attributes.put(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE, this);
-            if (getObjects() != null)
+            PortletDefinition pd = rcc.getPortletRegistry().getPortletDefinitionByUniqueName(fragment.getName());
+            if (pd != null)
             {
-                attributes.put(PortalReservedParameters.REQUEST_CONTEXT_OBJECTS, getObjects());
+                window = new PortletWindowImpl(this, fragment, pd);
+                portletWindows.put(window.getWindowId(), window);
+            }
+            else
+            {
+                fragment.overrideRenderedContent("Failed to retrieve Portlet Definition for " + fragment.getName());
             }
-            portletWindowAttributesMap.put(window.getId(), attributes);
         }
-        return attributes;
+        return window;
+    }
+    
+    @SuppressWarnings("unchecked")
+    public PortletWindow getInstantlyCreatedPortletWindow(String windowId)
+    {
+        PortletWindow window = null;
+        HttpSession session = getRequest().getSession();
+        if (session != null)
+        {
+            synchronized (session)
+            {
+                Map<String,Map<String,String>> pages = (Map<String,Map<String,String>>)session.getAttribute(INSTANT_WINDOWS_SESSION_KEY);
+                if (pages != null)
+                {
+                    Map<String,String> instantWindows = pages.get(getPage().getId());
+                    if (instantWindows != null)
+                    {
+                        String portletId = instantWindows.get(windowId);
+                        if (portletId != null)
+                        {
+                            Fragment fragment = new PortletAggregatorFragmentImpl(windowId);
+                            fragment.setType(Fragment.PORTLET);
+                            fragment.setName(portletId);
+                            window = getPortletWindow(new ContentFragmentImpl(fragment, new HashMap(), true));
+                        }
+                    }
+                }
+            }
+        }
+        return window;
+    }
+    
+    public PortletWindow resolvePortletWindow(String windowId)
+    {
+        PortletWindow window = portletWindows.get(windowId);
+        if (window == null)
+        {
+            ContentFragment fragment = getPage().getContentFragmentById(windowId);
+            if (fragment == null)
+            {
+                window = getInstantlyCreatedPortletWindow(windowId);
+            }
+            else
+            {
+                window = getPortletWindow(fragment);
+            }
+        }
+        return window;
+    }
+    
+    @SuppressWarnings("unchecked")
+    public void registerInstantlyCreatedPortletWindow(PortletWindow portletWindow)
+    {
+        HttpSession session = getRequest().getSession(true);
+        synchronized (session)
+        {
+            Map<String,Map<String,String>> pages = (Map<String,Map<String,String>>)session.getAttribute(INSTANT_WINDOWS_SESSION_KEY);            
+            if (pages == null)
+            {
+                pages = new HashMap<String,Map<String,String>>();
+                session.setAttribute(INSTANT_WINDOWS_SESSION_KEY, pages);
+            }
+            String pageId = getPage().getId();
+            Map<String,String> instantWindows = pages.get(pageId);
+            if (instantWindows == null)
+            {
+                instantWindows = new HashMap<String,String>();
+                pages.put(pageId, instantWindows);
+            }
+            instantWindows.put(portletWindow.getWindowId(), portletWindow.getPortletDefinition().getUniqueName());
+        }
+    }
+
+    public boolean ensureThreadContext()
+    {
+        RequestContext current = rcc.getRequestContext();
+        rcc.setRequestContext(this);
+        return current == null || current != this;
+    }
+    
+    public void clearThreadContext()
+    {
+        rcc.setRequestContext(null);
     }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContextComponent.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContextComponent.java?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContextComponent.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/request/JetspeedRequestContextComponent.java Wed Mar 25 03:24:47 2009
@@ -16,8 +16,6 @@
  */
 package org.apache.jetspeed.request;
 
-import java.lang.reflect.Constructor;
-import java.util.HashMap;
 import java.util.Map;
 
 import javax.servlet.ServletConfig;
@@ -26,10 +24,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.jetspeed.PortalReservedParameters;
-import org.apache.jetspeed.aggregator.CurrentWorkerContext;
-import org.apache.jetspeed.engine.servlet.ServletRequestFactory;
-import org.apache.jetspeed.engine.servlet.ServletResponseFactory;
+import org.apache.jetspeed.components.portletregistry.PortletRegistry;
 import org.apache.jetspeed.userinfo.UserInfoManager;
 
 /**
@@ -40,28 +35,24 @@
  */
 public class JetspeedRequestContextComponent implements RequestContextComponent
 {
-    ServletRequestFactory requestFactory;
-    ServletResponseFactory responseFactory;
+    private PortletRegistry registry;
     private UserInfoManager userInfoMgr;
-    private ThreadLocal tlRequestContext = new ThreadLocal();
     private Map<String, Object> requestContextObjects;
+    private ThreadLocal<RequestContext> tlRequestContext = new ThreadLocal<RequestContext>();
     
     private final static Log log = LogFactory.getLog(JetspeedRequestContextComponent.class);
 
 
-    public JetspeedRequestContextComponent(ServletRequestFactory requestFactory, ServletResponseFactory responseFactory, 
-            UserInfoManager userInfoMgr,
-            Map<String, Object> requestContextObjects)
+    public JetspeedRequestContextComponent(PortletRegistry registry, UserInfoManager userInfoMgr, Map<String, Object> requestContextObjects)
     {
-        this.requestFactory = requestFactory;
-        this.responseFactory = responseFactory;
+        this.registry = registry;
         this.userInfoMgr = userInfoMgr;
         this.requestContextObjects = requestContextObjects;        
     }
     
     public RequestContext create(HttpServletRequest request, HttpServletResponse response, ServletConfig config)
     {
-        RequestContext context = null;
+        JetspeedRequestContext context = null;
 
         try
         {
@@ -73,61 +64,25 @@
             String msg = "JetspeedRequestContextComponent: Failed to create a Class object for RequestContext: " + e.toString();
             log.error(msg);
         }
-        tlRequestContext.set(context);        
+        setRequestContext(context);
         return context;
     }
-
-    public void release(RequestContext context)
-    {
-        tlRequestContext.set(null);
-    }
-
-    /**
-     * The servlet request can always get you back to the Request Context if you need it
-     * This static accessor provides this capability
-     *
-     * @param request
-     * @return RequestContext
-     */
-    public RequestContext getRequestContext(HttpServletRequest request)
-    {
-        RequestContext rc = (RequestContext) request.getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
-        if(rc != null)
-        {
-            return rc;
-        }
-        else
-        {
-            log.error("Cannot call getRequestContext(HttpServletRequest request) before it has been created and set for this thread.");
-            throw new IllegalStateException("Cannot call getRequestContext(HttpServletRequest request) before it has been created and set for this thread.");
-        }
-    }
     
-    public RequestContext getRequestContext()
+    public void setRequestContext(RequestContext context)
     {
-        RequestContext rc = null;
-
-        if (CurrentWorkerContext.getParallelRenderingMode())
-        {
-            rc = (RequestContext) CurrentWorkerContext.getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
-        }
-        else
-        {
-            rc = (RequestContext) tlRequestContext.get();        
-        }
-        return rc;
+        tlRequestContext.set(context);
     }
 
-    public ServletRequestFactory getServletRequestFactory()
+    public RequestContext getRequestContext()
     {
-        return this.requestFactory;
+        return tlRequestContext.get();
     }
     
-    public ServletResponseFactory getServletResponseFactory()
+    public PortletRegistry getPortletRegistry()
     {
-        return this.responseFactory;
+        return registry;
     }
-    
+
     public UserInfoManager getUserInfoManager()
     {
         return this.userInfoMgr;

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/resource/ResourceValveImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/resource/ResourceValveImpl.java?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/resource/ResourceValveImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/resource/ResourceValveImpl.java Wed Mar 25 03:24:47 2009
@@ -17,7 +17,6 @@
 package org.apache.jetspeed.resource;
 
 import java.io.IOException;
-import java.util.HashMap;
 
 import javax.portlet.PortletException;
 import javax.servlet.http.HttpServletRequest;
@@ -26,11 +25,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.jetspeed.PortalReservedParameters;
-import org.apache.jetspeed.container.window.PortletWindowAccessor;
-import org.apache.jetspeed.om.page.ContentFragment;
-import org.apache.jetspeed.om.page.ContentFragmentImpl;
 import org.apache.jetspeed.om.page.Fragment;
-import org.apache.jetspeed.om.page.Page;
 import org.apache.jetspeed.pipeline.PipelineException;
 import org.apache.jetspeed.pipeline.valve.AbstractValve;
 import org.apache.jetspeed.pipeline.valve.ValveContext;
@@ -52,12 +47,10 @@
 
     private static final Log log = LogFactory.getLog(ResourceValveImpl.class);
     private PortletContainer container;
-    private PortletWindowAccessor windowAccessor;
 
-    public ResourceValveImpl(PortletContainer container, PortletWindowAccessor windowAccessor)
+    public ResourceValveImpl(PortletContainer container)
     {
         this.container = container;
-        this.windowAccessor = windowAccessor;
     }
     
     /**
@@ -71,39 +64,17 @@
         {
             try
             {            
-                Page page = request.getPage();
-                Fragment fragment = page.getFragmentById(resourceWindow.getId().toString());
-                // If portlet entity is null, try to refresh the resourceWindow.
-                // Under some clustered environments, a cached portlet window could have null entity.
-                if (null == resourceWindow.getPortletEntity())
+                Fragment fragment = resourceWindow.getFragment();
+                HttpServletRequest servletRequest = request.getRequest();
+                HttpServletResponse servletResponse = request.getResponse();
+                resourceWindow.setAttribute(PortalReservedParameters.PORTLET_CONTAINER_INVOKER_USE_FORWARD, Boolean.TRUE);
+                if (resourceWindow.getPortletDefinition().getApplication().getVersion().equals("1.0"))
                 {
-                    try 
-                    {
-                        ContentFragment contentFragment = new ContentFragmentImpl(fragment, new HashMap());
-                        resourceWindow = this.windowAccessor.getPortletWindow(contentFragment);
-                    } 
-                    catch (Exception e)
-                    {
-                        log.error("Failed to refresh resource window.", e);
-                    }
-                }
-                resourceWindow.getPortletEntity().setFragment(fragment);
-                HttpServletResponse response = request.getResponse();
-                HttpServletRequest requestForWindow = request.getRequestForWindow(resourceWindow);
-                requestForWindow.setAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE, request);
-                requestForWindow.setAttribute(PortalReservedParameters.PAGE_ATTRIBUTE, request.getPage());
-                requestForWindow.setAttribute(PortalReservedParameters.FRAGMENT_ATTRIBUTE, fragment);
-                request.setAttribute(PortalReservedParameters.REQUEST_CONTEXT_OBJECTS, request.getObjects());                        
-                request.setAttribute(PortalReservedParameters.PATH_ATTRIBUTE, request.getAttribute(PortalReservedParameters.PATH_ATTRIBUTE));
-                request.setAttribute(PortalReservedParameters.PORTLET_WINDOW_ATTRIBUTE, resourceWindow);
-                request.setAttribute(PortalReservedParameters.PORTLET_CONTAINER_INVOKER_USE_FORWARD, Boolean.TRUE);
-                if (resourceWindow.getPortletEntity().getPortletDefinition().getApplication().getVersion().equals("1.0"))
-                {
-                    container.doRender(resourceWindow, requestForWindow, response);
+                    container.doRender(resourceWindow, servletRequest, servletResponse);
                 }
                 else
                 {
-                    container.doServeResource(resourceWindow, requestForWindow, response);
+                    container.doServeResource(resourceWindow, servletRequest, servletResponse);
                 }
             }
             catch (PortletContainerException e)

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/title/DynamicTitleServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/title/DynamicTitleServiceImpl.java?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/title/DynamicTitleServiceImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/title/DynamicTitleServiceImpl.java Wed Mar 25 03:24:47 2009
@@ -21,9 +21,7 @@
 import javax.servlet.http.HttpServletRequest;
 
 import org.apache.jetspeed.PortalReservedParameters;
-import org.apache.jetspeed.container.PortletEntity;
 import org.apache.jetspeed.container.PortletWindow;
-import org.apache.jetspeed.request.RequestContext;
 
 public class DynamicTitleServiceImpl implements DynamicTitleService
 {
@@ -59,26 +57,12 @@
     protected final String getTitleFromPortletDefinition(PortletWindow window,
             HttpServletRequest request)
     {
-        String title = null;
-        RequestContext requestContext = (RequestContext) request
-                .getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
-        
-        PortletEntity entity = window.getPortletEntity();
-        if (entity != null && entity.getPortletDefinition() != null)
-        {
-            title = requestContext.getPreferedLanguage(
-                    entity.getPortletDefinition()).getTitle();
-        }
-
-        if (title == null && entity.getPortletDefinition() != null)
-        {
-            title = entity.getPortletDefinition().getPortletName();
-        }
-        else if (title == null)
+        String title = null;        
+        title = window.getRequestContext().getPreferedLanguage(window.getPortletDefinition()).getTitle();
+        if (title == null)
         {
-            title = "Invalid portlet entity " + entity.getId();
+            title = window.getPortletDefinition().getPortletName();
         }
-        
         return title;
     }
 

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java Wed Mar 25 03:24:47 2009
@@ -19,23 +19,16 @@
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
 import java.util.List;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.jetspeed.cluster.NodeManager;
-import org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent;
-import org.apache.jetspeed.components.portletentity.PortletEntityNotDeletedException;
 import org.apache.jetspeed.components.portletregistry.PortletRegistry;
 import org.apache.jetspeed.components.portletregistry.RegistryException;
-import org.apache.jetspeed.container.PortletEntity;
-import org.apache.jetspeed.container.window.PortletWindowAccessor;
 import org.apache.jetspeed.descriptor.JetspeedDescriptorService;
 import org.apache.jetspeed.factory.PortletFactory;
 import org.apache.jetspeed.om.portlet.PortletApplication;
-import org.apache.jetspeed.om.portlet.PortletDefinition;
 import org.apache.jetspeed.om.portlet.SecurityRole;
 import org.apache.jetspeed.search.SearchEngine;
 import org.apache.jetspeed.security.JetspeedPermission;
@@ -60,10 +53,8 @@
     private static int DEFAULT_MAX_RETRIED_STARTS = 10; // 10 times retry PA
     private static final Log    log = LogFactory.getLog("deployment");
 
-    protected PortletEntityAccessComponent entityAccess;
     protected PortletFactory        portletFactory;
     protected PortletRegistry       registry;
-    protected PortletWindowAccessor windowAccess;
     protected SearchEngine          searchEngine;
     protected RoleManager           roleManager;
     protected PermissionManager     permissionManager;
@@ -85,15 +76,12 @@
 	 * Creates a new PortletApplicationManager object.
 	 */
 	public PortletApplicationManager(PortletFactory portletFactory, PortletRegistry registry,
-		PortletEntityAccessComponent entityAccess, PortletWindowAccessor windowAccess,
         PermissionManager permissionManager, SearchEngine searchEngine,
         RoleManager roleManager, List<String> permissionRoles, NodeManager nodeManager, String appRoot,
         JetspeedDescriptorService descriptorService)
 	{
 		this.portletFactory     = portletFactory;
 		this.registry		    = registry;
-		this.entityAccess	    = entityAccess;
-		this.windowAccess	    = windowAccess;
         this.permissionManager  = permissionManager;
         this.searchEngine       = searchEngine;
         this.roleManager        = roleManager;        
@@ -312,22 +300,6 @@
 			{
 				pa.setContextPath("<portal>");
 			}
-
-            // Make sure existing entities are refreshed with the most
-            // recent PortletDefintion.
-            for (PortletDefinition pd : pa.getPortlets())
-            {
-                Collection portletEntites = entityAccess.getPortletEntities(pd);
-                if(portletEntites != null && portletEntites.size() > 0)
-                {
-                    Iterator peItr = portletEntites.iterator();
-                    while(peItr.hasNext())
-                    {
-                        PortletEntity portletEntity = (PortletEntity) peItr.next();
-                        portletEntity.setPortletDefinition(pd);
-                    }
-                }
-            }
 		}
 		catch (Exception e)
 		{
@@ -692,35 +664,8 @@
 	{
 
 		updateSearchEngine(true,pa);
-		log.info("Remove all registry entries defined for portlet application " + pa.getName());
-
-		for (PortletDefinition portletDefinition : pa.getPortlets())
-		{
-			Iterator		  entities = entityAccess.getPortletEntities(portletDefinition)
-													 .iterator();
-
-			while (entities.hasNext())
-			{
-				PortletEntity entity = (PortletEntity) entities.next();
-
-				if (purgeEntityInfo)
-				{
-					try
-					{
-						entityAccess.removePortletEntity(entity);
-					}
-					catch (PortletEntityNotDeletedException e)
-					{
-						String msg = "Failed to delete Portlet Entity " + entity.getId();
-						log.error(msg, e);
-						throw new RegistryException(msg, e);
-					}
-				}
-
-				entityAccess.removeFromCache(entity);
-				windowAccess.removeWindows(entity);
-			}
-		}
+        // TODO: PortletDefinition cache invalidation?
+//		log.info("Remove all registry entries defined for portlet application " + pa.getName());
 
 		// todo keep (User)Prefs?
 		registry.removeApplication(pa);

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/VersionedPortletApplicationManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/VersionedPortletApplicationManager.java?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/VersionedPortletApplicationManager.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/tools/pamanager/VersionedPortletApplicationManager.java Wed Mar 25 03:24:47 2009
@@ -23,10 +23,8 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent;
 import org.apache.jetspeed.components.portletregistry.PortletRegistry;
 import org.apache.jetspeed.components.portletregistry.RegistryException;
-import org.apache.jetspeed.container.window.PortletWindowAccessor;
 import org.apache.jetspeed.descriptor.JetspeedDescriptorService;
 import org.apache.jetspeed.factory.PortletFactory;
 import org.apache.jetspeed.om.portlet.LocalizedField;
@@ -56,16 +54,15 @@
 
 
 
-public class VersionedPortletApplicationManager extends PortletApplicationManager implements PortletApplicationManagement
+public class VersionedPortletApplicationManager extends PortletApplicationManager
 {
     private static final Log    log = LogFactory.getLog("deployment");
         
     public VersionedPortletApplicationManager(PortletFactory portletFactory, PortletRegistry registry, 
-            PortletEntityAccessComponent entityAccess, PortletWindowAccessor windowAccess,
             PermissionManager permissionManager, SearchEngine searchEngine,  RoleManager roleManager,
             List<String> permissionRoles, /* node manager, */ String appRoot, JetspeedDescriptorService descriptorService)
     {
-        super(portletFactory, registry, entityAccess, windowAccess, permissionManager, 
+        super(portletFactory, registry, permissionManager, 
                 searchEngine, roleManager, permissionRoles, null, appRoot, descriptorService); 
                
     }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/userinfo/impl/AbstractUserInfoManagerImpl.java Wed Mar 25 03:24:47 2009
@@ -25,13 +25,12 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.jetspeed.PortalReservedParameters;
 import org.apache.jetspeed.om.portlet.UserAttribute;
 import org.apache.jetspeed.om.portlet.UserAttributeRef;
 import org.apache.jetspeed.om.portlet.impl.UserAttributeRefImpl;
 import org.apache.jetspeed.request.RequestContext;
 import org.apache.pluto.container.PortletContainerException;
-import org.apache.pluto.container.PortletWindow;
+import org.apache.jetspeed.container.PortletWindow;
 
 /**
  * <p> Common user info management support
@@ -108,17 +107,17 @@
     /**
      * For Pluto 2.0
      */
-    public Map<String, String> getUserInfo(PortletRequest request, PortletWindow window) throws PortletContainerException
+    public Map<String, String> getUserInfo(PortletRequest request, org.apache.pluto.container.PortletWindow window) throws PortletContainerException
     {
         String remoteUser = request.getRemoteUser(); 
         if ( remoteUser == null ) 
         {
             return null;
         }
-        RequestContext requestContext=(RequestContext)request.getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
-        return this.getUserInfoMap(window.getPortletEntity().getPortletDefinition().getApplication().getName(), requestContext);        
+        PortletWindow portletWindow = (PortletWindow)window;
+        return getUserInfoMap(portletWindow.getPortletDefinition().getApplication().getName(), portletWindow.getRequestContext());        
     }
 
-    public abstract Map getUserInfoMap(String appName, RequestContext context);
+    public abstract Map<String, String> getUserInfoMap(String appName, RequestContext context);
     
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/velocity/JetspeedPowerToolImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/velocity/JetspeedPowerToolImpl.java?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/velocity/JetspeedPowerToolImpl.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/velocity/JetspeedPowerToolImpl.java Wed Mar 25 03:24:47 2009
@@ -43,13 +43,9 @@
 import org.apache.jetspeed.aggregator.PortletRenderer;
 import org.apache.jetspeed.aggregator.impl.PortletAggregatorFragmentImpl;
 import org.apache.jetspeed.capabilities.CapabilityMap;
-import org.apache.jetspeed.components.portletentity.PortletEntityAccessComponent;
-import org.apache.jetspeed.components.portletentity.PortletEntityNotGeneratedException;
-import org.apache.jetspeed.components.portletentity.PortletEntityNotStoredException;
-import org.apache.jetspeed.container.state.NavigationalState;
+import org.apache.jetspeed.container.PortletWindow;
 import org.apache.jetspeed.container.url.BasePortalURL;
-import org.apache.jetspeed.container.window.FailedToRetrievePortletWindow;
-import org.apache.jetspeed.container.window.PortletWindowAccessor;
+import org.apache.jetspeed.container.window.FailedToCreateWindowException;
 import org.apache.jetspeed.locator.LocatorDescriptor;
 import org.apache.jetspeed.locator.TemplateDescriptor;
 import org.apache.jetspeed.locator.TemplateLocator;
@@ -62,7 +58,6 @@
 import org.apache.jetspeed.services.title.DynamicTitleService;
 import org.apache.jetspeed.util.ArgUtil;
 import org.apache.jetspeed.util.Path;
-import org.apache.jetspeed.container.PortletEntity;
 import org.apache.velocity.context.Context;
 
 /**
@@ -120,14 +115,10 @@
 
     protected TemplateLocator templateLocator;
 
-    protected PortletEntityAccessComponent entityAccess;
-
     protected TemplateLocator decorationLocator;
 
     protected LocatorDescriptor decorationLocatorDescriptor;
 
-    protected PortletWindowAccessor windowAccess;
-
     protected RequestContext requestContext;
 
     protected Context velocityContext;
@@ -143,8 +134,6 @@
         HttpServletRequest request = requestContext.getRequest();
         this.requestContext = requestContext;
         this.titleService = titleService;
-        windowAccess = (PortletWindowAccessor) getComponent(PortletWindowAccessor.class.getName());
-        entityAccess = (PortletEntityAccessComponent) getComponent(PortletEntityAccessComponent.class.getName());
         try
         {
             baseUrlAccess = (BasePortalURL) getComponent("BasePortalURL");
@@ -200,8 +189,7 @@
     {
         try
         {
-            NavigationalState nav = getRequestContext().getPortalURL().getNavigationalState();
-            return nav.getState(windowAccess.getPortletWindow(getCurrentFragment()));
+            return getRequestContext().getPortalURL().getNavigationalState().getState(getPortletWindow(getCurrentFragment()));
         }
         catch (Exception e)
         {
@@ -220,8 +208,7 @@
     {
         try
         {
-            NavigationalState nav = getRequestContext().getPortalURL().getNavigationalState();
-            return nav.getMappedState(windowAccess.getPortletWindow(getCurrentFragment()));
+            return getRequestContext().getPortalURL().getNavigationalState().getMappedState(getPortletWindow(getCurrentFragment()));
         }
         catch (Exception e)
         {
@@ -238,13 +225,11 @@
      */
     public PortletMode getPortletMode() throws Exception
     {
-
-        NavigationalState nav = getRequestContext().getPortalURL().getNavigationalState();
         try
         {
-            return nav.getMode(windowAccess.getPortletWindow(getCurrentFragment()));
+            return getRequestContext().getPortalURL().getNavigationalState().getMode(getPortletWindow(getCurrentFragment()));
         }
-        catch (FailedToRetrievePortletWindow e)
+        catch (Exception e)
         {
             handleError(e, e.toString(), getCurrentFragment());
             return null;
@@ -259,13 +244,11 @@
      */
     public PortletMode getMappedPortletMode() throws Exception
     {
-
-        NavigationalState nav = getRequestContext().getPortalURL().getNavigationalState();
         try
         {
-            return nav.getMappedMode(windowAccess.getPortletWindow(getCurrentFragment()));
+            return getRequestContext().getPortalURL().getNavigationalState().getMappedMode(getPortletWindow(getCurrentFragment()));
         }
-        catch (FailedToRetrievePortletWindow e)
+        catch (Exception e)
         {
             handleError(e, e.toString(), getCurrentFragment());
             return null;
@@ -344,58 +327,22 @@
 
     /**
      * 
-     * @return
-     * @throws Exception
-     */
-    public PortletEntity getCurrentPortletEntity() throws Exception
-    {
-        try
-        {
-            return windowAccess.getPortletWindow(getCurrentFragment()).getPortletEntity();
-        }
-        catch (Exception e)
-        {
-            handleError(e, "JetspeedPowerTool failed to retreive the current PortletEntity.  " + e.toString(),
-                    getCurrentFragment());
-            return null;
-        }
-    }
-
-    /**
-     * 
      * @param f
-     *            Fragment whose <code>PortletEntity</code> we want to
-     *            retreive.
-     * @return The PortletEntity represented by the current fragment.
+     *            Fragment whose <code>PortletWindow</code> we want to
+     *            retrieve.
+     * @return The PortletWindow represented by the current fragment.
      * @throws Exception
      */
-    public PortletEntity getPortletEntity(ContentFragment f) throws Exception
+    public PortletWindow getPortletWindow(ContentFragment f) throws Exception
     {
-        PortletEntity portletEntity = windowAccess.getPortletWindow(f).getPortletEntity();
-        // This API hits the DB: PortletEntity portletEntity = entityAccess.getPortletEntityForFragment(f);
-        if (portletEntity == null)
+        PortletWindow window = getRequestContext().getPortletWindow(f);
+        if (window == null)
         {
-            try
-            {
-                portletEntity = entityAccess.generateEntityFromFragment(f);
-                entityAccess.storePortletEntity(portletEntity);
-            }
-            catch (PortletEntityNotGeneratedException e)
-            {
-                String msg = "JetspeedPowerTool failed to retreive a PortletEntity for Fragment " + f.getId() + ".  "
-                        + e.toString();
-                handleError(e, msg, f);
-            }
-            catch (PortletEntityNotStoredException e)
-            {
-                String msg = "JetspeedPowerTool failed to store a PortletEntity for Fragment " + f.getId() + ".  "
-                        + e.toString();
-                handleError(e, msg, f);
-            }
+            throw new FailedToCreateWindowException("Portlet Window creation failed for fragment: "+ f.getId() + ", " + f.getName());
         }
-        return portletEntity;
+        return window;
     }
-
+    
     /**
      * Checks the the visibilty of this fragment with respect to the current
      * RenderReqeust.
@@ -728,7 +675,7 @@
      * @param entity
      * @return
      */
-    public String getTitle(PortletEntity entity, ContentFragment f)
+    public String getTitle(ContentFragment f)
     {
         String title = null;
 
@@ -742,7 +689,7 @@
             try
             {
 
-                return titleService.getDynamicTitle(windowAccess.getPortletWindow(f), getRequestContext().getRequest());
+                return titleService.getDynamicTitle(getPortletWindow(f), getRequestContext().getRequest());
             }
             catch (Exception e)
             {
@@ -761,22 +708,11 @@
      * </p>
      * Returns the appropriate for the title based on locale prferences
      * 
-     * @param entity
      * @return
      */
-    public String getTitle(PortletEntity entity)
+    public String getTitle()
     {
-        try
-        {
-            return titleService.getDynamicTitle(windowAccess.getPortletWindow(getCurrentFragment()),
-                    getRequestContext().getRequest());
-        }
-        catch (Exception e)
-        {
-            log.error("Unable to reteive portlet title: " + e.getMessage(), e);
-            return "Title Error: " + e.getMessage();
-        }
-
+        return getTitle(getCurrentFragment());
     }
 
     public Object getComponent(String name)
@@ -857,18 +793,32 @@
         }
     }
     
-    public String renderPortletEntity(String entityId, String portletId)
+    public String renderPortletWindow(String windowId, String portletId)
     {
-
         RequestContext context = getRequestContext();
-
-        PortletAggregatorFragmentImpl fragment = new PortletAggregatorFragmentImpl(
-                entityId);
-        fragment.setType(Fragment.PORTLET);
-        fragment.setName(portletId);
-        ContentFragment contentFragment = new ContentFragmentImpl(fragment, new HashMap(), true);
-        renderer.renderNow(contentFragment, context);
-        return contentFragment.getRenderedContent();
+        PortletWindow window = context.getPortletWindow(windowId);
+        try
+        {
+            if (window == null)
+            {
+                PortletAggregatorFragmentImpl fragment = new PortletAggregatorFragmentImpl(windowId);
+                fragment.setType(Fragment.PORTLET);
+                fragment.setName(portletId);
+                ContentFragment contentFragment = new ContentFragmentImpl(fragment, new HashMap(), true);
+                window = getPortletWindow(contentFragment);
+                context.registerInstantlyCreatedPortletWindow(window);
+                renderer.renderNow(window.getFragment(), context, true);
+                return window.getFragment().getRenderedContent();
+            }
+            else
+            {
+                throw new IllegalArgumentException("PortletWindow "+windowId+" already exists on this page");
+            }
+        }
+        catch (Exception e)
+        {
+            handleError(e, e.toString(), getCurrentFragment());
+            return "";
+        }
     }
-
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/AbstractPortalContainerTestCase.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/AbstractPortalContainerTestCase.java?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/AbstractPortalContainerTestCase.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/AbstractPortalContainerTestCase.java Wed Mar 25 03:24:47 2009
@@ -17,8 +17,6 @@
 package org.apache.jetspeed;
 
 
-import org.apache.jetspeed.container.window.PortletWindowAccessor;
-import org.apache.jetspeed.container.window.impl.PortletWindowAccessorImpl;
 import org.apache.pluto.container.PortletContainer;
 
 /**
@@ -27,8 +25,6 @@
  */
 public class AbstractPortalContainerTestCase extends AbstractRequestContextTestCase
 {
-    protected PortletWindowAccessor windowAccessor;
-
     protected PortletContainer portletContainer;
 
     /*
@@ -39,9 +35,5 @@
     protected void setUp() throws Exception
     {
         super.setUp();
-        windowAccessor = new PortletWindowAccessorImpl(entityAccess,
-            PortletFactoryMock.instance,
-            new HashMapWindowCache(),
-            true);
     }
 }

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/aggregator/TestRenderer.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/aggregator/TestRenderer.java?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/aggregator/TestRenderer.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/aggregator/TestRenderer.java Wed Mar 25 03:24:47 2009
@@ -50,7 +50,7 @@
         monitor = new WorkerMonitorImpl(5, 20, 5, 10);
         monitor.start();
         
-        renderer = new PortletRendererImpl(portletContainer, windowAccessor, monitor, null);       
+        renderer = new PortletRendererImpl(portletContainer, monitor, null);       
     }
     
     protected void tearDown() throws Exception

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/aggregator/TestWorkerMonitor.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/aggregator/TestWorkerMonitor.java?rev=758134&r1=758133&r2=758134&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/aggregator/TestWorkerMonitor.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/aggregator/TestWorkerMonitor.java Wed Mar 25 03:24:47 2009
@@ -24,7 +24,7 @@
 import junit.framework.TestSuite;
 
 import org.apache.jetspeed.aggregator.impl.WorkerMonitorImpl;
-import org.apache.jetspeed.om.window.impl.PortletWindowImpl;
+import org.apache.jetspeed.window.MockPortletWindow;
 import org.apache.jetspeed.container.PortletWindow;
 
 /**
@@ -69,7 +69,7 @@
         List jobs = new ArrayList(JOB_COUNT);
         for (int ix = 0; ix < JOB_COUNT; ix++)
         {
-            PortletWindow window = new PortletWindowImpl("w" + String.valueOf(ix));       
+            PortletWindow window = new MockPortletWindow("w" + String.valueOf(ix));       
             jobs.add(new MockRenderJob("Job-" + (ix + 1), 4000, window));
         }
         assertNotNull("monitor is null", monitor);

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/container/state/MockContentFragment.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/container/state/MockContentFragment.java?rev=758134&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/container/state/MockContentFragment.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/container/state/MockContentFragment.java Wed Mar 25 03:24:47 2009
@@ -0,0 +1,548 @@
+/*
+ * 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.jetspeed.container.state;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.jetspeed.aggregator.PortletContent;
+import org.apache.jetspeed.decoration.Decoration;
+import org.apache.jetspeed.om.common.SecurityConstraint;
+import org.apache.jetspeed.om.common.SecurityConstraints;
+import org.apache.jetspeed.om.page.ContentFragment;
+
+/**
+ * @version $Id$
+ *
+ */
+public class MockContentFragment implements ContentFragment
+{
+    private static final long serialVersionUID = 8967937534977844599L;
+    private String id;
+    
+    public MockContentFragment(String id)
+    {
+        this.id = id;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.ContentFragment#getContentFragments()
+     */
+    public List getContentFragments()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.ContentFragment#getDecoration()
+     */
+    public Decoration getDecoration()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.ContentFragment#getFragments()
+     */
+    public List getFragments()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.ContentFragment#getOverriddenContent()
+     */
+    public String getOverriddenContent()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.ContentFragment#getPortletContent()
+     */
+    public PortletContent getPortletContent()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.ContentFragment#getRenderedContent()
+     */
+    public String getRenderedContent() throws IllegalStateException
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.ContentFragment#isInstantlyRendered()
+     */
+    public boolean isInstantlyRendered()
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.ContentFragment#overrideRenderedContent(java.lang.String)
+     */
+    public void overrideRenderedContent(String contnent)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.ContentFragment#setDecoration(org.apache.jetspeed.decoration.Decoration)
+     */
+    public void setDecoration(Decoration decoration)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.ContentFragment#setPortletContent(org.apache.jetspeed.aggregator.PortletContent)
+     */
+    public void setPortletContent(PortletContent portletContent)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#getDecorator()
+     */
+    public String getDecorator()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#getFloatProperty(java.lang.String)
+     */
+    public float getFloatProperty(String propName)
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#getIntProperty(java.lang.String)
+     */
+    public int getIntProperty(String propName)
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#getLayoutColumn()
+     */
+    public int getLayoutColumn()
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#getLayoutHeight()
+     */
+    public float getLayoutHeight()
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#getLayoutRow()
+     */
+    public int getLayoutRow()
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#getLayoutSizes()
+     */
+    public String getLayoutSizes()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#getLayoutWidth()
+     */
+    public float getLayoutWidth()
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#getLayoutX()
+     */
+    public float getLayoutX()
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#getLayoutY()
+     */
+    public float getLayoutY()
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#getLayoutZ()
+     */
+    public float getLayoutZ()
+    {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#getMode()
+     */
+    public String getMode()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#getName()
+     */
+    public String getName()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#getPreferences()
+     */
+    public List getPreferences()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#getProperties()
+     */
+    public Map getProperties()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#getProperty(java.lang.String)
+     */
+    public String getProperty(String propName)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#getSkin()
+     */
+    public String getSkin()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#getState()
+     */
+    public String getState()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#getType()
+     */
+    public String getType()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#isReference()
+     */
+    public boolean isReference()
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#setDecorator(java.lang.String)
+     */
+    public void setDecorator(String decoratorName)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#setLayoutColumn(int)
+     */
+    public void setLayoutColumn(int column)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#setLayoutHeight(float)
+     */
+    public void setLayoutHeight(float height)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#setLayoutRow(int)
+     */
+    public void setLayoutRow(int row)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#setLayoutSizes(java.lang.String)
+     */
+    public void setLayoutSizes(String sizes)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#setLayoutWidth(float)
+     */
+    public void setLayoutWidth(float width)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#setLayoutX(float)
+     */
+    public void setLayoutX(float x)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#setLayoutY(float)
+     */
+    public void setLayoutY(float y)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#setLayoutZ(float)
+     */
+    public void setLayoutZ(float z)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#setMode(java.lang.String)
+     */
+    public void setMode(String mode)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#setName(java.lang.String)
+     */
+    public void setName(String name)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#setPreferences(java.util.List)
+     */
+    public void setPreferences(List preferences)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#setSkin(java.lang.String)
+     */
+    public void setSkin(String skinName)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#setState(java.lang.String)
+     */
+    public void setState(String state)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Fragment#setType(java.lang.String)
+     */
+    public void setType(String type)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.BaseElement#getId()
+     */
+    public String getId()
+    {
+        return id;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.BaseElement#getShortTitle()
+     */
+    public String getShortTitle()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.BaseElement#getTitle()
+     */
+    public String getTitle()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.BaseElement#setShortTitle(java.lang.String)
+     */
+    public void setShortTitle(String title)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.BaseElement#setTitle(java.lang.String)
+     */
+    public void setTitle(String title)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.common.SecuredResource#checkAccess(java.lang.String)
+     */
+    public void checkAccess(String actions) throws SecurityException
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.common.SecuredResource#checkConstraints(java.lang.String)
+     */
+    public void checkConstraints(String actions) throws SecurityException
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.common.SecuredResource#checkPermissions(int)
+     */
+    public void checkPermissions(int mask) throws SecurityException
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.common.SecuredResource#getConstraintsEnabled()
+     */
+    public boolean getConstraintsEnabled()
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.common.SecuredResource#getPermissionsEnabled()
+     */
+    public boolean getPermissionsEnabled()
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.common.SecuredResource#getSecurityConstraints()
+     */
+    public SecurityConstraints getSecurityConstraints()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.common.SecuredResource#newSecurityConstraint()
+     */
+    public SecurityConstraint newSecurityConstraint()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.common.SecuredResource#newSecurityConstraints()
+     */
+    public SecurityConstraints newSecurityConstraints()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.common.SecuredResource#setSecurityConstraints(org.apache.jetspeed.om.common.SecurityConstraints)
+     */
+    public void setSecurityConstraints(SecurityConstraints constraints)
+    {
+        // TODO Auto-generated method stub
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/container/state/MockContentFragment.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/container/state/MockContentFragment.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/container/state/MockContentFragment.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/container/state/MockContentPage.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/container/state/MockContentPage.java?rev=758134&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/container/state/MockContentPage.java (added)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/container/state/MockContentPage.java Wed Mar 25 03:24:47 2009
@@ -0,0 +1,485 @@
+/*
+ * 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.jetspeed.container.state;
+
+import java.util.List;
+import java.util.Locale;
+
+import org.apache.jetspeed.om.common.SecurityConstraint;
+import org.apache.jetspeed.om.common.SecurityConstraints;
+import org.apache.jetspeed.om.folder.MenuDefinition;
+import org.apache.jetspeed.om.folder.MenuExcludeDefinition;
+import org.apache.jetspeed.om.folder.MenuIncludeDefinition;
+import org.apache.jetspeed.om.folder.MenuOptionsDefinition;
+import org.apache.jetspeed.om.folder.MenuSeparatorDefinition;
+import org.apache.jetspeed.om.page.ContentFragment;
+import org.apache.jetspeed.om.page.ContentPage;
+import org.apache.jetspeed.om.page.Fragment;
+import org.apache.jetspeed.om.portlet.GenericMetadata;
+import org.apache.jetspeed.page.document.Node;
+
+/**
+ * @version $Id$
+ *
+ */
+public class MockContentPage implements ContentPage
+{
+    private static final long serialVersionUID = -7530808434879113408L;
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.ContentPage#getContentFragmentById(java.lang.String)
+     */
+    public ContentFragment getContentFragmentById(String id)
+    {
+        return new MockContentFragment(id);
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.ContentPage#getContentFragmentsByName(java.lang.String)
+     */
+    public List getContentFragmentsByName(String name)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.ContentPage#getFragmentById(java.lang.String)
+     */
+    public Fragment getFragmentById(String id)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.ContentPage#getFragmentsByName(java.lang.String)
+     */
+    public List getFragmentsByName(String name)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.ContentPage#getRootContentFragment()
+     */
+    public ContentFragment getRootContentFragment()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.ContentPage#getRootFragment()
+     */
+    public Fragment getRootFragment()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.ContentPage#setRootContentFragment(org.apache.jetspeed.om.page.ContentFragment)
+     */
+    public void setRootContentFragment(ContentFragment frag)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Page#getDefaultDecorator(java.lang.String)
+     */
+    public String getDefaultDecorator(String fragmentType)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Page#getEffectiveDefaultDecorator(java.lang.String)
+     */
+    public String getEffectiveDefaultDecorator(String fragmentType)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Page#getMenuDefinitions()
+     */
+    public List getMenuDefinitions()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Page#getSkin()
+     */
+    public String getSkin()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Page#newMenuDefinition()
+     */
+    public MenuDefinition newMenuDefinition()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Page#newMenuExcludeDefinition()
+     */
+    public MenuExcludeDefinition newMenuExcludeDefinition()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Page#newMenuIncludeDefinition()
+     */
+    public MenuIncludeDefinition newMenuIncludeDefinition()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Page#newMenuOptionsDefinition()
+     */
+    public MenuOptionsDefinition newMenuOptionsDefinition()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Page#newMenuSeparatorDefinition()
+     */
+    public MenuSeparatorDefinition newMenuSeparatorDefinition()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Page#removeFragmentById(java.lang.String)
+     */
+    public Fragment removeFragmentById(String id)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Page#setDefaultDecorator(java.lang.String, java.lang.String)
+     */
+    public void setDefaultDecorator(String decoratorName, String fragmentType)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Page#setMenuDefinitions(java.util.List)
+     */
+    public void setMenuDefinitions(List definitions)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Page#setRootFragment(org.apache.jetspeed.om.page.Fragment)
+     */
+    public void setRootFragment(Fragment fragment)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Page#setSkin(java.lang.String)
+     */
+    public void setSkin(String skinName)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Document#getVersion()
+     */
+    public String getVersion()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Document#isDirty()
+     */
+    public boolean isDirty()
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Document#setDirty(boolean)
+     */
+    public void setDirty(boolean dirty)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.Document#setVersion(java.lang.String)
+     */
+    public void setVersion(String versionNumber)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.document.Node#getMetadata()
+     */
+    public GenericMetadata getMetadata()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.document.Node#getName()
+     */
+    public String getName()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.document.Node#getParent()
+     */
+    public Node getParent()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.document.Node#getPath()
+     */
+    public String getPath()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.document.Node#getShortTitle(java.util.Locale)
+     */
+    public String getShortTitle(Locale locale)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.document.Node#getTitle(java.util.Locale)
+     */
+    public String getTitle(Locale locale)
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.document.Node#getType()
+     */
+    public String getType()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.document.Node#getUrl()
+     */
+    public String getUrl()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.document.Node#isHidden()
+     */
+    public boolean isHidden()
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.document.Node#setHidden(boolean)
+     */
+    public void setHidden(boolean hidden)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.document.Node#setParent(org.apache.jetspeed.page.document.Node)
+     */
+    public void setParent(Node parent)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.page.document.Node#setPath(java.lang.String)
+     */
+    public void setPath(String path)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.BaseElement#getId()
+     */
+    public String getId()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.BaseElement#getShortTitle()
+     */
+    public String getShortTitle()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.BaseElement#getTitle()
+     */
+    public String getTitle()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.BaseElement#setShortTitle(java.lang.String)
+     */
+    public void setShortTitle(String title)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.page.BaseElement#setTitle(java.lang.String)
+     */
+    public void setTitle(String title)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.common.SecuredResource#checkAccess(java.lang.String)
+     */
+    public void checkAccess(String actions) throws SecurityException
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.common.SecuredResource#checkConstraints(java.lang.String)
+     */
+    public void checkConstraints(String actions) throws SecurityException
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.common.SecuredResource#checkPermissions(int)
+     */
+    public void checkPermissions(int mask) throws SecurityException
+    {
+        // TODO Auto-generated method stub
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.common.SecuredResource#getConstraintsEnabled()
+     */
+    public boolean getConstraintsEnabled()
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.common.SecuredResource#getPermissionsEnabled()
+     */
+    public boolean getPermissionsEnabled()
+    {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.common.SecuredResource#getSecurityConstraints()
+     */
+    public SecurityConstraints getSecurityConstraints()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.common.SecuredResource#newSecurityConstraint()
+     */
+    public SecurityConstraint newSecurityConstraint()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.common.SecuredResource#newSecurityConstraints()
+     */
+    public SecurityConstraints newSecurityConstraints()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.om.common.SecuredResource#setSecurityConstraints(org.apache.jetspeed.om.common.SecurityConstraints)
+     */
+    public void setSecurityConstraints(SecurityConstraints constraints)
+    {
+        // TODO Auto-generated method stub
+    }
+}

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/container/state/MockContentPage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/container/state/MockContentPage.java
------------------------------------------------------------------------------
    svn:keywords = Id

Propchange: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/test/java/org/apache/jetspeed/container/state/MockContentPage.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



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


Mime
View raw message