net.sourceforge.heracles.api
Class HeraclesImpl

java.lang.Object
  extended by net.sourceforge.heracles.api.Heracles
      extended by net.sourceforge.heracles.api.HeraclesImpl

public class HeraclesImpl
extends Heracles

Title: HeraclesImpl.java
Description: This Class realises the heracles api
Java Version: JDK 1.5

Author:
Philipp Gantert version 1.0

Field Summary
private  Authentication auth
           
private  org.apache.log4j.Logger logger
           
private  Search search
           
 
Constructor Summary
HeraclesImpl()
          Contructor of the API implementation
 
Method Summary
 LdapUser authAdvanced(java.lang.String username, java.lang.String password)
          This method takes the usersername and the password as Strings and does the authentication.
 void authSimple(java.lang.String username, java.lang.String password)
          This method takes the usersername and the password as Strings and does the authentication.
 java.util.List<LdapUser> searchInLdap(java.lang.String domainName, java.lang.String where, java.lang.String like)
          This method could be used to search in the ldap for something, the result will be come as a List.
 void setAuth(Authentication auth)
          This method is for spring to set a Authentication object.
 void setSearch(Search search)
          This method is for spring to set a Search object
 
Methods inherited from class net.sourceforge.heracles.api.Heracles
getHeracles
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private org.apache.log4j.Logger logger

auth

private Authentication auth

search

private Search search
Constructor Detail

HeraclesImpl

public HeraclesImpl()
Contructor of the API implementation

Method Detail

setAuth

public void setAuth(Authentication auth)
This method is for spring to set a Authentication object.

Parameters:
auth -

setSearch

public void setSearch(Search search)
This method is for spring to set a Search object

Parameters:
search -

authAdvanced

public LdapUser authAdvanced(java.lang.String username,
                             java.lang.String password)
                      throws javax.security.auth.login.LoginException,
                             javax.naming.NamingException,
                             HeraclesException
This method takes the usersername and the password as Strings and does the authentication. If the authetication fail an exception will return. Is the authentication successfull the methode will return a LDAP-User Object. This Object includes by example the groups of which it is member of

Specified by:
authAdvanced in class Heracles
Parameters:
username -
password -
Returns:
LdapUser
Throws:
javax.security.auth.login.LoginException
javax.naming.NamingException
HeraclesException

authSimple

public void authSimple(java.lang.String username,
                       java.lang.String password)
                throws javax.security.auth.login.LoginException,
                       HeraclesException
This method takes the usersername and the password as Strings and does the authentication. If the authetication fail an exception will return. Is the authentication successfull the methode will return a LDAP-User Object. This Object includes by example the groups of which it is member of

Specified by:
authSimple in class Heracles
Parameters:
username -
password -
Throws:
javax.security.auth.login.LoginException
HeraclesException

searchInLdap

public java.util.List<LdapUser> searchInLdap(java.lang.String domainName,
                                             java.lang.String where,
                                             java.lang.String like)
                                      throws javax.naming.NamingException,
                                             HeraclesException
This method could be used to search in the ldap for something, the result will be come as a List. Maybe there are more then one result. This list inludes LDAP-User Object where be found for the searched String.

Specified by:
searchInLdap in class Heracles
Parameters:
where - specified the ldap attribut
like - specified the search string
domainName - specified the domain of the search
Returns:
List
Throws:
javax.naming.NamingException
HeraclesException


Copyright © 2007 null. All Rights Reserved.