|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cocoon.webapps.authentication.context.AuthenticationContext
This is the implementation for the authentication context
Field Summary | |
protected SessionContext |
authContext
|
protected Context |
context
|
protected UserHandler |
handler
|
protected String |
handlerName
|
protected boolean |
initialized
|
protected String |
name
|
protected SourceResolver |
resolver
|
protected List |
roles
A list of roles the user is in |
protected XPathProcessor |
xpathProcessor
|
Constructor Summary | |
AuthenticationContext(Context context,
XPathProcessor processor,
SourceResolver resolver)
Constructor |
Method Summary | |
void |
appendXML(String path,
DocumentFragment fragment)
Append a document fragment at the given path. |
Object |
getAttribute(String key)
Get the value of a context attribute. |
Object |
getAttribute(String key,
Object defaultObject)
Get the value of a context attribute. |
Map |
getContextInfo()
|
SourceParameters |
getContextInfoAsParameters()
|
String |
getName()
Get the name of the context |
NodeList |
getNodeList(String path)
NOT IMPLEMENTED - throws an exception |
Node |
getSingleNode(String path)
NOT IMPLEMENTED - throws an exception |
protected RequestState |
getState()
Return the current authentication state |
String |
getValueOfNode(String path)
NOT IMPLEMENTED - throws an exception |
DocumentFragment |
getXML(String path)
Get a document fragment. |
void |
init(Document doc)
Initialize this context |
void |
init(UserHandler handler)
Initialize the context. |
boolean |
isUserInRole(String role)
Test if the user has a role |
void |
loadApplicationXML(ApplicationConfiguration appConf,
SourceResolver resolver)
Load XML of an application |
void |
loadXML(String path,
SourceParameters parameters)
Try to load XML into the context. |
void |
removeXML(String path)
Remove some content from the context. |
void |
saveXML(String path,
SourceParameters parameters)
Try to save XML from the context. |
void |
setAttribute(String key,
Object value)
Set a context attribute. |
void |
setNode(String path,
Node node)
NOT IMPLEMENTED - throws an exception |
void |
setup(String value,
String load,
String save)
Set the name of the context. |
void |
setValueOfNode(String path,
String value)
NOT IMPLEMENTED - throws an exception |
void |
setXML(String path,
DocumentFragment fragment)
Set a document fragment at the given path. |
boolean |
streamXML(String path,
ContentHandler contentHandler,
LexicalHandler lexicalHandler)
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 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 |