org.apache.cocoon.webapps.session.components
Class DefaultMediaManager

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.cocoon.webapps.session.components.DefaultMediaManager
All Implemented Interfaces:
Configurable, Contextualizable, LogEnabled, MediaManager, ThreadSafe

public final class DefaultMediaManager
extends AbstractLogEnabled
implements MediaManager, Configurable, ThreadSafe, Contextualizable

This is the default implementation for the media manager

Version:
CVS $Id: DefaultMediaManager.java 55383 2004-10-23 15:10:46Z cziegeler $
Author:
Carsten Ziegeler

Field Summary
protected  org.apache.cocoon.webapps.session.components.PreparedMediaType[] allMediaTypes
          The media Types
protected  Context context
          The Context
protected  String defaultMediaType
          The default media type (usually this is html)
protected  String[] mediaTypeNames
          All media type names
 
Fields inherited from interface org.apache.cocoon.webapps.session.MediaManager
ROLE
 
Constructor Summary
DefaultMediaManager()
           
 
Method Summary
 void configure(Configuration myConfiguration)
           
 void contextualize(Context context)
           
 String getMediaType()
          Return the current media type
 String[] getMediaTypes()
          Get all media type names
 boolean testMedia(String value)
          Test if the media of the current request is the given value
 
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

allMediaTypes

protected org.apache.cocoon.webapps.session.components.PreparedMediaType[] allMediaTypes
The media Types


defaultMediaType

protected String defaultMediaType
The default media type (usually this is html)


mediaTypeNames

protected String[] mediaTypeNames
All media type names


context

protected Context context
The Context

Constructor Detail

DefaultMediaManager

public DefaultMediaManager()
Method Detail

contextualize

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

configure

public void configure(Configuration myConfiguration)
               throws ConfigurationException
Specified by:
configure in interface Configurable
Throws:
ConfigurationException

testMedia

public boolean testMedia(String value)
Test if the media of the current request is the given value

Specified by:
testMedia in interface MediaManager

getMediaTypes

public String[] getMediaTypes()
Description copied from interface: MediaManager
Get all media type names

Specified by:
getMediaTypes in interface MediaManager

getMediaType

public String getMediaType()
Description copied from interface: MediaManager
Return the current media type

Specified by:
getMediaType in interface MediaManager


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