org.apache.cocoon.portal.impl
Class PageLabelManager

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.cocoon.portal.impl.PageLabelManager
All Implemented Interfaces:
Configurable, Contextualizable, LogEnabled, Serviceable, ThreadSafe

public class PageLabelManager
extends AbstractLogEnabled
implements ThreadSafe, Serviceable, Configurable, Contextualizable

Manages the various activities required for page labels. The name of the request parameter used to identify the page labelmay be configured here by declaring
request-parm-name
in the configuration for this component. The default request parameter name is 'pageLabel'.

Version:
$Id: PageLabelManager.java 328461 2005-10-25 19:44:00Z cziegeler $

Field Summary
protected  String aspectName
           
protected  Context context
          The cocoon context
protected static String EVENT_MAP
           
protected static String LABEL_ARRAY
           
protected static String LABEL_MAP
           
protected  ServiceManager manager
          The service manager
static String ROLE
           
 
Constructor Summary
PageLabelManager()
           
 
Method Summary
 void configure(Configuration config)
           
 void contextualize(Context context)
           
 String getCurrentLabel()
          Return the current page label.
 Map getPageEventMap()
          Return the Map that contains events for all the page labels.
 List getPageLabelEvents(String pageLabel)
          Retrieve the events associated with the specified page label.
 String getPreviousLabel()
          Return the page label from the previous request.
 String getRequestParameterName()
          Returns the request parameter being used to identify the page label.
 void service(ServiceManager manager)
           
 String setCurrentLabel()
          Sets the current page label.
 
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

ROLE

public static final String ROLE

manager

protected ServiceManager manager
The service manager


context

protected Context context
The cocoon context


aspectName

protected String aspectName

LABEL_ARRAY

protected static final String LABEL_ARRAY

LABEL_MAP

protected static final String LABEL_MAP

EVENT_MAP

protected static final String EVENT_MAP
Constructor Detail

PageLabelManager

public PageLabelManager()
Method Detail

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)

configure

public void configure(Configuration config)
Specified by:
configure in interface Configurable
See Also:
Configurable.configure(org.apache.avalon.framework.configuration.Configuration)

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)

getCurrentLabel

public String getCurrentLabel()
Return the current page label.

Returns:
The current page label.

getPreviousLabel

public String getPreviousLabel()
Return the page label from the previous request.

Returns:
The previous page label.

setCurrentLabel

public String setCurrentLabel()
Sets the current page label.

Returns:
The current page label.

getRequestParameterName

public String getRequestParameterName()
Returns the request parameter being used to identify the page label.

Returns:
A String containing the request parameter name used for page labels.

getPageEventMap

public Map getPageEventMap()
Return the Map that contains events for all the page labels.

Returns:
The Map to use for converting events to and from urls.

getPageLabelEvents

public List getPageLabelEvents(String pageLabel)
Retrieve the events associated with the specified page label.

Parameters:
pageLabel - The label to retrieve the events for.
Returns:
A List containing all the events associated with the page label in the order they should occur.


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