org.apache.jetspeed.profiler.impl
Class ProfilerValveImpl

java.lang.Object
  extended by org.apache.jetspeed.pipeline.valve.AbstractValve
      extended by org.apache.jetspeed.profiler.impl.ProfilerValveImpl
All Implemented Interfaces:
PageProfilerValve, org.apache.jetspeed.pipeline.valve.Valve
Direct Known Subclasses:
CreateUserTemplatePagesValveImpl

public class ProfilerValveImpl
extends AbstractValve
implements PageProfilerValve

ProfilerValveImpl

Version:
$Id: ProfilerValveImpl.java 569464 2007-08-24 17:43:28Z taylor $
Author:
David Sean Taylor

Field Summary
protected  org.apache.commons.logging.Log log
           
private static String PAGE_ACTION_ACCESS_MAP_SESSION_ATTR_KEY
          session key for storing map of PageActionAccess instances
static String PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY
          PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY - request portal site context attribute key
static String PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY
          PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY - session portal site context attribute key
private  org.apache.jetspeed.portalsite.PortalSite portalSite
          portalSite - portal site component
static String PROFILED_PAGE_CONTEXT_ATTR_KEY
          PROFILED_PAGE_CONTEXT_ATTR_KEY - legacy request portal site context attribute key
private  org.apache.jetspeed.profiler.Profiler profiler
          profiler - profiler component
private  boolean requestFallback
          requestFallback - flag indicating whether request should fallback to root folder if locators do not select a page or access is forbidden
private  boolean useHistory
          useHistory - flag indicating whether to use visited page history to select default page per site folder
 
Fields inherited from interface org.apache.jetspeed.pipeline.valve.PageProfilerValve
PROFILE_LOCATOR_REQUEST_ATTR_KEY, PROFILE_LOCATORS_PER_PRINCIPAL
 
Constructor Summary
ProfilerValveImpl(org.apache.jetspeed.profiler.Profiler profiler, org.apache.jetspeed.portalsite.PortalSite portalSite)
          ProfilerValveImpl - constructor
ProfilerValveImpl(org.apache.jetspeed.profiler.Profiler profiler, org.apache.jetspeed.portalsite.PortalSite portalSite, boolean requestFallback)
          ProfilerValveImpl - constructor
ProfilerValveImpl(org.apache.jetspeed.profiler.Profiler profiler, org.apache.jetspeed.portalsite.PortalSite portalSite, boolean requestFallback, boolean useHistory)
          ProfilerValveImpl - constructor
 
Method Summary
protected  PageActionAccess getPageActionAccess(org.apache.jetspeed.request.RequestContext requestContext)
          Returns the PageActionAccess for the current user request.
protected  boolean hasPipelineChanged(String requestPipeline, String sessionPipeline)
           
 void invoke(org.apache.jetspeed.request.RequestContext request, org.apache.jetspeed.pipeline.valve.ValveContext context)
           
 String toString()
           
 
Methods inherited from class org.apache.jetspeed.pipeline.valve.AbstractValve
initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.jetspeed.pipeline.valve.Valve
initialize
 

Field Detail

log

protected org.apache.commons.logging.Log log

PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY

public static final String PORTAL_SITE_SESSION_CONTEXT_ATTR_KEY
PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY - session portal site context attribute key

See Also:
Constant Field Values

PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY

public static final String PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY
PORTAL_SITE_REQUEST_CONTEXT_ATTR_KEY - request portal site context attribute key

See Also:
Constant Field Values

PROFILED_PAGE_CONTEXT_ATTR_KEY

public static final String PROFILED_PAGE_CONTEXT_ATTR_KEY
PROFILED_PAGE_CONTEXT_ATTR_KEY - legacy request portal site context attribute key

See Also:
Constant Field Values

PAGE_ACTION_ACCESS_MAP_SESSION_ATTR_KEY

private static final String PAGE_ACTION_ACCESS_MAP_SESSION_ATTR_KEY
session key for storing map of PageActionAccess instances

See Also:
Constant Field Values

profiler

private org.apache.jetspeed.profiler.Profiler profiler
profiler - profiler component


portalSite

private org.apache.jetspeed.portalsite.PortalSite portalSite
portalSite - portal site component


requestFallback

private boolean requestFallback
requestFallback - flag indicating whether request should fallback to root folder if locators do not select a page or access is forbidden


useHistory

private boolean useHistory
useHistory - flag indicating whether to use visited page history to select default page per site folder

Constructor Detail

ProfilerValveImpl

public ProfilerValveImpl(org.apache.jetspeed.profiler.Profiler profiler,
                         org.apache.jetspeed.portalsite.PortalSite portalSite,
                         boolean requestFallback,
                         boolean useHistory)
ProfilerValveImpl - constructor

Parameters:
profiler - profiler component reference
portalSite - portal site component reference
requestFallback - flag to enable root folder fallback
useHistory - flag to enable selection of last visited folder page

ProfilerValveImpl

public ProfilerValveImpl(org.apache.jetspeed.profiler.Profiler profiler,
                         org.apache.jetspeed.portalsite.PortalSite portalSite,
                         boolean requestFallback)
ProfilerValveImpl - constructor

Parameters:
profiler - profiler component reference
portalSite - portal site component reference
requestFallback - flag to enable root folder fallback

ProfilerValveImpl

public ProfilerValveImpl(org.apache.jetspeed.profiler.Profiler profiler,
                         org.apache.jetspeed.portalsite.PortalSite portalSite)
ProfilerValveImpl - constructor

Parameters:
profiler - profiler component reference
portalSite - portal site component reference
Method Detail

invoke

public void invoke(org.apache.jetspeed.request.RequestContext request,
                   org.apache.jetspeed.pipeline.valve.ValveContext context)
            throws org.apache.jetspeed.pipeline.PipelineException
Specified by:
invoke in interface org.apache.jetspeed.pipeline.valve.Valve
Specified by:
invoke in class AbstractValve
Throws:
org.apache.jetspeed.pipeline.PipelineException

hasPipelineChanged

protected boolean hasPipelineChanged(String requestPipeline,
                                     String sessionPipeline)

getPageActionAccess

protected PageActionAccess getPageActionAccess(org.apache.jetspeed.request.RequestContext requestContext)
Returns the PageActionAccess for the current user request.

Parameters:
requestContext - RequestContext of the current portal request.
Returns:
PageActionAccess for the current user request.
See Also:
PageActionAccess

toString

public String toString()
Overrides:
toString in class Object


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.