org.apache.cocoon.components.deli
Class DeliImpl

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.components.deli.DeliImpl
All Implemented Interfaces:
Disposable, Initializable, Component, Contextualizable, LogEnabled, Parameterizable, Serviceable, ThreadSafe, Deli

public final class DeliImpl
extends AbstractLogEnabled
implements Parameterizable, Deli, Serviceable, Disposable, Initializable, ThreadSafe, 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 $Id: DeliImpl.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Mark H. Butler

Nested Class Summary
static class DeliImpl.CocoonServletContext
          Stub implementation of Servlet Context
static class DeliImpl.CocoonServletRequest
          Stub implementation of HttpServletRequest
 
Field Summary
protected  ServiceManager manager
          The service manager
protected  DOMParser 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 contextualize(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.
 Document getUACapabilities(com.hp.hpl.deli.Profile theProfile)
          Convert a profile stored as a vector of profile attributes to a DOM tree.
 Document getUACapabilities(Request theRequest)
          Convert a profile stored as a vector of profile attributes to a DOM tree.
 void initialize()
          Initialize
 void parameterize(Parameters params)
          Configure this class
 void service(ServiceManager manager)
          Service this class
 
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
The service manager


parser

protected DOMParser 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(Context context)
                   throws ContextException
Contextualize this class

Specified by:
contextualize in interface Contextualizable
Throws:
ContextException

service

public void service(ServiceManager manager)
             throws ServiceException
Service this class

Specified by:
service in interface Serviceable
Throws:
ServiceException

parameterize

public void parameterize(Parameters params)
Configure this class

Specified by:
parameterize in interface Parameterizable

initialize

public void initialize()
                throws Exception
Initialize

Specified by:
initialize in interface Initializable
Throws:
Exception

dispose

public void dispose()
Dispose of this class

Specified by:
dispose in interface Disposable

getProfile

public com.hp.hpl.deli.Profile getProfile(Request theRequest)
                                   throws IOException,
                                          ServletException,
                                          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.

Specified by:
getProfile in interface Deli
Parameters:
theRequest - The Request.
Returns:
The profile as a vector of profile attributes.
Throws:
IOException
ServletException
Exception

getUACapabilities

public Document getUACapabilities(com.hp.hpl.deli.Profile theProfile)
                           throws 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.
Throws:
Exception

getUACapabilities

public Document getUACapabilities(Request theRequest)
                           throws IOException,
                                  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.
Throws:
IOException
Exception


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