Interface AuctionHouseHierarchySession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for traversing a hierarchy of
AuctionHouses . Each node in the hierarchy is a unique
AuctionHouse . The hierarchy may be traversed recursively to establish
the tree structure through getParentAuctionHouses() and
getChildAuctionHouses() . To relate these Ids to another OSID,
getAuctionHouseNodes() can be used for retrievals that can be used
for bulk lookups in other OSIDs. Any AuctionHouse available in the
Bidding OSID is known to this hierarchy but does not appear in the
hierarchy traversal until added as a root item or a child of another item.
A user may not be authorized to traverse the entire hierarchy. Parts
of the hierarchy may be made invisible through omission from the returns
of getParentAuctionHouses() or getChildAuctionHouses() in
lieu of a PERMISSION_DENIED error that may disrupt the traversal
through authorized auctionways.
This session defines views that offer differing behaviors when retrieving multiple objects.
- comparative auction house view: auction house elements may be silently omitted or re-ordered
- plenary auction house view: provides a complete set or is an error condition
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can perform hierarchy queries.Gets the hierarchy associated with this session.Gets the hierarchyIdassociated with this session.getAuctionHouseNodeIds(Id auctionHouseId, long ancestorLevels, long descendantLevels, boolean includeSiblings) Gets a portion of the hierarchy for the given auction house.getAuctionHouseNodes(Id auctionHouseId, long ancestorLevels, long descendantLevels, boolean includeSiblings) Gets a portion of the hierarchy for the given auction house.getChildAuctionHouseIds(Id auctionHouseId) Gets the childIdsof the given auction house.getChildAuctionHouses(Id auctionHouseId) Gets the children of the given auction house.getParentAuctionHouseIds(Id auctionHouseId) Gets the parentIdsof the given auction house.getParentAuctionHouses(Id auctionHouseId) Gets the parents of the given auction house.Gets the root auction houseIdsin this hierarchy.Gets the root auction house in the auction house hierarchy.booleanhasChildAuctionHouses(Id auctionHouseId) Tests if an auction house has any children.booleanhasParentAuctionHouses(Id auctionHouseId) Tests if theAuctionHousehas any parents.booleanisAncestorOfAuctionHouse(Id id, Id auctionHouseId) Tests if anIdis an ancestor of an auction house.booleanisChildOfAuctionHouse(Id id, Id auctionHouseId) Tests if an auction house is a direct child of another.booleanisDescendantOfAuctionHouse(Id id, Id auctionHouseId) Tests if anIdis a descendant of an auction house.booleanisParentOfAuctionHouse(Id id, Id auctionHouseId) Tests if anIdis a direct parent of auction house.voidThe returns from the auction house methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidA complete view of theAuctionHousesreturns 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
-
getAuctionHouseHierarchyId
Id getAuctionHouseHierarchyId()Gets the hierarchyIdassociated with this session.- Returns:
- the hierarchy
Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getAuctionHouseHierarchy
Gets the hierarchy associated with this session.- Returns:
- the hierarchy associated with this session
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canAccessAuctionHouseHierarchy
boolean canAccessAuctionHouseHierarchy()Tests if this user can perform hierarchy queries. 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.- Returns:
falseif hierarchy traversal methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeAuctionHouseView
void useComparativeAuctionHouseView()The returns from the auction house 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.
-
usePlenaryAuctionHouseView
void usePlenaryAuctionHouseView()A complete view of theAuctionHousesreturns 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.
-
getRootAuctionHouseIds
Gets the root auction houseIdsin this hierarchy.- Returns:
- the root auction house
Ids - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getRootAuctionHouses
Gets the root auction house in the auction house hierarchy. A item with no parents is an orphan. While all auction houseIdsare known to the hierarchy, an orphan does not appear in the hierarchy unless explicitly added as a root item or child of another item.- Returns:
- the root auction houses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
hasParentAuctionHouses
boolean hasParentAuctionHouses(Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if theAuctionHousehas any parents.- Parameters:
auctionHouseId- an auction houseId- Returns:
trueif the auction house has parents, falseotherwise- Throws:
NotFoundException-auctionHouseIdis not foundNullArgumentException-auctionHouseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isParentOfAuctionHouse
boolean isParentOfAuctionHouse(Id id, Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if anIdis a direct parent of auction house.- Parameters:
id- anIdauctionHouseId- theIdof an auction house- Returns:
trueif thisidis a parent ofauctionHouseId, falseotherwise- Throws:
NotFoundException-auctionHouseIdis not foundNullArgumentException-idorauctionHouseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.- Notes:
If- {@code id} not found return {@code false} .
-
getParentAuctionHouseIds
IdList getParentAuctionHouseIds(Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the parentIdsof the given auction house.- Parameters:
auctionHouseId- an auction houseId- Returns:
- the parent
Idsof the auction house - Throws:
NotFoundException-auctionHouseIdis not foundNullArgumentException-auctionHouseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getParentAuctionHouses
AuctionHouseList getParentAuctionHouses(Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the parents of the given auction house.- Parameters:
auctionHouseId- theIdto query- Returns:
- the parents of the auction house
- Throws:
NotFoundException-auctionHouseIdnot foundNullArgumentException-auctionHouseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isAncestorOfAuctionHouse
boolean isAncestorOfAuctionHouse(Id id, Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if anIdis an ancestor of an auction house.- Parameters:
id- anIdauctionHouseId- theIdof an auction house- Returns:
trueif thisidis an ancestor ofauctionHouseId,falseotherwise- Throws:
NotFoundException-auctionHouseIdnot foundNullArgumentException-auctionHouseIdoridisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.- Notes:
If- {@code id} not found return {@code false} .
-
hasChildAuctionHouses
boolean hasChildAuctionHouses(Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if an auction house has any children.- Parameters:
auctionHouseId- an auction houseId- Returns:
trueif theauctionHouseIdhas children,falseotherwise- Throws:
NotFoundException-auctionHouseIdnot foundNullArgumentException-auctionHouseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isChildOfAuctionHouse
boolean isChildOfAuctionHouse(Id id, Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if an auction house is a direct child of another.- Parameters:
id- anIdauctionHouseId- theIdof an auction house- Returns:
trueif theidis a child ofauctionHouseId,falseotherwise- Throws:
NotFoundException-auctionHouseIdnot foundNullArgumentException-idorauctionHouseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.- Notes:
If- {@code id} not found return {@code false} .
-
getChildAuctionHouseIds
IdList getChildAuctionHouseIds(Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the childIdsof the given auction house.- Parameters:
auctionHouseId- theIdto query- Returns:
- the children of the auction house
- Throws:
NotFoundException-auctionHouseIdnot foundNullArgumentException-auctionHouseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getChildAuctionHouses
AuctionHouseList getChildAuctionHouses(Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the children of the given auction house.- Parameters:
auctionHouseId- theIdto query- Returns:
- the children of the auction house
- Throws:
NotFoundException-auctionHouseIdnot foundNullArgumentException-auctionHouseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isDescendantOfAuctionHouse
boolean isDescendantOfAuctionHouse(Id id, Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException Tests if anIdis a descendant of an auction house.- Parameters:
id- anIdauctionHouseId- theIdof an auction house- Returns:
trueif theidis a descendant of theauctionHouseId,falseotherwise- Throws:
NotFoundException-auctionHouseIdnot foundNullArgumentException-idorauctionHouseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.- Notes:
If- {@code id} is not found return {@code false} .
-
getAuctionHouseNodeIds
Node getAuctionHouseNodeIds(Id auctionHouseId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets a portion of the hierarchy for the given auction house.- Parameters:
auctionHouseId- theIdto queryancestorLevels- the maximum number of ancestor levels to include. A value of 0 returns no parents in the item.descendantLevels- the maximum number of descendant levels to include. A value of 0 returns no children in the item.includeSiblings-trueto include the siblings of the given item,falseto omit the siblings- Returns:
- an auction house node
- Throws:
NotFoundException-auctionHouseIdnot foundNullArgumentException-auctionHouseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAuctionHouseNodes
AuctionHouseNode getAuctionHouseNodes(Id auctionHouseId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets a portion of the hierarchy for the given auction house.- Parameters:
auctionHouseId- theIdto queryancestorLevels- the maximum number of ancestor levels to include. A value of 0 returns no parents in the item.descendantLevels- the maximum number of descendant levels to include. A value of 0 returns no children in the item.includeSiblings-trueto include the siblings of the given item,falseto omit the siblings- Returns:
- an auction house node
- Throws:
NotFoundException-auctionHouseIdnot foundNullArgumentException-auctionHouseIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-