org.apache.cocoon.webapps.authentication.context
Class AuthenticationContext

java.lang.Object
  extended by org.apache.cocoon.webapps.authentication.context.AuthenticationContext
All Implemented Interfaces:
Serializable, SessionContext

Deprecated. This block is deprecated and will be removed in future versions.

public class AuthenticationContext
extends Object
implements SessionContext

This is the implementation for the authentication context

Version:
$Id: AuthenticationContext.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Carsten Ziegeler
See Also:
Serialized Form

Field Summary
protected  SessionContext authContext
          Deprecated.  
protected  Context context
          Deprecated.  
protected  UserHandler handler
          Deprecated.  
protected  String handlerName
          Deprecated.  
protected  boolean initialized
          Deprecated.  
protected  String name
          Deprecated.  
protected  SourceResolver resolver
          Deprecated.  
protected  List roles
          Deprecated. A list of roles the user is in
protected  XPathProcessor xpathProcessor
          Deprecated.  
 
Constructor Summary
AuthenticationContext(Context context, XPathProcessor processor, SourceResolver resolver)
          Deprecated. Constructor
 
Method Summary
 void appendXML(String path, DocumentFragment fragment)
          Deprecated. Append a document fragment at the given path.
 Object getAttribute(String key)
          Deprecated. Get the value of a context attribute.
 Object getAttribute(String key, Object defaultObject)
          Deprecated. Get the value of a context attribute.
 Map getContextInfo()
          Deprecated.  
 SourceParameters getContextInfoAsParameters()
          Deprecated.  
 String getName()
          Deprecated. Get the name of the context
 NodeList getNodeList(String path)
          Deprecated. NOT IMPLEMENTED - throws an exception
 Node getSingleNode(String path)
          Deprecated. NOT IMPLEMENTED - throws an exception
protected  RequestState getState()
          Deprecated. Return the current authentication state
 String getValueOfNode(String path)
          Deprecated. NOT IMPLEMENTED - throws an exception
 DocumentFragment getXML(String path)
          Deprecated. Get a document fragment.
 void init(Document doc)
          Deprecated. Initialize this context
 void init(UserHandler handler)
          Deprecated. Initialize the context.
 boolean isUserInRole(String role)
          Deprecated. Test if the user has a role
 void loadApplicationXML(ApplicationConfiguration appConf, SourceResolver resolver)
          Deprecated. Load XML of an application
 void loadXML(String path, SourceParameters parameters)
          Deprecated. Try to load XML into the context.
static DocumentFragment readDOM(String location, Parameters typeParameters, SourceParameters parameters, SourceResolver resolver)
          Deprecated. Read a DOM Fragment from a source
 void removeXML(String path)
          Deprecated. Remove some content from the context.
 void saveXML(String path, SourceParameters parameters)
          Deprecated. Try to save XML from the context.
 void setAttribute(String key, Object value)
          Deprecated. Set a context attribute.
 void setNode(String path, Node node)
          Deprecated. NOT IMPLEMENTED - throws an exception
 void setup(String value, String load, String save)
          Deprecated. Set the name of the context.
 void setValueOfNode(String path, String value)
          Deprecated. NOT IMPLEMENTED - throws an exception
 void setXML(String path, DocumentFragment fragment)
          Deprecated. Set a document fragment at the given path.
 boolean streamXML(String path, ContentHandler contentHandler, LexicalHandler lexicalHandler)
          Deprecated. Stream the XML directly to the handler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name
Deprecated. 

handler

protected UserHandler handler
Deprecated. 

authContext

protected SessionContext authContext
Deprecated. 

handlerName

protected String handlerName
Deprecated. 

initialized

protected boolean initialized
Deprecated. 

context

protected Context context
Deprecated. 

xpathProcessor

protected XPathProcessor xpathProcessor
Deprecated. 

resolver

protected SourceResolver resolver
Deprecated. 

roles

protected List roles
Deprecated. 
A list of roles the user is in

Constructor Detail

AuthenticationContext

public AuthenticationContext(Context context,
                             XPathProcessor processor,
                             SourceResolver resolver)
Deprecated. 
Constructor

Method Detail

readDOM

public static DocumentFragment readDOM(String location,
                                       Parameters typeParameters,
                                       SourceParameters parameters,
                                       SourceResolver resolver)
                                throws ProcessingException
Deprecated. 
Read a DOM Fragment from a source

Parameters:
location - URI of the Source
typeParameters - Type of Source query. Currently, only method parameter (value typically GET or POST) is recognized. May be null.
parameters - Parameters (e.g. URL params) of the source. May be null
resolver - Resolver for the source.
Returns:
DOM DocumentFragment constructed from the specified source.
Throws:
ProcessingException

init

public void init(UserHandler handler)
Deprecated. 
Initialize the context. This method has to be called right after the constructor.


getState

protected RequestState getState()
Deprecated. 
Return the current authentication state


init

public void init(Document doc)
          throws ProcessingException
Deprecated. 
Initialize this context

Throws:
ProcessingException

setup

public void setup(String value,
                  String load,
                  String save)
Deprecated. 
Description copied from interface: SessionContext
Set the name of the context. This method must be invoked in the init phase. In addition a load and a save resource can be provided.

Specified by:
setup in interface SessionContext

getName

public String getName()
Deprecated. 
Description copied from interface: SessionContext
Get the name of the context

Specified by:
getName in interface SessionContext

getXML

public DocumentFragment getXML(String path)
                        throws ProcessingException
Deprecated. 
Description copied from interface: SessionContext
Get a document fragment. If the node specified by the path exist, its content is returned as a DocumentFragment. If the node does not exists, null is returned.

Specified by:
getXML in interface SessionContext
Throws:
ProcessingException

setXML

public void setXML(String path,
                   DocumentFragment fragment)
            throws ProcessingException
Deprecated. 
Description copied from interface: SessionContext
Set a document fragment at the given path. The implementation of this method is context specific. Usually all children of the node specified by the path are removed and the children of the fragment are inserted as new children. If the path is not existent it is created.

Specified by:
setXML in interface SessionContext
Throws:
ProcessingException

appendXML

public void appendXML(String path,
                      DocumentFragment fragment)
               throws ProcessingException
Deprecated. 
Description copied from interface: SessionContext
Append a document fragment at the given path. The implementation of this method is context specific. Usually the children of the fragment are appended as new children of the node specified by the path. If the path is not existent it is created and this method should work in the same way as setXML.

Specified by:
appendXML in interface SessionContext
Throws:
ProcessingException

removeXML

public void removeXML(String path)
               throws ProcessingException
Deprecated. 
Description copied from interface: SessionContext
Remove some content from the context. The implementation of this method is context specific. Usually this method should remove all children of the node specified by the path.

Specified by:
removeXML in interface SessionContext
Throws:
ProcessingException

setAttribute

public void setAttribute(String key,
                         Object value)
                  throws ProcessingException
Deprecated. 
Description copied from interface: SessionContext
Set a context attribute. Attributes over a means to store any data (object) in a session context. If value is null the attribute is removed. If already an attribute exists with the same key, the value is overwritten with the new one.

Specified by:
setAttribute in interface SessionContext
Throws:
ProcessingException

getAttribute

public Object getAttribute(String key)
                    throws ProcessingException
Deprecated. 
Description copied from interface: SessionContext
Get the value of a context attribute. If the attribute is not available return null.

Specified by:
getAttribute in interface SessionContext
Throws:
ProcessingException

getAttribute

public Object getAttribute(String key,
                           Object defaultObject)
                    throws ProcessingException
Deprecated. 
Description copied from interface: SessionContext
Get the value of a context attribute. If the attribute is not available the return the defaultObject.

Specified by:
getAttribute in interface SessionContext
Throws:
ProcessingException

getSingleNode

public Node getSingleNode(String path)
                   throws ProcessingException
Deprecated. 
NOT IMPLEMENTED - throws an exception

Specified by:
getSingleNode in interface SessionContext
Throws:
ProcessingException

getNodeList

public NodeList getNodeList(String path)
                     throws ProcessingException
Deprecated. 
NOT IMPLEMENTED - throws an exception

Specified by:
getNodeList in interface SessionContext
Throws:
ProcessingException

setNode

public void setNode(String path,
                    Node node)
             throws ProcessingException
Deprecated. 
NOT IMPLEMENTED - throws an exception

Specified by:
setNode in interface SessionContext
Throws:
ProcessingException

getValueOfNode

public String getValueOfNode(String path)
                      throws ProcessingException
Deprecated. 
NOT IMPLEMENTED - throws an exception

Specified by:
getValueOfNode in interface SessionContext
Throws:
ProcessingException

setValueOfNode

public void setValueOfNode(String path,
                           String value)
                    throws ProcessingException
Deprecated. 
NOT IMPLEMENTED - throws an exception

Specified by:
setValueOfNode in interface SessionContext
Throws:
ProcessingException

streamXML

public boolean streamXML(String path,
                         ContentHandler contentHandler,
                         LexicalHandler lexicalHandler)
                  throws SAXException,
                         ProcessingException
Deprecated. 
Description copied from interface: SessionContext
Stream the XML directly to the handler. This streams the contents of getXML() to the given handler without creating a DocumentFragment containing a copy of the data. If no data is available (if the path does not exist) false is returned, otherwise true.

Specified by:
streamXML in interface SessionContext
Throws:
SAXException
ProcessingException

loadXML

public void loadXML(String path,
                    SourceParameters parameters)
             throws SAXException,
                    ProcessingException,
                    IOException
Deprecated. 
Description copied from interface: SessionContext
Try to load XML into the context. If the context does not provide the ability of loading, an exception is thrown.

Specified by:
loadXML in interface SessionContext
Throws:
SAXException
ProcessingException
IOException

saveXML

public void saveXML(String path,
                    SourceParameters parameters)
             throws SAXException,
                    ProcessingException,
                    IOException
Deprecated. 
Description copied from interface: SessionContext
Try to save XML from the context. If the context does not provide the ability of saving, an exception is thrown.

Specified by:
saveXML in interface SessionContext
Throws:
SAXException
ProcessingException
IOException

getContextInfo

public Map getContextInfo()
                   throws ProcessingException
Deprecated. 
Throws:
ProcessingException

getContextInfoAsParameters

public SourceParameters getContextInfoAsParameters()
                                            throws ProcessingException
Deprecated. 
Throws:
ProcessingException

loadApplicationXML

public void loadApplicationXML(ApplicationConfiguration appConf,
                               SourceResolver resolver)
                        throws ProcessingException
Deprecated. 
Load XML of an application

Throws:
ProcessingException

isUserInRole

public boolean isUserInRole(String role)
Deprecated. 
Test if the user has a role

Since:
2.1.6


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