Interface GroupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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 Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can perform lookups of resource members.getBin()Gets theBinassociated with this session.getBinId()Gets theBinIdassociated with this session.getGroupIdsByResource(Id resourceId) Gets the list ofResourceIdsmapped to aResource.getGroupsByResource(Id resourceId) Gets the list ofResourceobjects mapped to aResource.getResourceIdsByGroup(Id groupResourceId) Gets the list ofResourceIdsassociated with aResource.getResourceIdsByGroups(IdList groupResourceIds) Gets the list ofResource Idscorresponding to a list ofResourceobjects.getResourcesByGroup(Id groupResourceId) Gets the list ofResourcesassociated with aResource.getResourcesByGroups(IdList groupResourceIds) Gets the list ofResourcescorresponding to a list ofResourceobjects.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidFederates the view for methods in this session.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theResourcereturns is desired.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getBinId
Id getBinId()Gets theBinIdassociated with this session.- Returns:
- the
Bin Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getBin
Gets theBinassociated with this session.- Returns:
- the
Binassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Returns:
falseif looking up members is not authorized,trueotherwise- 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 theResourcereturns 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 ofResourceIdsassociated with aResource. In a federated view, resources for child groups are included.- Parameters:
groupResourceId-Idof theResource- Returns:
- list of member resource
Ids - Throws:
NotFoundException-groupResourceIdis not foundNullArgumentException-groupResourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResourcesByGroup
ResourceList getResourcesByGroup(Id groupResourceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the list ofResourcesassociated with aResource. In a federated view, resources for child groups are included.- Parameters:
groupResourceId-Idof theResource- Returns:
- list of resourcememembers
- Throws:
NotFoundException-groupResourceIdis not foundNullArgumentException-groupResourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResourceIdsByGroups
IdList getResourceIdsByGroups(IdList groupResourceIds) throws OperationFailedException, PermissionDeniedException Gets the list ofResource Idscorresponding to a list ofResourceobjects.- Parameters:
groupResourceIds- list of resourceIds- Returns:
- list of resource
Ids - Throws:
NullArgumentException-groupResourceIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResourcesByGroups
ResourceList getResourcesByGroups(IdList groupResourceIds) throws OperationFailedException, PermissionDeniedException Gets the list ofResourcescorresponding to a list ofResourceobjects.- Parameters:
groupResourceIds- list of resourceIds- Returns:
- list of resources
- Throws:
NullArgumentException-groupResourceIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getGroupIdsByResource
IdList getGroupIdsByResource(Id resourceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the list ofResourceIdsmapped to aResource.- Parameters:
resourceId-Idof aResource- Returns:
- list of group resource
Ids - Throws:
NotFoundException-resourceIdis not foundNullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getGroupsByResource
ResourceList getGroupsByResource(Id resourceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the list ofResourceobjects mapped to aResource.- Parameters:
resourceId-Idof aResource- Returns:
- list of group resources
- Throws:
NotFoundException-resourceIdis not foundNullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-