org.eclipse.datatools.enablement.sybase.asa.schemaobjecteditor.examples.routineeditor.pages.privilege
Class ASARoutinePrivilegeStateLookup

java.lang.Object
  extended by org.eclipse.datatools.enablement.sybase.asa.schemaobjecteditor.examples.routineeditor.pages.privilege.ASARoutinePrivilegeStateLookup
All Implemented Interfaces:
IPrivilegeStateLookup

public class ASARoutinePrivilegeStateLookup
extends java.lang.Object
implements IPrivilegeStateLookup

Author:
Hui Cao

Field Summary
static int[][] GROUP_STATE_TRANSITION_ARRAY
           
static int[][] USER_STATE_TRANSITION_ARRAY
           
 
Constructor Summary
ASARoutinePrivilegeStateLookup()
           
 
Method Summary
 Privilege[] getInheritedPrivileges(java.util.List authids, AuthorizationIdentifier authid, SQLObject sqlObj, java.lang.String action)
          Returns the inherited privileges
 IPrivilegeState getPrivilegeState(java.util.List authids, AuthorizationIdentifier authid, SQLObject sqlObj, java.lang.String action)
          Returns the privileges state of the given authorization identifier (user, group or role) for the given SQL object with action type specified
 IPrivilegeState[] getReachableStates(IPrivilegeState initialState)
           
 IPrivilegeState[] getReachableStates(IPrivilegeState initialState, AuthorizationIdentifier authId)
          Returns the reachable states of the given state
 IPrivilegeState[] getReachableStates(IPrivilegeState initialState, int receiverType)
           
 boolean hasInheritedPrivilege(java.util.List authids, AuthorizationIdentifier authid, SQLObject sqlObj, java.lang.String action)
          Checks if the given authorization identifier (user, group or role) has inherited privilge for the given SQL object with action type specified
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USER_STATE_TRANSITION_ARRAY

public static final int[][] USER_STATE_TRANSITION_ARRAY

GROUP_STATE_TRANSITION_ARRAY

public static final int[][] GROUP_STATE_TRANSITION_ARRAY
Constructor Detail

ASARoutinePrivilegeStateLookup

public ASARoutinePrivilegeStateLookup()
Method Detail

getReachableStates

public IPrivilegeState[] getReachableStates(IPrivilegeState initialState,
                                            AuthorizationIdentifier authId)
Description copied from interface: IPrivilegeStateLookup
Returns the reachable states of the given state

Specified by:
getReachableStates in interface IPrivilegeStateLookup
Returns:

getReachableStates

public IPrivilegeState[] getReachableStates(IPrivilegeState initialState,
                                            int receiverType)
Parameters:
initialState -
authType -
Returns:
See Also:
IPrivilege.USER, IPrivilege.GROUP, IPrivilege.ROLE

getPrivilegeState

public IPrivilegeState getPrivilegeState(java.util.List authids,
                                         AuthorizationIdentifier authid,
                                         SQLObject sqlObj,
                                         java.lang.String action)
Description copied from interface: IPrivilegeStateLookup
Returns the privileges state of the given authorization identifier (user, group or role) for the given SQL object with action type specified

Specified by:
getPrivilegeState in interface IPrivilegeStateLookup
Parameters:
authids - all the authorization identifiers
authid - the authorization identifier
sqlObj - SQL object
action - action type
Returns:

hasInheritedPrivilege

public boolean hasInheritedPrivilege(java.util.List authids,
                                     AuthorizationIdentifier authid,
                                     SQLObject sqlObj,
                                     java.lang.String action)
Description copied from interface: IPrivilegeStateLookup
Checks if the given authorization identifier (user, group or role) has inherited privilge for the given SQL object with action type specified

Specified by:
hasInheritedPrivilege in interface IPrivilegeStateLookup
Returns:

getReachableStates

public IPrivilegeState[] getReachableStates(IPrivilegeState initialState)

getInheritedPrivileges

public Privilege[] getInheritedPrivileges(java.util.List authids,
                                          AuthorizationIdentifier authid,
                                          SQLObject sqlObj,
                                          java.lang.String action)
Description copied from interface: IPrivilegeStateLookup
Returns the inherited privileges

Specified by:
getInheritedPrivileges in interface IPrivilegeStateLookup
Returns: