wt.pds
Class AccessControllerAdapter

java.lang.Object
  extended bywt.pds.AccessControllerAdapter
All Implemented Interfaces:
AccessController
Direct Known Subclasses:
CompositeAccessController, CompoundAccessController, InheritFromSubjectAccessController, IteratedAccessController, LatestVersionAccessController, MarkForDeleteAccessController, SurrogateAccessController

public class AccessControllerAdapter
extends Object
implements AccessController

This class provides a concrete implementation of an AccessController that provides access to all objects. No access control check is performed. It is assumed that no access control is needed, a sub-class will override one or more of the methods, or another process will be responsible for access control.

Supported API: false

Extendable: false


Field Summary
private static String CLASSNAME
           
static boolean DEBUG
           
private static DebugWriter LOG
           
static AccessController NOOP_ACCESS_CONTROLLER
          Default no-op access controller that enforcess no access control.
private static String RESOURCE
           
 
Fields inherited from interface wt.pds.AccessController
FILTER
 
Constructor Summary
AccessControllerAdapter()
           
 
Method Summary
 WhereExpression buildAccessCondition(Vector a_tableInfos, boolean a_useOuterJoin)
          Build WHERE condtions for the specified class and the current principal.
 boolean checkAccess(Object a_object)
          Check access of the object.
 boolean checkAccess(Object[] a_objects)
          Check access of all objects in the array.
 void checkQuery(StatementSpec a_statementSpec)
          

Supported API: false
 FilterResultProcessor getFilter()
          Gets the value of the attribute: filter; Filter for processing multiple rows.
 Vector getItemBuilders(Vector a_tableInfos, ResultBuilder a_resultBuilder, int a_itemOffset)
          Retrun a Vector of ItemBuilders that will be used to retrieve Access Control related objects.
 ItemBuilder getViewItemBuilder(ClassInfo a_classInfo, String a_alias)
          Retrun a ItemBuilders that will be used to retrieve Access Control related objects.
 boolean isItemBuilderProvided()
          

Supported API: false
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

NOOP_ACCESS_CONTROLLER

public static final AccessController NOOP_ACCESS_CONTROLLER
Default no-op access controller that enforcess no access control.

Supported API: false


DEBUG

public static final boolean DEBUG

LOG

private static final DebugWriter LOG
Constructor Detail

AccessControllerAdapter

public AccessControllerAdapter()
Method Detail

getFilter

public FilterResultProcessor getFilter()
                                throws WTException
Gets the value of the attribute: filter; Filter for processing multiple rows.

Supported API: false

Specified by:
getFilter in interface AccessController
Returns:
FilterResultProcessor
Throws:
WTException

checkAccess

public boolean checkAccess(Object a_object)
                    throws PersistenceException
Check access of the object. Return false if the current principal does not have READ permission on all of the objects.

Supported API: false

Specified by:
checkAccess in interface AccessController
Parameters:
a_object -
Returns:
boolean
Throws:
PersistenceException

checkAccess

public boolean checkAccess(Object[] a_objects)
                    throws PersistenceException
Check access of all objects in the array. Return false if the current principal does not have READ permission on all of the objects.

Supported API: false

Specified by:
checkAccess in interface AccessController
Parameters:
a_objects -
Returns:
boolean
Throws:
PersistenceException

buildAccessCondition

public WhereExpression buildAccessCondition(Vector a_tableInfos,
                                            boolean a_useOuterJoin)
                                     throws PersistenceException
Build WHERE condtions for the specified class and the current principal.

Supported API: false

Specified by:
buildAccessCondition in interface AccessController
Parameters:
a_tableInfos -
a_useOuterJoin -
Returns:
WhereExpression
Throws:
PersistenceException

getItemBuilders

public Vector getItemBuilders(Vector a_tableInfos,
                              ResultBuilder a_resultBuilder,
                              int a_itemOffset)
                       throws PersistenceException
Retrun a Vector of ItemBuilders that will be used to retrieve Access Control related objects.

Supported API: false

Specified by:
getItemBuilders in interface AccessController
Parameters:
a_tableInfos - Vector of concrete TableExpression instances to use to create the Access Control items
a_resultBuilder - instance used to create the Access Control items
a_itemOffset - The current offset where the items will be placed in the results.
Returns:
Vector
Throws:
PersistenceException

getViewItemBuilder

public ItemBuilder getViewItemBuilder(ClassInfo a_classInfo,
                                      String a_alias)
Retrun a ItemBuilders that will be used to retrieve Access Control related objects.

Supported API: false

Specified by:
getViewItemBuilder in interface AccessController
Parameters:
a_classInfo -
a_alias -
Returns:
ItemBuilder

checkQuery

public void checkQuery(StatementSpec a_statementSpec)
                throws PersistenceException


Supported API: false

Specified by:
checkQuery in interface AccessController
Parameters:
a_statementSpec -
Throws:
PersistenceException

isItemBuilderProvided

public boolean isItemBuilderProvided()


Supported API: false

Specified by:
isItemBuilderProvided in interface AccessController
Returns:
boolean