Interface HoldLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for retrieving Hold
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 oubliette view: All hold methods in this session
operate, retrieve and pertain to holds defined explicitly in the
current oubliette. Using an isolated view is useful for managing
Holdswith theHoldAdminSession. - federated oubliette view: All hold methods in this session operate, retrieve and pertain to all holds defined in this oubliette and any other holds implicitly available in this oubliette through oubliette inheritence.
- effective hold view: All hold lookup methods return holds where the current date falls in between the effective dates inclusive.
- any effective hold view: Holds of any effective date are returned from methods.
Generally, the comparative view should be used for most applications
as it permits operation even if there is data that cannot be accessed. The
methods useFederatedOublietteView() and
useIsolatedOublietteView() behave as a radio group and one should be
selected before invoking any lookup methods.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performHoldlookups.Gets theHoldspecified by itsId.getHolds()Gets allHolds.getHoldsByGenusType(Type holdGenusType) Gets aHoldListcorresponding to the given hold genusTypewhich does not include holds of genus types derived from the specifiedType.getHoldsByIds(IdList holdIds) Gets aHoldListcorresponding to the givenIdList.getHoldsByParentGenusType(Type holdGenusType) Gets aHoldListcorresponding to the given hold genusTypeand include any additional holds with genus types derived from the specifiedType.getHoldsByRecordType(Type holdRecordType) Gets aHoldListcontaining the given hold recordType.getHoldsForAgent(Id agentId) Gets a list of holds for an agent.getHoldsForAgentAndIssue(Id agentId, Id issueId) Gets a list of holds for an agent.getHoldsForAgentAndIssueOnDate(Id agentId, Id issueId, DateTime from, DateTime to) Gets a list of holds for an agent and issue and effective during the entire given date range inclusive but not confined to the date range.getHoldsForAgentOnDate(Id agentId, DateTime from, DateTime to) Gets a list of holds for an agent and effective during the entire given date range inclusive but not confined to the date range.getHoldsForIssue(Id issueId) Gets a list of holds for an issue.getHoldsForIssueOnDate(Id issueId, DateTime from, DateTime to) Gets a list of holds for an issue and effective during the entire given date range inclusive but not confined to the date range.getHoldsForResource(Id resourceId) Gets a list of holds for a resource including any holds for agents related to the resource.getHoldsForResourceAndIssue(Id resourceId, Id issueId) Gets a list of holds for a resource and issue including any holds for agents related to the resource.getHoldsForResourceAndIssueOnDate(Id resourceId, Id issueId, DateTime from, DateTime to) Gets a list of holds for a resource, including any holds for agents related to the resource, and issue and effective during the entire given date range inclusive but not confined to the date range.getHoldsForResourceOnDate(Id resourceId, DateTime from, DateTime to) Gets a list of holds for a resource, including any holds for agents related to the resource, and effective during the entire given date range inclusive but not confined to the date range.getHoldsOnDate(DateTime from, DateTime to) Gets a list of holds for a resource, including any holds for agents related to the resource, and effective during the entire given date range inclusive but not confined to the date range.Gets theOublietteassociated with this session.Gets theOublietteIdassociated with this session.voidAll holds 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 holds 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 theHoldreturns 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
-
getOublietteId
Id getOublietteId()Gets theOublietteIdassociated with this session.- Returns:
- the
Oubliette Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getOubliette
Gets theOublietteassociated with this session.- Returns:
- the oubliette
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupHolds
boolean canLookupHolds()Tests if this user can performHoldlookups. 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 lookup operations to unauthorized users.- Returns:
falseif lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeHoldView
void useComparativeHoldView()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.
-
usePlenaryHoldView
void usePlenaryHoldView()A complete view of theHoldreturns 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.
-
useFederatedOublietteView
void useFederatedOublietteView()Federates the view for methods in this session. A federated view will include holds in oubliettes which are children of this oubliette in the oubliette hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedOublietteView
void useIsolatedOublietteView()Isolates the view for methods in this session. An isolated view restricts lookups to this oubliette only.- Compliance:
mandatory- This method is must be implemented.
-
useEffectiveHoldView
void useEffectiveHoldView()Only holds whose effective dates are current are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyEffectiveHoldView
void useAnyEffectiveHoldView()All holds of any effective dates are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
getHold
Hold getHold(Id holdId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theHoldspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedHoldmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aHoldand retained for compatibility. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.- Parameters:
holdId-Idof theHold- Returns:
- the hold
- Throws:
NotFoundException-holdIdnot foundNullArgumentException-holdIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getHoldsByIds
HoldList getHoldsByIds(IdList holdIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aHoldListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the holds 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, inaccessibleHoldsmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.- Parameters:
holdIds- the list ofIdsto retrieve- Returns:
- the returned
Holdlist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-holdIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getHoldsByGenusType
HoldList getHoldsByGenusType(Type holdGenusType) throws OperationFailedException, PermissionDeniedException Gets aHoldListcorresponding to the given hold genusTypewhich does not include holds of genus types derived from the specifiedType. In plenary mode, the returned list contains all known holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.- Parameters:
holdGenusType- a hold genus type- Returns:
- the returned
Holdlist - Throws:
NullArgumentException-holdGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getHoldsByParentGenusType
HoldList getHoldsByParentGenusType(Type holdGenusType) throws OperationFailedException, PermissionDeniedException Gets aHoldListcorresponding to the given hold genusTypeand include any additional holds with genus types derived from the specifiedType. In plenary mode, the returned list contains all known holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.- Parameters:
holdGenusType- a hold genus type- Returns:
- the returned
Holdlist - Throws:
NullArgumentException-holdGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getHoldsByRecordType
HoldList getHoldsByRecordType(Type holdRecordType) throws OperationFailedException, PermissionDeniedException Gets aHoldListcontaining the given hold recordType. In plenary mode, the returned list contains all known holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.- Parameters:
holdRecordType- a hold record type- Returns:
- the returned
Holdlist - Throws:
NullArgumentException-holdRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getHoldsOnDate
HoldList getHoldsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of holds for a resource, including any holds for agents related to the 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 holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.- Parameters:
from- start of date rangeto- end of date range- Returns:
- the returned
Holdlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getHoldsForResource
HoldList getHoldsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Gets a list of holds for a resource including any holds for agents related to the resource. In plenary mode, the returned list contains all known holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.- Parameters:
resourceId- a resourceId- Returns:
- the returned
Holdlist - Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getHoldsForResourceOnDate
HoldList getHoldsForResourceOnDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of holds for a resource, including any holds for agents related to the 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 holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.- Parameters:
resourceId- a resourceIdfrom- start of date rangeto- end of date range- Returns:
- the returned
Holdlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resourceId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getHoldsForAgent
Gets a list of holds for an agent. In plenary mode, the returned list contains all known holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.- Parameters:
agentId- an agentId- Returns:
- the returned
Holdlist - Throws:
NullArgumentException-agentIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getHoldsForAgentOnDate
HoldList getHoldsForAgentOnDate(Id agentId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of holds for an agent 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 holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In both cases, the order of the set is by the start of the effective date. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.- Parameters:
agentId- an agentIdfrom- start of date rangeto- end of date range- Returns:
- the returned
Holdlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-agentId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getHoldsForIssue
Gets a list of holds for an issue. In plenary mode, the returned list contains all known holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.- Parameters:
issueId- an issueId- Returns:
- the returned C
ommissionlist - Throws:
NullArgumentException-issueidisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getHoldsForIssueOnDate
HoldList getHoldsForIssueOnDate(Id issueId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of holds for an issue 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 holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.- Parameters:
issueId- an issueIdfrom- start of date rangeto- end of date range- Returns:
- the returned C
ommissionlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-issueId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getHoldsForResourceAndIssue
HoldList getHoldsForResourceAndIssue(Id resourceId, Id issueId) throws OperationFailedException, PermissionDeniedException Gets a list of holds for a resource and issue including any holds for agents related to the resource. In plenary mode, the returned list contains all known holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.- Parameters:
resourceId- a resourceIdissueId- an issueId- Returns:
- the returned C
ommissionlist - Throws:
NullArgumentException-resourceIdorissueidisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getHoldsForResourceAndIssueOnDate
HoldList getHoldsForResourceAndIssueOnDate(Id resourceId, Id issueId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of holds for a resource, including any holds for agents related to the resource, and issue 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 holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.- Parameters:
resourceId- a resourceIdissueId- an issueIdfrom- start of date rangeto- end of date range- Returns:
- the returned C
ommissionlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resourceId, issueId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getHoldsForAgentAndIssue
HoldList getHoldsForAgentAndIssue(Id agentId, Id issueId) throws OperationFailedException, PermissionDeniedException Gets a list of holds for an agent. In plenary mode, the returned list contains all known holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.- Parameters:
agentId- an agentIdissueId- an issueId- Returns:
- the returned C
ommissionlist - Throws:
NullArgumentException-agentIdorissueidisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getHoldsForAgentAndIssueOnDate
HoldList getHoldsForAgentAndIssueOnDate(Id agentId, Id issueId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of holds for an agent and issue 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 holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.- Parameters:
agentId- an agentIdissueId- an issueIdfrom- start of date rangeto- end of date range- Returns:
- the returned C
ommissionlist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-agentId, issueId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getHolds
Gets allHolds. In plenary mode, the returned list contains all known holds or an error results. Otherwise, the returned list may contain only those holds that are accessible through this session. In effective mode, holds are returned that are currently effective. In any effective mode, effective holds and those currently expired are returned.- Returns:
- a list of
Holds - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-