|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.esupportail.cas.server.util.log.Debug
org.esupportail.cas.server.util.BasicHandler
public abstract class BasicHandler
This class implements a basic handler, without any property. This abstract class is inherited by any handler.
| Field Summary | |
|---|---|
private org.dom4j.Element |
configElement
The XML element that represents the configuration of the handler in the configuration file. |
protected static int |
FAILED_CONTINUE
The value return by authenticate() when the authentication failed but the next handler should be tried. |
static int |
FAILED_STOP
The value return by authenticate() when the authentication failed and the authentication process should stop. |
static int |
SUCCEEDED
The value return by authenticate() when the authentication was successfull. |
| Constructor Summary | |
|---|---|
protected |
BasicHandler(org.dom4j.Element handlerElement,
java.lang.Boolean configDebug)
Constructor. |
| Method Summary | |
|---|---|
abstract int |
authenticate(java.lang.String username,
java.lang.String password)
Tries to Authenticate a user by accessing all the servers.. |
protected void |
checkConfigElement(boolean configElementNeeded)
Check the "config" XML element if needed. |
protected org.dom4j.Element |
getConfigElement()
Retrieve the XML element the represents the configuration of the handler in the configuration file. |
protected java.lang.String |
getConfigSubElementContent(java.lang.String elementName,
boolean needed)
Retrieve the content of a config sub-element. |
protected boolean |
hasConfigSubElement(java.lang.String elementName)
Tell if a config sub-element is present. |
| Methods inherited from class org.esupportail.cas.server.util.log.Debug |
|---|
checkClass, elementDebugValue, isDebug, setDebug, trace, trace, traceBegin, traceEnd, traceEnd, traceEnd, traceThrow |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private org.dom4j.Element configElement
protected static final int FAILED_CONTINUE
public static final int FAILED_STOP
public static final int SUCCEEDED
| Constructor Detail |
|---|
protected BasicHandler(org.dom4j.Element handlerElement,
java.lang.Boolean configDebug)
handlerElement - the XML element that declares the handler
in the configuration fileconfigDebug - debugging mode of the global configuration| Method Detail |
|---|
public abstract int authenticate(java.lang.String username,
java.lang.String password)
username - the username to authenticatepassword - the corresponding password
protected final void checkConfigElement(boolean configElementNeeded)
throws java.lang.Exception
configElementNeeded - true if a config element is needed
java.lang.Exception - Exceptionprotected final org.dom4j.Element getConfigElement()
protected final java.lang.String getConfigSubElementContent(java.lang.String elementName,
boolean needed)
throws java.lang.Exception
elementName - the name of the XML element to look forneeded - false if the element can be absent or empty, true otherwise
java.lang.Exception - Exception
protected final boolean hasConfigSubElement(java.lang.String elementName)
throws java.lang.Exception
elementName - the name of the XML element to look for
java.lang.Exception - Exception
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||