org.apache.cocoon.portal.impl
Class PageLabelManager

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

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

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:
CVS $Id: PageLabelManager.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Ralph Goers

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
protected  PortalService portalService
          The portal service
static String ROLE
           
 
Constructor Summary
PageLabelManager()
           
 
Method Summary
 void configure(Configuration config)
           
 void contextualize(Context context)
           
 void dispose()
           
 String getCurrentLabel()
          Return the current page label.
protected  Map getLabelMap()
           
 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.
 boolean isLabel(String pageLabel)
           
 boolean isMarshallEvents()
          Returns true if events are not to be exposed as request parameters
 boolean isUrlPath()
          Returns whether directory structure should be used
 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


portalService

protected PortalService portalService
The portal service


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
See Also:
Constant Field Values

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)

dispose

public void dispose()
Specified by:
dispose in interface Disposable
See Also:
Disposable.dispose()

configure

public void configure(Configuration config)
Specified by:
configure in interface Configurable

contextualize

public void contextualize(Context context)
                   throws ContextException
Specified by:
contextualize in interface Contextualizable
Throws:
ContextException

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.

isUrlPath

public boolean isUrlPath()
Returns whether directory structure should be used

Returns:
A boolean specifying if directory structure should be used.

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.

getLabelMap

protected Map getLabelMap()

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.

isLabel

public boolean isLabel(String pageLabel)

isMarshallEvents

public boolean isMarshallEvents()
Returns true if events are not to be exposed as request parameters



Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.