Interface MembershipSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface MembershipSession extends OsidSession

This session provides methods to query if a Resource is a member of another Resource . Resources may represent groups of Resources or generated Demographics of Resources .

  • Method Details

    • getBinId

      Id getBinId()
      Gets the Bin Id associated with this session.
      Returns:
      the Bin Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getBin

      Gets the Bin associated with this session.
      Returns:
      the Bin associated with this session
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canQueryMembership

      boolean canQueryMembership()
      Tests if this user can perform membership queries. A return of true does not guarantee successful authorization. A return of false indicates that it is known lookup methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
      Returns:
      false if membership queries are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useFederatedBinView

      void useFederatedBinView()
      Federates the view for methods in this session. A federated view will include resources in bins which are children of this bin in the bin hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedBinView

      void useIsolatedBinView()
      Isolates the view for methods in this session. An isolated view restricts resources to this bin only.
      Compliance:
      mandatory - This method is must be implemented.
    • isMember

      boolean isMember(Id memberResourceId, Id resourceId) throws OperationFailedException, PermissionDeniedException
      Tests if a Resource is a member of another Resource .
      Parameters:
      memberResourceId - Id of the Resource member
      resourceId - Id of the Resource representing the group or demographic
      Returns:
      true if memberResourceId is a member of the resourceId , false otherwise
      Throws:
      NullArgumentException - memberResourceId or resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.