public interface BillingHierarchySession extends OsidSession
This session defines methods for traversing a hierarchy of
Billing objects. Each node in the hierarchy is a unique
Billing. The hierarchy may be traversed recursively to establish
the tree structure through getParentBillings() and
getChildBillings(). To relate these Ids to another
OSID, getBillingNodes() can be used for retrievals that can
be used for bulk lookups in other OSIDs. Any Billing
available in the Acknowledgement OSID is known to this hierarchy but does
not appear in the hierarchy traversal until added as a root node or a
child of another node.
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 getParentBillings() or getChildBillings()
in lieu of a PERMISSION_DENIED error that may disrupt the
traversal through authorized pathways.
This session defines views that offer differing behaviors when retrieving multiple objects.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canAccessBillingHierarchy()
Tests if this user can perform hierarchy queries.
|
Hierarchy |
getBillingHierarchy()
Gets the hierarchy associated with this session.
|
Id |
getBillingHierarchyId()
Gets the hierarchy
Id associated with this session. |
Node |
getBillingNodeIds(Id billingId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given billing.
|
BillingNode |
getBillingNodes(Id billingId,
long ancestorLevels,
long descendantLevels,
boolean includeSiblings)
Gets a portion of the hierarchy for the given billing.
|
IdList |
getChildBillingIds(Id billingId)
Gets the child
Ids of the given billing. |
BillingList |
getChildBillings(Id billingId)
Gets the child billings of the given
id. |
IdList |
getParentBillingIds(Id billingId)
Gets the parent
Ids of the given billing. |
BillingList |
getParentBillings(Id billingId)
Gets the parent billings of the given
id. |
IdList |
getRootBillingIds()
Gets the root billing
Ids in this hierarchy. |
BillingList |
getRootBillings()
Gets the root billings in the billing hierarchy.
|
boolean |
hasChildBillings(Id billingId)
Tests if a billing has any children.
|
boolean |
hasParentBillings(Id billingId)
Tests if the
Billing has any parents. |
boolean |
isAncestorOfBilling(Id id,
Id billingId)
Tests if an
Id is an ancestor of a billing. |
boolean |
isChildOfBilling(Id id,
Id billingId)
Tests if a billing is a direct child of another.
|
boolean |
isDescendantOfBilling(Id id,
Id billingId)
Tests if an
Id is a descendant of a billing. |
boolean |
isParentOfBilling(Id id,
Id billingId)
Tests if an
Id is a direct parent of billing. |
void |
useComparativeBillingView()
The returns from the billing methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
usePlenaryBillingView()
A complete view of the
Billing returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getBillingHierarchyId()
Id associated with this session. Id associated with this sessionmandatory - This method must be implemented. Hierarchy getBillingHierarchy() throws OperationFailedException, PermissionDeniedException
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canAccessBillingHierarchy()
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 useComparativeBillingView()
mandatory - This method is must be implemented. void usePlenaryBillingView()
Billing 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 getRootBillingIds() throws OperationFailedException, PermissionDeniedException
Ids in this hierarchy. Ids OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BillingList getRootBillings() throws OperationFailedException, PermissionDeniedException
Ids are known
to the hierarchy, an orphan does not appear in the hierarchy unless
explicitly added as a root node or child of another node.OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method is must be implemented. boolean hasParentBillings(Id billingId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Billing has any parents.billingId - a billing Id true if the billing has parents, f alse
otherwiseNotFoundException - billingId is not
foundNullArgumentException - billingId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isParentOfBilling(Id id, Id billingId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is a direct parent of billing.id - an Id billingId - the Id of a billing true if this id is a parent of
billingId, f alse otherwiseNotFoundException - billingId is not
foundNullArgumentException - id or
billingId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. IdList getParentBillingIds(Id billingId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids of the given billing.billingId - a billing Id Ids of the billingNotFoundException - billingId is not
foundNullArgumentException - billingId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BillingList getParentBillings(Id billingId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id. billingId - the Id of the Billing
to query id NotFoundException - a Billing identified
by Id is not foundNullArgumentException - billingId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isAncestorOfBilling(Id id, Id billingId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is an ancestor of a billing.id - an Id billingId - the Id of a billing tru e if this id is an ancestor
of billingId, false otherwiseNotFoundException - billingId is not
foundNullArgumentException - id or
billingId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. boolean hasChildBillings(Id billingId) throws NotFoundException, OperationFailedException, PermissionDeniedException
billingId - a billing Id true if the billingId has
children, false otherwiseNotFoundException - billingId is not
foundNullArgumentException - bobillingId is null okId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isChildOfBilling(Id id, Id billingId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id - an Id billingId - the Id of a billing true if the id is a child of
billingId, false otherwiseNotFoundException - billingId is not
foundNullArgumentException - id or
billingId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id not found return false. IdList getChildBillingIds(Id billingId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids of the given billing.billingId - the Id to queryNotFoundException - billingId is not
foundNullArgumentException - billingId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BillingList getChildBillings(Id billingId) throws NotFoundException, OperationFailedException, PermissionDeniedException
id. billingId - the Id of the Billing
to query id NotFoundException - a Billing identified
by Id is not foundNullArgumentException - billingId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean isDescendantOfBilling(Id id, Id billingId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id is a descendant of a billing.id - an Id billingId - the Id of a billing true if the id is a descendant
of the billingId, false
otherwiseNotFoundException - billingId is not
foundNullArgumentException - id or
billingId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. If - id is not found return false. Node getBillingNodeIds(Id billingId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
billingId - the Id to queryancestorLevels - the maximum number of ancestor levels to
include. A value of 0 returns no parents in the node.descendantLevels - the maximum number of descendant levels to
include. A value of 0 returns no children in the node.includeSiblings - true to include the siblings of
the given node, false to omit the siblingsNotFoundException - billingId is not
foundNullArgumentException - billingId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. BillingNode getBillingNodes(Id billingId, long ancestorLevels, long descendantLevels, boolean includeSiblings) throws NotFoundException, OperationFailedException, PermissionDeniedException
billingId - the Id to queryancestorLevels - the maximum number of ancestor levels to
include. A value of 0 returns no parents in the node.descendantLevels - the maximum number of descendant levels to
include. A value of 0 returns no children in the node.includeSiblings - true to include the siblings of
the given node, false to omit the siblingsNotFoundException - billingId is not
foundNullArgumentException - billingId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.