wt.pds
Class SurrogateAccessController

java.lang.Object
  extended bywt.pds.AccessControllerAdapter
      extended bywt.pds.SurrogateAccessController
All Implemented Interfaces:
AccessController, Serializable

public class SurrogateAccessController
extends AccessControllerAdapter
implements Serializable

This class provides Access Control via a surrogate mechanism in conjunction with the Access Control service.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static boolean DEBUG
           
private static DebugWriter LOG
           
private  AccessPermission permission
           
private static String RESOURCE
           
static AccessController STANDARD_ACCESS_CONTROLLER
          Standard access controller that enforcess access control via Access Control Service.
 
Fields inherited from class wt.pds.AccessControllerAdapter
NOOP_ACCESS_CONTROLLER
 
Fields inherited from interface wt.pds.AccessController
FILTER
 
Constructor Summary
SurrogateAccessController()
           
 
Method Summary
 boolean checkAccess(Object a_object)
          Check access of the object.
 void checkQuery(StatementSpec a_statementSpec)
          

Supported API: false
 Vector getItemBuilders(Vector a_tableInfos, ResultBuilder a_resultBuilder, int a_itemOffset)
          Return a Vector of ItemBuilders that will be used to retrieve Access Control related objects.
 AccessPermission getPermission()
          Gets the value of the attribute: permission; This attribute will be used for checking the access permission for each result.
 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
 void setPermission(AccessPermission a_Permission)
          Sets the value of the attribute: permission; This attribute will be used for checking the access permission for each result.
 
Methods inherited from class wt.pds.AccessControllerAdapter
buildAccessCondition, checkAccess, getFilter
 
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

STANDARD_ACCESS_CONTROLLER

public static final AccessController STANDARD_ACCESS_CONTROLLER
Standard access controller that enforcess access control via Access Control Service.

Supported API: false


permission

private AccessPermission permission

DEBUG

public static final boolean DEBUG

LOG

private static final DebugWriter LOG
Constructor Detail

SurrogateAccessController

public SurrogateAccessController()
Method Detail

getPermission

public AccessPermission getPermission()
Gets the value of the attribute: permission; This attribute will be used for checking the access permission for each result.

Supported API: false

Returns:
AccessPermission

setPermission

public void setPermission(AccessPermission a_Permission)
                   throws WTPropertyVetoException
Sets the value of the attribute: permission; This attribute will be used for checking the access permission for each result.

Supported API: false

Parameters:
a_Permission -
Throws:
WTPropertyVetoException

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. This method is implemented by call the Access Control service hasAccess() method.

Supported API: false

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

getItemBuilders

public Vector getItemBuilders(Vector a_tableInfos,
                              ResultBuilder a_resultBuilder,
                              int a_itemOffset)
                       throws PersistenceException
Return a Vector of ItemBuilders that will be used to retrieve Access Control related objects. For each existing ItemBuilder, if Access Control is not supplied for that Item, then a surrogate ItemBuilder is added.

Supported API: false

Specified by:
getItemBuilders in interface AccessController
Overrides:
getItemBuilders in class AccessControllerAdapter
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
Overrides:
getViewItemBuilder in class AccessControllerAdapter
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
Overrides:
checkQuery in class AccessControllerAdapter
Parameters:
a_statementSpec -
Throws:
PersistenceException

isItemBuilderProvided

public boolean isItemBuilderProvided()


Supported API: false

Specified by:
isItemBuilderProvided in interface AccessController
Overrides:
isItemBuilderProvided in class AccessControllerAdapter
Returns:
boolean