public interface AuctionHouseHierarchySession extends OsidSession
This session defines methods for traversing a hierarchy of
AuctionHouse
objects. 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.
Modifier and Type | Method and Description |
---|---|
boolean |
canAccessAuctionHouseHierarchy()
Tests if this user can perform hierarchy queries.
|
Hierarchy |
getAuctionHouseHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getAuctionHouseHierarchyId()
Gets the hierarchy
Id associated with this session. |
Node |
getAuctionHouseNodeIds(Id auctionHouseId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given auction house.
|
AuctionHouseNode |
getAuctionHouseNodes(Id auctionHouseId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given auction house.
|
IdList |
getChildAuctionHouseIds(Id auctionHouseId)
Gets the child
Ids of the given auction house. |
AuctionHouseList |
getChildAuctionHouses(Id auctionHouseId)
Gets the children of the given auction house.
|
IdList |
getParentAuctionHouseIds(Id auctionHouseId)
Gets the parent
Ids of the given auction house. |
AuctionHouseList |
getParentAuctionHouses(Id auctionHouseId)
Gets the parents of the given auction house.
|
IdList |
getRootAuctionHouseIds()
Gets the root auction house
Ids in this hierarchy. |
AuctionHouseList |
getRootAuctionHouses()
Gets the root auction house in the auction house hierarchy.
|
boolean |
hasChildAuctionHouses(Id auctionHouseId)
Tests if an auction house has any children.
|
boolean |
hasParentAuctionHouses(Id auctionHouseId)
Tests if the
AuctionHouse has any parents. |
boolean |
isAncestorOfAuctionHouse(Id id,
Id auctionHouseId)
Tests if an
Id is an ancestor of an auction house. |
boolean |
isChildOfAuctionHouse(Id id,
Id auctionHouseId)
Tests if an auction house is a direct child of another.
|
boolean |
isDescendantOfAuctionHouse(Id id,
Id auctionHouseId)
Tests if an
Id is a descendant of an auction house. |
boolean |
isParentOfAuctionHouse(Id id,
Id auctionHouseId)
Tests if an
Id is a direct parent of auction house. |
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.
|
void |
usePlenaryAuctionHouseView()
A complete view of the
Auction Houses returns is
desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getAuctionHouseHierarchyId()
Id
associated with this session. Id
associated with this sessionmandatory
- This method must be implemented. Hierarchy getAuctionHouseHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canAccessAuctionHouseHierarchy()
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer lookup operations. false
if hierarchy traversal methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void useComparativeAuctionHouseView()
mandatory
- This method is must be implemented. void usePlenaryAuctionHouseView()
Auction Houses
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.mandatory
- This method is must be implemented. IdList getRootAuctionHouseIds() throws OperationFailedException, PermissionDeniedException
Ids
in this hierarchy. Ids
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AuctionHouseList getRootAuctionHouses() throws OperationFailedException, PermissionDeniedException
Ids
are known to the hierarchy, an orphan does not appear in the
hierarchy unless explicitly added as a root item or child of another
item.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. boolean hasParentAuctionHouses(Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException
AuctionHouse
has any parents.auctionHouseId
- an auction house Id
true
if the auction house has parents, f
alse
otherwiseNotFoundException
- auctionHouseId
is
not foundNullArgumentException
- auctionHouseId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isParentOfAuctionHouse(Id id, Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is a direct parent of auction house.id
- an Id
auctionHouseId
- the Id
of an auction house true
if this id
is a parent of
auctionHouseId,
f alse
otherwiseNotFoundException
- auctionHouseId
is
not foundNullArgumentException
- id
or
auctionHouseId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
IdList getParentAuctionHouseIds(Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids
of the given auction house.auctionHouseId
- an auction house Id
Ids
of the auction houseNotFoundException
- auctionHouseId
is
not foundNullArgumentException
- auctionHouseId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AuctionHouseList getParentAuctionHouses(Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException
auctionHouseId
- the Id
to queryNotFoundException
- auctionHouseId
not
foundNullArgumentException
- auctionHouseId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isAncestorOfAuctionHouse(Id id, Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is an ancestor of an auction house.id
- an Id
auctionHouseId
- the Id
of an auction house tru
e if this id
is an ancestor
of auctionHouseId,
false
otherwiseNotFoundException
- auctionHouseId
not
foundNullArgumentException
- auctionHouseId
or id
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
boolean hasChildAuctionHouses(Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException
auctionHouseId
- an auction house Id
true
if the auctionHouseId
has
children, false
otherwiseNotFoundException
- auctionHouseId
not
foundNullArgumentException
- auctionHouseId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isChildOfAuctionHouse(Id id, Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id
- an Id
auctionHouseId
- the Id
of an auction house true
if the id
is a child of
auctionHouseId,
false
otherwiseNotFoundException
- auctionHouseId
not
foundNullArgumentException
- id
or
auctionHouseId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
not found return false.
IdList getChildAuctionHouseIds(Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids
of the given auction house.auctionHouseId
- the Id
to queryNotFoundException
- auctionHouseId
not
foundNullArgumentException
- auctionHouseId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AuctionHouseList getChildAuctionHouses(Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException
auctionHouseId
- the Id
to queryNotFoundException
- auctionHouseId
not
foundNullArgumentException
- auctionHouseId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean isDescendantOfAuctionHouse(Id id, Id auctionHouseId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
is a descendant of an auction house.id
- an Id
auctionHouseId
- the Id
of an auction house true
if the id
is a descendant
of the auctionHouseId,
false
otherwiseNotFoundException
- auctionHouseId
not
foundNullArgumentException
- id
or
auctionHouseId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. If
- id
is not found return false.
Node getAuctionHouseNodeIds(Id auctionHouseId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
auctionHouseId
- the Id
to 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
- true
to include the siblings of
the given item, false
to omit the siblingsNotFoundException
- auctionHouseId
not
foundNullArgumentException
- auctionHouseId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AuctionHouseNode getAuctionHouseNodes(Id auctionHouseId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
auctionHouseId
- the Id
to 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
- true
to include the siblings of
the given item, false
to omit the siblingsNotFoundException
- auctionHouseId
not
foundNullArgumentException
- auctionHouseId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.