|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.webapps.authentication.context.AuthenticationContext
public class AuthenticationContext
This is the implementation for the authentication context
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 |
---|
protected String name
protected UserHandler handler
protected SessionContext authContext
protected String handlerName
protected boolean initialized
protected Context context
protected XPathProcessor xpathProcessor
protected SourceResolver resolver
protected List roles
Constructor Detail |
---|
public AuthenticationContext(Context context, XPathProcessor processor, SourceResolver resolver)
Method Detail |
---|
public static DocumentFragment readDOM(String location, Parameters typeParameters, SourceParameters parameters, SourceResolver resolver) throws ProcessingException
location
- URI of the SourcetypeParameters
- 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.
DocumentFragment
constructed from the specified
source.
ProcessingException
public void init(UserHandler handler)
protected RequestState getState()
public void init(Document doc) throws ProcessingException
ProcessingException
public void setup(String value, String load, String save)
SessionContext
setup
in interface SessionContext
public String getName()
SessionContext
getName
in interface SessionContext
public DocumentFragment getXML(String path) throws ProcessingException
SessionContext
null
is returned.
getXML
in interface SessionContext
ProcessingException
public void setXML(String path, DocumentFragment fragment) throws ProcessingException
SessionContext
setXML
in interface SessionContext
ProcessingException
public void appendXML(String path, DocumentFragment fragment) throws ProcessingException
SessionContext
appendXML
in interface SessionContext
ProcessingException
public void removeXML(String path) throws ProcessingException
SessionContext
removeXML
in interface SessionContext
ProcessingException
public void setAttribute(String key, Object value) throws ProcessingException
SessionContext
value
is null
the attribute is
removed. If already an attribute exists with the same key, the value
is overwritten with the new one.
setAttribute
in interface SessionContext
ProcessingException
public Object getAttribute(String key) throws ProcessingException
SessionContext
null
.
getAttribute
in interface SessionContext
ProcessingException
public Object getAttribute(String key, Object defaultObject) throws ProcessingException
SessionContext
defaultObject
.
getAttribute
in interface SessionContext
ProcessingException
public Node getSingleNode(String path) throws ProcessingException
getSingleNode
in interface SessionContext
ProcessingException
public NodeList getNodeList(String path) throws ProcessingException
getNodeList
in interface SessionContext
ProcessingException
public void setNode(String path, Node node) throws ProcessingException
setNode
in interface SessionContext
ProcessingException
public String getValueOfNode(String path) throws ProcessingException
getValueOfNode
in interface SessionContext
ProcessingException
public void setValueOfNode(String path, String value) throws ProcessingException
setValueOfNode
in interface SessionContext
ProcessingException
public boolean streamXML(String path, ContentHandler contentHandler, LexicalHandler lexicalHandler) throws SAXException, ProcessingException
SessionContext
false
is
returned, otherwise true
.
streamXML
in interface SessionContext
SAXException
ProcessingException
public void loadXML(String path, SourceParameters parameters) throws SAXException, ProcessingException, IOException
SessionContext
loadXML
in interface SessionContext
SAXException
ProcessingException
IOException
public void saveXML(String path, SourceParameters parameters) throws SAXException, ProcessingException, IOException
SessionContext
saveXML
in interface SessionContext
SAXException
ProcessingException
IOException
public Map getContextInfo() throws ProcessingException
ProcessingException
public SourceParameters getContextInfoAsParameters() throws ProcessingException
ProcessingException
public void loadApplicationXML(ApplicationConfiguration appConf, SourceResolver resolver) throws ProcessingException
ProcessingException
public boolean isUserInRole(String role)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |