org.aselect.server.authspprotocol.handler
Class AuthSPHandlerManager

java.lang.Object
  extended by org.aselect.server.authspprotocol.handler.AuthSPHandlerManager

public class AuthSPHandlerManager
extends java.lang.Object

The AuthSPHandler manager for the A-Select Server.

Description:
A singleton AuthSPHandler manager, containing the authsp handler configuration. It loads several authsp handler settings in memory during initialize.

Concurrency issues:
The class is a singleton, so the same class is used in all the classes of the A-Select Server.

Author:
Alfa & Ariss

Constructor Summary
AuthSPHandlerManager()
           
 
Method Summary
 IAuthSPDirectLoginProtocolHandler getAuthSPDirectLoginProtocolHandler(java.lang.String sAuthSPId)
          Returns the handler which is able to handle direct_login requests

Description:
Returns the handler which is able to handle direct_login requests

Concurrency issues:
-

Preconditions:
-

Postconditions:
-
 java.util.Vector getConfiguredAuthSPs()
          Get all the configured AuthSP handlers.
 java.util.Vector getConfiguredAuthSPs(java.lang.Integer intMinLevel)
          Get all the configured AuthSP handlers with a minimum level.
 java.util.Vector getConfiguredAuthSPs(java.lang.Integer intMinLevel, java.lang.Integer intMaxLevel)
          Get all the configured AuthSP handlers between two levels.
 java.lang.String getFriendlyName(java.lang.String sAuthSPId)
          Returns the Friendly Name of an AuthSP handler.
static AuthSPHandlerManager getHandle()
          Must be used to get an AuthSPHandlerManager instance.
 java.lang.String getHandler(java.lang.String sAuthSPId)
          Returns the class name of the AuthSP Handler.
 java.lang.Integer getLevel(java.lang.String sAuthSPId)
          Returns the level of an AuthSP.
 java.lang.String getResourceGroup(java.lang.String sAuthSPId)
          Returns the resource group of an AuthSP.
 java.lang.String getType(java.lang.String sAuthSPId)
          Returns the type of an AuthSP.
 java.lang.String getUrl(java.lang.String sAuthSPId)
          Returns the URL an AuthSP.
 void init()
          Initialization of the AuthSPHandlerManager singleton

Description:
Must be successfully run once, before it can be used.
 boolean isDirectAuthSP(java.lang.String sAuthSPId)
          Checks if an AuthSP is a DirectAuthSP or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthSPHandlerManager

public AuthSPHandlerManager()
Method Detail

getHandle

public static AuthSPHandlerManager getHandle()
Must be used to get an AuthSPHandlerManager instance.

Description:
Creates a new AuthSPHandlerManager instance if it's still null.

Concurrency issues:
Always the same instance of the AuthSPHandlerManager is returned, because it's a singleton.

Preconditions:
-

Postconditions:
-

Returns:
A satic handle to the AuthSPHandlerManager.

init

public void init()
          throws ASelectException
Initialization of the AuthSPHandlerManager singleton

Description:
Must be successfully run once, before it can be used.

Concurrency issues:
-

Preconditions:
- Singleton ASelectConfigManager should be initialized.


Postconditions:
-

Throws:
ASelectException

getConfiguredAuthSPs

public java.util.Vector getConfiguredAuthSPs()
Get all the configured AuthSP handlers.

Description:
Returns a Vector object containing the Id's of all configured AuthSP handlers.

Concurrency issues:
-

Preconditions:
-

Postconditions:
-

Returns:
Vector with all the AuthSP Id's.

getConfiguredAuthSPs

public java.util.Vector getConfiguredAuthSPs(java.lang.Integer intMinLevel,
                                             java.lang.Integer intMaxLevel)
Get all the configured AuthSP handlers between two levels.

Description:
Returns a Vector containing the AuthSP Id's of all configured AuthSP handlers with an level between the suplied minimum and maximum level.

Concurrency issues:
-

Preconditions:
-

Postconditions:
-

Parameters:
intMinLevel - Minimum level of the AuthSP Handlers to return.
intMaxLevel - Maximum level of the AuthSP Handlers to return.
Returns:
Vector with the AuthSP Id's.

getConfiguredAuthSPs

public java.util.Vector getConfiguredAuthSPs(java.lang.Integer intMinLevel)
Get all the configured AuthSP handlers with a minimum level.

Description:
Returns a Vector containing the AuthSP Id's of all configured AuthSP handlers with an level higher than the suplied minimum level.

Concurrency issues:
-

Preconditions:
-

Postconditions:
-

Parameters:
intMinLevel - Minimum level of the AuthSP Handlers to return.
Returns:
Vector with the AuthSP Id's.

isDirectAuthSP

public boolean isDirectAuthSP(java.lang.String sAuthSPId)
                       throws ASelectException
Checks if an AuthSP is a DirectAuthSP or not.

Description:
Returns wether an AuthSP is a DirectAuthSP or not and throws an ASelectException if the supplied id doesn't exists.

Concurrency issues:
-

Preconditions:
-

Postconditions:
-

Parameters:
sAuthSPId - The Id of the AuthSP
Returns:
Returns true if the AuthSP with the given Id is a Direct Authsp and false if not.
Throws:
ASelectException - if AuthSP with sAuthSPId not exists.

getFriendlyName

public java.lang.String getFriendlyName(java.lang.String sAuthSPId)
                                 throws ASelectException
Returns the Friendly Name of an AuthSP handler.

Description:
Returns the Friendly Name of the AuthSP handler with the supplied Id and throws an ASelectException if the supplied id doesn't exists.

Concurrency issues:
-

Preconditions:
-

Postconditions:
-

Parameters:
sAuthSPId - The Id of the AuthSP
Returns:
The Friendly Name
Throws:
ASelectException

getHandler

public java.lang.String getHandler(java.lang.String sAuthSPId)
                            throws ASelectException
Returns the class name of the AuthSP Handler.

Description:
Returns the class name of the AuthSP Handler.

Concurrency issues:
-

Preconditions:
-

Postconditions:
-

Parameters:
sAuthSPId - The Id of the AuthSP
Returns:
handler class name.
Throws:
ASelectException

getType

public java.lang.String getType(java.lang.String sAuthSPId)
                         throws ASelectException
Returns the type of an AuthSP.

Description:
Returns local if it is a local AuthSP and remote if it is a remote AuthSP.

Concurrency issues:
-

Preconditions:
-

Postconditions:
-

Parameters:
sAuthSPId - The Id of the AuthSP
Returns:
local or remote.
Throws:
ASelectException

getLevel

public java.lang.Integer getLevel(java.lang.String sAuthSPId)
                           throws ASelectException
Returns the level of an AuthSP.

Description:
Returns the level of an AuthSP, this is a security indicator of the AuthSP, the higher the level the more secure the AuthSP is.

Concurrency issues:
-

Preconditions:
-

Postconditions:
-

Parameters:
sAuthSPId - The Id of the AuthSP
Returns:
local or remote.
Throws:
ASelectException

getResourceGroup

public java.lang.String getResourceGroup(java.lang.String sAuthSPId)
                                  throws ASelectException
Returns the resource group of an AuthSP.

Description:
Returns the resource group of an AuthSP.

Concurrency issues:
-

Preconditions:
-

Postconditions:
-

Parameters:
sAuthSPId - The id of the AuthSP
Returns:
local or remote.
Throws:
ASelectException

getUrl

public java.lang.String getUrl(java.lang.String sAuthSPId)
                        throws ASelectException
Returns the URL an AuthSP.

Description:
Returns the URL an AuthSP.

Concurrency issues:
-

Preconditions:
-)

Postconditions:
-

Parameters:
sAuthSPId - The id of the AuthSP
Returns:
The URL of the AuthSP
Throws:
ASelectException

getAuthSPDirectLoginProtocolHandler

public IAuthSPDirectLoginProtocolHandler getAuthSPDirectLoginProtocolHandler(java.lang.String sAuthSPId)
                                                                      throws ASelectException
Returns the handler which is able to handle direct_login requests

Description:
Returns the handler which is able to handle direct_login requests

Concurrency issues:
-

Preconditions:
-

Postconditions:
-

Parameters:
sAuthSPId - The id of the AuthSP
Returns:
IAuthSPDirectLoginProtocolHandler
Throws:
ASelectException


Copyright © 2008 SURFnet BV. All Rights Reserved.