org.apache.cocoon.components.deli
Class DeliImpl

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLoggable
        |
        +--org.apache.cocoon.components.deli.DeliImpl
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.context.Contextualizable, Deli, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.logger.Loggable, org.apache.avalon.framework.parameters.Parameterizable, org.apache.avalon.framework.thread.ThreadSafe

public final class DeliImpl
extends org.apache.avalon.framework.logger.AbstractLoggable
implements org.apache.avalon.framework.parameters.Parameterizable, Deli, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.thread.ThreadSafe, org.apache.avalon.framework.context.Contextualizable

Allows the use of DELI to provide CC/PP or UAProf support. For more details of DELI see the Technical Report DELI: A Delivery Context Library for CC/PP and UAProf.

Version:
CVS $ $ $Date: 2002/02/22 07:00:07 $
Author:
Mark H. Butler

Nested Class Summary
 class DeliImpl.CocoonServletContext
          Stub implementation of Servlet Context
 class DeliImpl.CocoonServletRequest
          Stub implementation of HttpServletRequest
 
Field Summary
protected  org.apache.avalon.framework.component.ComponentManager manager
          The component manager
protected  org.apache.avalon.excalibur.xml.Parser parser
          Parser used to construct the DOM tree to import the profile to a stylesheet
protected  DeliImpl.CocoonServletContext servletContext
          A context, used to retrieve the path to the configuration file
 
Fields inherited from interface org.apache.cocoon.components.deli.Deli
ROLE
 
Constructor Summary
DeliImpl()
           
 
Method Summary
 void compose(org.apache.avalon.framework.component.ComponentManager manager)
          Compose this class
 void contextualize(org.apache.avalon.framework.context.Context context)
          Contextualize this class
 void dispose()
          Dispose of this class
 com.hp.hpl.deli.Profile getProfile(Request theRequest)
          Process a HttpServletRequest and either extract CC/PP or UAProf information from it and use this information to resolve a profile or examine the user agent string, match this using the DELI legacy device database, and use this information to retrieve the appropriate CC/PP profile.
 org.w3c.dom.Document getUACapabilities(com.hp.hpl.deli.Profile theProfile)
          Convert a profile stored as a vector of profile attributes to a DOM tree.
 org.w3c.dom.Document getUACapabilities(Request theRequest)
          Convert a profile stored as a vector of profile attributes to a DOM tree.
 void initialize()
          Initialize
 void parameterize(org.apache.avalon.framework.parameters.Parameters params)
          Configure this class
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable
getLogger, setLogger, 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 org.apache.avalon.framework.component.ComponentManager manager
The component manager


parser

protected org.apache.avalon.excalibur.xml.Parser parser
Parser used to construct the DOM tree to import the profile to a stylesheet


servletContext

protected DeliImpl.CocoonServletContext servletContext
A context, used to retrieve the path to the configuration file

Constructor Detail

DeliImpl

public DeliImpl()
Method Detail

contextualize

public void contextualize(org.apache.avalon.framework.context.Context context)
                   throws org.apache.avalon.framework.context.ContextException
Contextualize this class

Specified by:
contextualize in interface org.apache.avalon.framework.context.Contextualizable
org.apache.avalon.framework.context.ContextException

compose

public void compose(org.apache.avalon.framework.component.ComponentManager manager)
             throws org.apache.avalon.framework.component.ComponentException
Compose this class

Specified by:
compose in interface org.apache.avalon.framework.component.Composable
org.apache.avalon.framework.component.ComponentException

parameterize

public void parameterize(org.apache.avalon.framework.parameters.Parameters params)
Configure this class

Specified by:
parameterize in interface org.apache.avalon.framework.parameters.Parameterizable

initialize

public void initialize()
                throws java.lang.Exception
Initialize

Specified by:
initialize in interface org.apache.avalon.framework.activity.Initializable
java.lang.Exception

dispose

public void dispose()
Dispose of this class

Specified by:
dispose in interface org.apache.avalon.framework.activity.Disposable

getProfile

public com.hp.hpl.deli.Profile getProfile(Request theRequest)
                                   throws java.io.IOException,
                                          javax.servlet.ServletException,
                                          java.lang.Exception
Process a HttpServletRequest and either extract CC/PP or UAProf information from it and use this information to resolve a profile or examine the user agent string, match this using the DELI legacy device database, and use this information to retrieve the appropriate CC/PP profile.

Parameters:
theRequest - The Request.
Returns:
The profile as a vector of profile attributes.
Throws:
IOException.
ServletException.
Exception.
java.io.IOException
javax.servlet.ServletException
java.lang.Exception

getUACapabilities

public org.w3c.dom.Document getUACapabilities(com.hp.hpl.deli.Profile theProfile)
                                       throws java.lang.Exception
Convert a profile stored as a vector of profile attributes to a DOM tree.

Parameters:
theProfile - The profile as a vector of profile attributes.
Returns:
The DOM tree.
java.lang.Exception

getUACapabilities

public org.w3c.dom.Document getUACapabilities(Request theRequest)
                                       throws java.io.IOException,
                                              java.lang.Exception
Description copied from interface: Deli
Convert a profile stored as a vector of profile attributes to a DOM tree.

Specified by:
getUACapabilities in interface Deli
Parameters:
theRequest - The Request.
Returns:
The DOM tree.
java.io.IOException
java.lang.Exception


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