Interface GroupSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface GroupSession extends OsidSession

This session provides methods to retrieve Resource to Group mappings. A Resource may appear in multiple resource groups. A group is also represented by a resource itself.

  • 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.
    • canLookupResourceMembers

      boolean canLookupResourceMembers()
      Tests if this user can perform lookups of resource members. 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 looking up members is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeResourceView

      void useComparativeResourceView()
      The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
      Compliance:
      mandatory - This method is must be implemented.
    • usePlenaryResourceView

      void usePlenaryResourceView()
      A complete view of the Resource returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
      Compliance:
      mandatory - This method is 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.
    • useFederatedGroupView

      void useFederatedGroupView()
      Federates the view for methods in this session. A federated view will include resources in groups which are children of the specified group in the group hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedGroupView

      void useIsolatedGroupView()
      Isolates the view for methods in this session. An isolated view restricts lookups to the specified group only.
      Compliance:
      mandatory - This method is must be implemented.
    • getResourceIdsByGroup

      IdList getResourceIdsByGroup(Id groupResourceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the list of Resource Ids associated with a Resource . In a federated view, resources for child groups are included.
      Parameters:
      groupResourceId - Id of the Resource
      Returns:
      list of member resource Ids
      Throws:
      NotFoundException - groupResourceId is not found
      NullArgumentException - groupResourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResourcesByGroup

      Gets the list of Resources associated with a Resource . In a federated view, resources for child groups are included.
      Parameters:
      groupResourceId - Id of the Resource
      Returns:
      list of resourcememembers
      Throws:
      NotFoundException - groupResourceId is not found
      NullArgumentException - groupResourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResourceIdsByGroups

      IdList getResourceIdsByGroups(IdList groupResourceIds) throws OperationFailedException, PermissionDeniedException
      Gets the list of Resource Ids corresponding to a list of Resource objects.
      Parameters:
      groupResourceIds - list of resource Ids
      Returns:
      list of resource Ids
      Throws:
      NullArgumentException - groupResourceIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getResourcesByGroups

      ResourceList getResourcesByGroups(IdList groupResourceIds) throws OperationFailedException, PermissionDeniedException
      Gets the list of Resources corresponding to a list of Resource objects.
      Parameters:
      groupResourceIds - list of resource Ids
      Returns:
      list of resources
      Throws:
      NullArgumentException - groupResourceIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getGroupIdsByResource

      Gets the list of Resource Ids mapped to a Resource .
      Parameters:
      resourceId - Id of a Resource
      Returns:
      list of group resource Ids
      Throws:
      NotFoundException - resourceId is not found
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getGroupsByResource

      Gets the list of Resource objects mapped to a Resource .
      Parameters:
      resourceId - Id of a Resource
      Returns:
      list of group resources
      Throws:
      NotFoundException - resourceId is not found
      NullArgumentException - resourceId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.