com.sibvisions.rad.server.security
Class DefaultAccessController

java.lang.Object
  extended by com.sibvisions.rad.server.security.DefaultAccessController
All Implemented Interfaces:
IAccessController, IAccessChecker

public class DefaultAccessController
extends Object
implements IAccessController

The DefaultAccessController is the standard IAccessController implementation. It manages allowed objects in a simple list.


Constructor Summary
DefaultAccessController()
           
 
Method Summary
 void addAccess(String pLifeCycleName)
          Adds access to a specific life-cycle object.
 String find(ClassLoader pLoader, String pName)
          Search all available lifecycle objects for the given name.
protected  String findReplacement(ClassLoader pLoader, String pName)
          Finds a lifecycle class with a Replacement definition that matches the given name.
protected  int getAccessCount()
          Gets the number of available access rules.
 boolean isAllowed(String pLifeCycleName)
          Checks the access for creating a session.
 void removeAccess(String pLifeCycleName)
          Removes access for a specific life-cycle object.
protected  void resetAccess()
          Clears the access list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAccessController

public DefaultAccessController()
Method Detail

isAllowed

public boolean isAllowed(String pLifeCycleName)
Checks the access for creating a session.

Specified by:
isAllowed in interface IAccessChecker
Parameters:
pLifeCycleName - the name of the life-cycle object
Returns:
true if it's allowed to open the connection, otherwise false

addAccess

public void addAccess(String pLifeCycleName)
Adds access to a specific life-cycle object.

Specified by:
addAccess in interface IAccessController
Parameters:
pLifeCycleName - the name of the life-cycle object

removeAccess

public void removeAccess(String pLifeCycleName)
Removes access for a specific life-cycle object.

Specified by:
removeAccess in interface IAccessController
Parameters:
pLifeCycleName - the name of the life-cycle object

find

public String find(ClassLoader pLoader,
                   String pName)
Search all available lifecycle objects for the given name.

Specified by:
find in interface IAccessChecker
Parameters:
pLoader - the class loader or null to use the default class loader
pName - the object name (full qualified or not)
Returns:
the full qualified lifecycle object name or null if no lifecycle object name was found for the given object name

findReplacement

protected String findReplacement(ClassLoader pLoader,
                                 String pName)
Finds a lifecycle class with a Replacement definition that matches the given name.

Parameters:
pLoader - the class loader to use or null to use the default class loader
pName - the name of the replacement
Returns:
the found lifecycle class (full qualified class name) or null if no lifecycle class with given name was found

resetAccess

protected void resetAccess()
Clears the access list.


getAccessCount

protected int getAccessCount()
Gets the number of available access rules.

Returns:
the number of access rules


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.