org.apache.cocoon.profiler.debugging
Class RemoteDebuggingSitemapExecutor

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.cocoon.profiler.debugging.RemoteDebuggingSitemapExecutor
All Implemented Interfaces:
Contextualizable, LogEnabled, Serviceable, SitemapExecutor, ThreadSafe

public class RemoteDebuggingSitemapExecutor
extends AbstractLogEnabled
implements ThreadSafe, SitemapExecutor, Serviceable, Contextualizable

Sample sitemap executor that prints out everything to a logger

Since:
2.2
Version:
$Id: RemoteDebuggingSitemapExecutor.java 240034 2005-08-25 10:04:05Z cziegeler $

Nested Class Summary
 
Nested classes inherited from class org.apache.cocoon.sitemap.SitemapExecutor
SitemapExecutor.PipelineComponentDescription
 
Field Summary
protected  Context context
           
protected  ServiceManager manager
           
 
Fields inherited from interface org.apache.cocoon.sitemap.SitemapExecutor
ROLE
 
Constructor Summary
RemoteDebuggingSitemapExecutor()
           
 
Method Summary
 SitemapExecutor.PipelineComponentDescription addGenerator(ExecutionContext context, Map objectModel, SitemapExecutor.PipelineComponentDescription desc)
          Add a generator
 SitemapExecutor.PipelineComponentDescription addReader(ExecutionContext context, Map objectModel, SitemapExecutor.PipelineComponentDescription desc)
          Add a reader
 SitemapExecutor.PipelineComponentDescription addSerializer(ExecutionContext context, Map objectModel, SitemapExecutor.PipelineComponentDescription desc)
          Add a serializer
 SitemapExecutor.PipelineComponentDescription addTransformer(ExecutionContext context, Map objectModel, SitemapExecutor.PipelineComponentDescription desc)
          Add a transformer
 void contextualize(Context context)
           
 SitemapExecutor.PipelineComponentDescription enteringPipeline(ExecutionContext context, Map objectModel, SitemapExecutor.PipelineComponentDescription desc)
          This informs the executor about a new pipeline section.
 void enterSitemap(ExecutionContext context, Map objectModel, String source)
          Enter a new sitemap
 Map invokeAction(ExecutionContext context, Map objectModel, Action action, Redirector redirector, SourceResolver resolver, String resolvedSource, Parameters resolvedParams)
          Invoke an action and return the result.
 Map invokeMatcher(ExecutionContext context, Map objectModel, Matcher matcher, String pattern, Parameters resolvedParams)
          Invoke a match and return the result
 Map invokePreparableMatcher(ExecutionContext context, Map objectModel, PreparableMatcher matcher, String pattern, Object preparedPattern, Parameters resolvedParams)
          Invoke a match and return the result
 boolean invokeSelector(ExecutionContext context, Map objectModel, Selector selector, String expression, Parameters parameters)
          Invoke a selector
 boolean invokeSwitchSelector(ExecutionContext context, Map objectModel, SwitchSelector selector, String expression, Parameters parameters, Object selectorContext)
          Invoke a switch selector
 void leaveSitemap(ExecutionContext context, Map objectModel)
          Leaves a sitemap.
protected  void notifyPipelineProcessed(ExecutionContext context, Map objectModel)
           
 void popVariables(ExecutionContext context, Map objectModel)
          Pop a map of information from the context stack.
 Map pushVariables(ExecutionContext context, Map objectModel, String key, Map variables)
          Push map of information on the context stack.
 String redirectTo(ExecutionContext context, Map objectModel, String uri, boolean createSession, boolean global, boolean permanent)
          Informs about a redirect.
 void service(ServiceManager manager)
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

manager

protected ServiceManager manager

context

protected Context context
Constructor Detail

RemoteDebuggingSitemapExecutor

public RemoteDebuggingSitemapExecutor()
Method Detail

contextualize

public void contextualize(Context context)
                   throws ContextException
Specified by:
contextualize in interface Contextualizable
Throws:
ContextException
See Also:
Contextualizable.contextualize(org.apache.avalon.framework.context.Context)

service

public void service(ServiceManager manager)
             throws ServiceException
Specified by:
service in interface Serviceable
Throws:
ServiceException
See Also:
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)

invokeAction

public Map invokeAction(ExecutionContext context,
                        Map objectModel,
                        Action action,
                        Redirector redirector,
                        SourceResolver resolver,
                        String resolvedSource,
                        Parameters resolvedParams)
                 throws Exception
Description copied from interface: SitemapExecutor
Invoke an action and return the result.

Specified by:
invokeAction in interface SitemapExecutor
Throws:
Exception
See Also:
SitemapExecutor.invokeAction(org.apache.cocoon.sitemap.ExecutionContext, java.util.Map, org.apache.cocoon.acting.Action, org.apache.cocoon.environment.Redirector, org.apache.cocoon.environment.SourceResolver, java.lang.String, org.apache.avalon.framework.parameters.Parameters)

invokeMatcher

public Map invokeMatcher(ExecutionContext context,
                         Map objectModel,
                         Matcher matcher,
                         String pattern,
                         Parameters resolvedParams)
                  throws PatternException
Description copied from interface: SitemapExecutor
Invoke a match and return the result

Specified by:
invokeMatcher in interface SitemapExecutor
Throws:
PatternException
See Also:
SitemapExecutor.invokeMatcher(org.apache.cocoon.sitemap.ExecutionContext, java.util.Map, org.apache.cocoon.matching.Matcher, java.lang.String, org.apache.avalon.framework.parameters.Parameters)

invokePreparableMatcher

public Map invokePreparableMatcher(ExecutionContext context,
                                   Map objectModel,
                                   PreparableMatcher matcher,
                                   String pattern,
                                   Object preparedPattern,
                                   Parameters resolvedParams)
                            throws PatternException
Description copied from interface: SitemapExecutor
Invoke a match and return the result

Specified by:
invokePreparableMatcher in interface SitemapExecutor
Throws:
PatternException
See Also:
SitemapExecutor.invokePreparableMatcher(org.apache.cocoon.sitemap.ExecutionContext, java.util.Map, org.apache.cocoon.matching.PreparableMatcher, java.lang.String, java.lang.Object, org.apache.avalon.framework.parameters.Parameters)

invokeSelector

public boolean invokeSelector(ExecutionContext context,
                              Map objectModel,
                              Selector selector,
                              String expression,
                              Parameters parameters)
Description copied from interface: SitemapExecutor
Invoke a selector

Specified by:
invokeSelector in interface SitemapExecutor
Parameters:
context -
objectModel -
selector -
expression -
parameters -
Returns:
See Also:
SitemapExecutor.invokeSelector(org.apache.cocoon.sitemap.ExecutionContext, java.util.Map, org.apache.cocoon.selection.Selector, java.lang.String, org.apache.avalon.framework.parameters.Parameters)

invokeSwitchSelector

public boolean invokeSwitchSelector(ExecutionContext context,
                                    Map objectModel,
                                    SwitchSelector selector,
                                    String expression,
                                    Parameters parameters,
                                    Object selectorContext)
Description copied from interface: SitemapExecutor
Invoke a switch selector

Specified by:
invokeSwitchSelector in interface SitemapExecutor
Parameters:
context -
objectModel -
selector -
expression -
parameters -
selectorContext - The context object for the switch selector
Returns:
See Also:
SitemapExecutor.invokeSwitchSelector(org.apache.cocoon.sitemap.ExecutionContext, java.util.Map, org.apache.cocoon.selection.SwitchSelector, java.lang.String, org.apache.avalon.framework.parameters.Parameters, java.lang.Object)

popVariables

public void popVariables(ExecutionContext context,
                         Map objectModel)
Description copied from interface: SitemapExecutor
Pop a map of information from the context stack.

Specified by:
popVariables in interface SitemapExecutor
Parameters:
context - The execution context
objectModel - The object model
See Also:
SitemapExecutor.popVariables(org.apache.cocoon.sitemap.ExecutionContext, java.util.Map)

pushVariables

public Map pushVariables(ExecutionContext context,
                         Map objectModel,
                         String key,
                         Map variables)
Description copied from interface: SitemapExecutor
Push map of information on the context stack.

Specified by:
pushVariables in interface SitemapExecutor
Parameters:
context - The execution context
objectModel - The object model
key - A key that can be used to identify this map (can be null)
variables - The variables as key/value pairs
Returns:
The variables that are used in the sitemap. The executor can modify the set of available variables by returning a different map.
See Also:
SitemapExecutor.pushVariables(org.apache.cocoon.sitemap.ExecutionContext, java.util.Map, java.lang.String, java.util.Map)

enterSitemap

public void enterSitemap(ExecutionContext context,
                         Map objectModel,
                         String source)
Description copied from interface: SitemapExecutor
Enter a new sitemap

Specified by:
enterSitemap in interface SitemapExecutor
Parameters:
context - The execution context
objectModel - The object model
source - The uri of the sitemap
See Also:
SitemapExecutor.enterSitemap(org.apache.cocoon.sitemap.ExecutionContext, java.util.Map, java.lang.String)

leaveSitemap

public void leaveSitemap(ExecutionContext context,
                         Map objectModel)
Description copied from interface: SitemapExecutor
Leaves a sitemap.

Specified by:
leaveSitemap in interface SitemapExecutor
See Also:
SitemapExecutor.leaveSitemap(org.apache.cocoon.sitemap.ExecutionContext, java.util.Map)

addGenerator

public SitemapExecutor.PipelineComponentDescription addGenerator(ExecutionContext context,
                                                                 Map objectModel,
                                                                 SitemapExecutor.PipelineComponentDescription desc)
Description copied from interface: SitemapExecutor
Add a generator

Specified by:
addGenerator in interface SitemapExecutor
Parameters:
context -
objectModel -
desc - The descrption of the component
Returns:
The desc of the component to use
See Also:
SitemapExecutor.addGenerator(org.apache.cocoon.sitemap.ExecutionContext, java.util.Map, org.apache.cocoon.sitemap.SitemapExecutor.PipelineComponentDescription)

addReader

public SitemapExecutor.PipelineComponentDescription addReader(ExecutionContext context,
                                                              Map objectModel,
                                                              SitemapExecutor.PipelineComponentDescription desc)
Description copied from interface: SitemapExecutor
Add a reader

Specified by:
addReader in interface SitemapExecutor
Parameters:
context -
objectModel -
desc - The descrption of the component
Returns:
The desc of the component to use
See Also:
SitemapExecutor.addReader(org.apache.cocoon.sitemap.ExecutionContext, java.util.Map, org.apache.cocoon.sitemap.SitemapExecutor.PipelineComponentDescription)

addSerializer

public SitemapExecutor.PipelineComponentDescription addSerializer(ExecutionContext context,
                                                                  Map objectModel,
                                                                  SitemapExecutor.PipelineComponentDescription desc)
Description copied from interface: SitemapExecutor
Add a serializer

Specified by:
addSerializer in interface SitemapExecutor
Parameters:
context -
objectModel -
desc - The descrption of the component
Returns:
The desc of the component to use
See Also:
SitemapExecutor.addSerializer(org.apache.cocoon.sitemap.ExecutionContext, java.util.Map, org.apache.cocoon.sitemap.SitemapExecutor.PipelineComponentDescription)

addTransformer

public SitemapExecutor.PipelineComponentDescription addTransformer(ExecutionContext context,
                                                                   Map objectModel,
                                                                   SitemapExecutor.PipelineComponentDescription desc)
Description copied from interface: SitemapExecutor
Add a transformer

Specified by:
addTransformer in interface SitemapExecutor
Parameters:
context -
objectModel -
desc - The descrption of the component
Returns:
The desc of the component to use
See Also:
SitemapExecutor.addTransformer(org.apache.cocoon.sitemap.ExecutionContext, java.util.Map, org.apache.cocoon.sitemap.SitemapExecutor.PipelineComponentDescription)

redirectTo

public String redirectTo(ExecutionContext context,
                         Map objectModel,
                         String uri,
                         boolean createSession,
                         boolean global,
                         boolean permanent)
Description copied from interface: SitemapExecutor
Informs about a redirect.

Specified by:
redirectTo in interface SitemapExecutor
Returns:
The uri to redirect to.
See Also:
SitemapExecutor.redirectTo(org.apache.cocoon.sitemap.ExecutionContext, java.util.Map, java.lang.String, boolean, boolean, boolean)

enteringPipeline

public SitemapExecutor.PipelineComponentDescription enteringPipeline(ExecutionContext context,
                                                                     Map objectModel,
                                                                     SitemapExecutor.PipelineComponentDescription desc)
Description copied from interface: SitemapExecutor
This informs the executor about a new pipeline section.

Specified by:
enteringPipeline in interface SitemapExecutor
Parameters:
context -
objectModel -
desc -
Returns:
See Also:
SitemapExecutor.enteringPipeline(org.apache.cocoon.sitemap.ExecutionContext, java.util.Map, org.apache.cocoon.sitemap.SitemapExecutor.PipelineComponentDescription)

notifyPipelineProcessed

protected void notifyPipelineProcessed(ExecutionContext context,
                                       Map objectModel)


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.