Interface ResourceRelationshipLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for examining resource relationships.
This session defines views that offer differing behaviors when retrieving multiple objects.
- comparative view: elements may be silently omitted or re-ordered
- plenary view: provides a complete set or is an error condition
- isolated bin view: All relationship methods in this session
operate, retrieve and pertain to relationships defined explicitly in
the current bin. Using an isolated view is useful for managing
relationships with the
ResourceRelationshipAdminSession. - federated bin view: All relationship methods in this session operate, retrieve and pertain to all relationships defined in this bin and any other catalogs implicitly available in this bin through bin inheritence.
- effective resource relationship view: All resource relationship lookup methods return resource relationships where the current date falls in between the effective dates inclusive.
- any resource relationship view: Resource relationships of any effective date are returned from methods.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can access resource relationships.getBin()Gets theBinassociated with this session.getBinId()Gets theBinIdassociated with this session.getResourceRelationship(Id resourceRelationshipId) Gets theResourceRelationshipspecified by itsId.Gets allResourceRelationships.getResourceRelationshipsByGenusType(Type relationshipGenusType) Gets the resource relationships for the given resource relationship genus type.getResourceRelationshipsByGenusTypeForDestinationResource(Id destinationResourceId, Type relationshipGenusType) Gets theResourceRelationshipsof a resource of relationship genus type that includes any genus type derived from the given one.getResourceRelationshipsByGenusTypeForDestinationResourceOnDate(Id destinationResourceId, Type relationshipGenusType, DateTime from, DateTime to) Gets a list of resource relationships of a given genus type for a resource and effective during the entire given date range inclusive but not confined to the date range.getResourceRelationshipsByGenusTypeForResources(Id sourceResourceId, Id destinationResourceId, Type relationshipGenusType) Gets theResourceRelationshipsgiven two resources and a relationship genus type which includes any genus types derived from the given genus type.getResourceRelationshipsByGenusTypeForResourcesOnDate(Id sourceResourceId, Id destinationResourceId, Type relationshipGenusType, DateTime from, DateTime to) Gets a list of resource relationships of a given genus type for a two peer resources and effective during the entire given date range inclusive but not confined to the date range.getResourceRelationshipsByGenusTypeForSourceResource(Id sourceResourceId, Type relationshipGenusType) Gets theResourceRelationshipsof a resource of relationship genus type that includes any genus type derived from the given one.getResourceRelationshipsByGenusTypeForSourceResourceOnDate(Id sourceResourceId, Type relationshipGenusType, DateTime from, DateTime to) Gets a list of resource relationships of a given genus type for a resource and effective during the entire given date range inclusive but not confined to the date range.getResourceRelationshipsByIds(IdList resourceRelationshipIds) Gets aResourceRelationshipListcorresponding to the givenIdList.getResourceRelationshipsByParentGenusType(Type relationshipGenusType) Gets the reource relationships for the given resource relationship genus type and include any relationships with a genus type derived from the specified genus type.getResourceRelationshipsByRecordType(Type relationshipRecordType) Gets the resource relationships for the given resource relationship record type.getResourceRelationshipsForDestinationResource(Id destinationResourceId) Gets theResourceRelationshipsof a resource.getResourceRelationshipsForDestinationResourceOnDate(Id sourceResourceId, DateTime from, DateTime to) Gets a list of resource relationships for a resource and effective during the entire given date range inclusive but not confined to the date range.getResourceRelationshipsForResources(Id sourceResourceId, Id destinationResourceId) Gets theResourceRelationshipsgiven two resources.getResourceRelationshipsForResourcesOnDate(Id sourceResourceId, Id destinationResourceId, DateTime from, DateTime to) Gets a list of resource relationships for a two peer resources and effective during the entire given date range inclusive but not confined to the date range.getResourceRelationshipsForSourceResource(Id sourceResourceId) Gets theResourceRelationshipsof a resource.getResourceRelationshipsForSourceResourceOnDate(Id sourceResourceId, DateTime from, DateTime to) Gets a list of resource relationships for a resource and effective during the entire given date range inclusive but not confined to the date range.getResourceRelationshipsOnDate(DateTime from, DateTime to) Gets the resource relationships effective during the entire given date range inclusive but not confined to the date range.voidAll resource relationships of any effective dates are returned by methods in this session.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidOnly resource relationships whose effective dates are current are returned by methods in this session.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of the resource relationship returns 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.
-
canLookupResourceRelationships
boolean canLookupResourceRelationships()Tests if this user can access resource relationships. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer relationship operations.- Returns:
falseif lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeResourceRelationshipView
void useComparativeResourceRelationshipView()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.
-
usePlenaryResourceRelationshipView
void usePlenaryResourceRelationshipView()A complete view of the resource relationship 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 relationships 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 relationships to this bin only.- Compliance:
mandatory- This method is must be implemented.
-
useEffectiveResourceRelationshipView
void useEffectiveResourceRelationshipView()Only resource relationships whose effective dates are current are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyEffectiveResourceRelationshipView
void useAnyEffectiveResourceRelationshipView()All resource relationships of any effective dates are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
getResourceRelationship
ResourceRelationship getResourceRelationship(Id resourceRelationshipId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theResourceRelationshipspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedRelationshipmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aRelationshipand retained for compatibility. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.- Parameters:
resourceRelationshipId-Idof theRelationship- Returns:
- the relationship
- Throws:
NotFoundException-resourceRelationshipIdnot foundNullArgumentException-resourceRelationshipIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getResourceRelationshipsByIds
ResourceRelationshipList getResourceRelationshipsByIds(IdList resourceRelationshipIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aResourceRelationshipListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the relationships specified in theIdlist, in the order of the list, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleRelationshipsmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.- Parameters:
resourceRelationshipIds- the list ofIdsto retrieve- Returns:
- the returned
ResourceRelationshiplist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-resourceRelationshipIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResourceRelationshipsByGenusType
ResourceRelationshipList getResourceRelationshipsByGenusType(Type relationshipGenusType) throws OperationFailedException, PermissionDeniedException Gets the resource relationships for the given resource relationship genus type. In plenary mode, the returned list contains all known relationships or an error results. Otherwise, the returned list may contain only those relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.- Parameters:
relationshipGenusType- a relationship genus type- Returns:
- the relationships
- Throws:
NullArgumentException-relationshipGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResourceRelationshipsByParentGenusType
ResourceRelationshipList getResourceRelationshipsByParentGenusType(Type relationshipGenusType) throws OperationFailedException, PermissionDeniedException Gets the reource relationships for the given resource relationship genus type and include any relationships with a genus type derived from the specified genus type. In plenary mode, the returned list contains all known relationships or an error results. Otherwise, the returned list may contain only those relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.- Parameters:
relationshipGenusType- a relationship genus type- Returns:
- the relationships
- Throws:
NullArgumentException-relationshipGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResourceRelationshipsByRecordType
ResourceRelationshipList getResourceRelationshipsByRecordType(Type relationshipRecordType) throws OperationFailedException, PermissionDeniedException Gets the resource relationships for the given resource relationship record type. In plenary mode, the returned list contains all known relationships or an error results. Otherwise, the returned list may contain only those relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.- Parameters:
relationshipRecordType- a relationship record type- Returns:
- the relationships
- Throws:
NullArgumentException-relationshipRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResourceRelationshipsOnDate
ResourceRelationshipList getResourceRelationshipsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets the resource relationships effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known relationships or an error results. Otherwise, the returned list may contain only those relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective in addition to being effective during the given dates. In any effective mode, effective resource relationships and those currently expired are returned.- Parameters:
from- starting dateto- ending date- Returns:
- the relationships
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResourceRelationshipsForSourceResource
ResourceRelationshipList getResourceRelationshipsForSourceResource(Id sourceResourceId) throws OperationFailedException, PermissionDeniedException Gets theResourceRelationshipsof a resource. In plenary mode, the returned list contains all known relationships or an error results. Otherwise, the returned list may contain only those relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.- Parameters:
sourceResourceId-Idof aResource- Returns:
- the relationships
- Throws:
NullArgumentException-sourceResourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResourceRelationshipsForSourceResourceOnDate
ResourceRelationshipList getResourceRelationshipsForSourceResourceOnDate(Id sourceResourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of resource relationships for a resource and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known resource relationships or an error results. Otherwise, the returned list may contain only those resource relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective in addition to being effective during the given dates. In any effective mode, effective resource relationships and those currently expired are returned.- Parameters:
sourceResourceId- a resourceIdfrom- start of date rangeto- end of date range- Returns:
- the relationships
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-sourceResourceId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResourceRelationshipsByGenusTypeForSourceResource
ResourceRelationshipList getResourceRelationshipsByGenusTypeForSourceResource(Id sourceResourceId, Type relationshipGenusType) throws OperationFailedException, PermissionDeniedException Gets theResourceRelationshipsof a resource of relationship genus type that includes any genus type derived from the given one. In plenary mode, the returned list contains all known relationships or an error results. Otherwise, the returned list may contain only those relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.- Parameters:
sourceResourceId-Idof aResourcerelationshipGenusType- a relationship genus type- Returns:
- the relationships
- Throws:
NullArgumentException-sourceResourceIdorrelationshipGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResourceRelationshipsByGenusTypeForSourceResourceOnDate
ResourceRelationshipList getResourceRelationshipsByGenusTypeForSourceResourceOnDate(Id sourceResourceId, Type relationshipGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of resource relationships of a given genus type for a resource and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known resource relationships or an error results. Otherwise, the returned list may contain only those resource relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective in addition to being effective during the given dates. In any effective mode, effective resource relationships and those currently expired are returned.- Parameters:
sourceResourceId- a resourceIdrelationshipGenusType- a relationship genus typefrom- start of date rangeto- end of date range- Returns:
- the relationships
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-sourceResourceId, relationshipGenusType, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResourceRelationshipsForDestinationResource
ResourceRelationshipList getResourceRelationshipsForDestinationResource(Id destinationResourceId) throws OperationFailedException, PermissionDeniedException Gets theResourceRelationshipsof a resource. In plenary mode, the returned list contains all known relationships or an error results. Otherwise, the returned list may contain only those relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.- Parameters:
destinationResourceId-Idof aResource- Returns:
- the relationships
- Throws:
NullArgumentException-destinationResourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResourceRelationshipsForDestinationResourceOnDate
ResourceRelationshipList getResourceRelationshipsForDestinationResourceOnDate(Id sourceResourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of resource relationships for a resource and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known resource relationships or an error results. Otherwise, the returned list may contain only those resource relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective in addition to being effective during the given dates. In any effective mode, effective resource relationships and those currently expired are returned.- Parameters:
sourceResourceId- a resourceIdfrom- start of date rangeto- end of date range- Returns:
- the relationships
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-destinationResourceId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResourceRelationshipsByGenusTypeForDestinationResource
ResourceRelationshipList getResourceRelationshipsByGenusTypeForDestinationResource(Id destinationResourceId, Type relationshipGenusType) throws OperationFailedException, PermissionDeniedException Gets theResourceRelationshipsof a resource of relationship genus type that includes any genus type derived from the given one. In plenary mode, the returned list contains all known relationships or an error results. Otherwise, the returned list may contain only those relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.- Parameters:
destinationResourceId-Idof aResourcerelationshipGenusType- a relationship genus type- Returns:
- the relationships
- Throws:
NullArgumentException-destinationResourceIdorrelationshipGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResourceRelationshipsByGenusTypeForDestinationResourceOnDate
ResourceRelationshipList getResourceRelationshipsByGenusTypeForDestinationResourceOnDate(Id destinationResourceId, Type relationshipGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of resource relationships of a given genus type for a resource and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known resource relationships or an error results. Otherwise, the returned list may contain only those resource relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective in addition to being effective during the given dates. In any effective mode, effective resource relationships and those currently expired are returned.- Parameters:
destinationResourceId- a resourceIdrelationshipGenusType- a relationship genus typefrom- start of date rangeto- end of date range- Returns:
- the relationships
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-destinationResourceId, relationshipGenusType, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResourceRelationshipsForResources
ResourceRelationshipList getResourceRelationshipsForResources(Id sourceResourceId, Id destinationResourceId) throws OperationFailedException, PermissionDeniedException Gets theResourceRelationshipsgiven two resources. In plenary mode, the returned list contains all known relationships or an error results. Otherwise, the returned list may contain only those relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.- Parameters:
sourceResourceId-Idof aResourcedestinationResourceId-Idof anotherResource- Returns:
- the relationships
- Throws:
NullArgumentException-sourceRelationshipIdordestinationRelationshipIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResourceRelationshipsForResourcesOnDate
ResourceRelationshipList getResourceRelationshipsForResourcesOnDate(Id sourceResourceId, Id destinationResourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of resource relationships for a two peer resources and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known resource relationships or an error results. Otherwise, the returned list may contain only those resource relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective in addition to being effective during the given dates. In any effective mode, effective resource relationships and those currently expired are returned.- Parameters:
sourceResourceId- a resourceIddestinationResourceId-Idof anotherResourcefrom- start of date rangeto- end of date range- Returns:
- the relationships
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-sourceResourceId, destinationResourceId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResourceRelationshipsByGenusTypeForResources
ResourceRelationshipList getResourceRelationshipsByGenusTypeForResources(Id sourceResourceId, Id destinationResourceId, Type relationshipGenusType) throws OperationFailedException, PermissionDeniedException Gets theResourceRelationshipsgiven two resources and a relationship genus type which includes any genus types derived from the given genus type. In plenary mode, the returned list contains all known relationships or an error results. Otherwise, the returned list may contain only those relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.- Parameters:
sourceResourceId-Idof aResourcedestinationResourceId-Idof anotherResourcerelationshipGenusType- a relationship genus type- Returns:
- the relationships
- Throws:
NullArgumentException-sourceResourceId, destinationResourceId, orrelatonshipGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResourceRelationshipsByGenusTypeForResourcesOnDate
ResourceRelationshipList getResourceRelationshipsByGenusTypeForResourcesOnDate(Id sourceResourceId, Id destinationResourceId, Type relationshipGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of resource relationships of a given genus type for a two peer resources and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known resource relationships or an error results. Otherwise, the returned list may contain only those resource relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective in addition to being effective during the given dates. In any effective mode, effective resource relationships and those currently expired are returned.- Parameters:
sourceResourceId- a resourceIddestinationResourceId-Idof anotherResourcerelationshipGenusType- a relationship genus typefrom- start of date rangeto- end of date range- Returns:
- the relationships
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-sourceResourceId, destinationResourceId, relationshipGenusType, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getResourceRelationships
ResourceRelationshipList getResourceRelationships() throws OperationFailedException, PermissionDeniedExceptionGets allResourceRelationships. In plenary mode, the returned list contains all known resource relationships or an error results. Otherwise, the returned list may contain only those resource relationships that are accessible through this session. In effective mode, resource relationships are returned that are currently effective. In any effective mode, effective resource relationships and those currently expired are returned.- Returns:
- the relationships
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-