public interface CreditLookupSession extends OsidSession
This session defines methods for retrieving credits.
This lookup session defines several views:
CreditAdminSession.
The methods useFederatedBillingView()
and
useIsolatedBillingView()
behave as a radio group and one should be
selected before invoking any lookup methods.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupCredits()
Tests if this user can examine this billing.
|
Billing |
getBilling()
Gets the
Billing associated with this session. |
Id |
getBillingId()
Gets the
Billing Id associated with this
session. |
Credit |
getCredit(Id creditId)
Gets the
Credit specified by its Id. |
CreditList |
getCredits()
Gets all credits.
|
CreditList |
getCreditsByGenusType(Type creditGenusType)
Gets a
CreditList corresponding to the given credit
genus Type which does not include credits of types
derived from the specified Type. |
CreditList |
getCreditsByGenusTypeForReference(Id referenceId,
Type creditGenusType)
Gets a list of credits by a genus type for a reference.
|
CreditList |
getCreditsByGenusTypeForReferenceOnDate(Id referenceId,
Type creditGenusType,
DateTime from,
DateTime to)
Gets a list of credits of the given genus type for a reference and
effective entire given date range inclusive but not confined to the
date range.
|
CreditList |
getCreditsByGenusTypeForResource(Id resourceId,
Type creditGenusType)
Gets a list of credits by a genus type for a resource.
|
CreditList |
getCreditsByGenusTypeForResourceAndReference(Id resourceId,
Id referenceId,
Type creditGenusType)
Gets a
CreditList of the given genus type for the given
resource and reference. |
CreditList |
getCreditsByGenusTypeForResourceAndReferenceOnDate(Id resourceId,
Id referenceId,
Type creditGenusType,
DateTime from,
DateTime to)
Gets a
CreditList of the given genus type corresponding
to the given resource and reference and effective entire given date
range inclusive but not confined to the date range. |
CreditList |
getCreditsByGenusTypeForResourceOnDate(Id resourceId,
Type creditGenusType,
DateTime from,
DateTime to)
Gets a list of credits by genus type for a resource and effective
during the entire given date range inclusive but not confined to the
date range.
|
CreditList |
getCreditsByGenusTypeOnDate(Type creditGenusType,
DateTime from,
DateTime to)
Gets a list of credits of the given genus type and effective entire
given date range inclusive but not confined to the date range.
|
CreditList |
getCreditsByIds(IdList creditIds)
Gets a
CreditList corresponding to the given
IdList. |
CreditList |
getCreditsByParentGenusType(Type creditGenusType)
Gets a
CreditList corresponding to the given credit
genus Type and include any additional credits with
genus types derived from the specified Type. |
CreditList |
getCreditsByRecordType(Type creditRecordType)
Gets a
CreditList containing the given credit record
Type. |
CreditList |
getCreditsForReference(Id referenceId)
Gets a
CreditList for the given reference Id. |
CreditList |
getCreditsForReferenceOnDate(Id referenceId,
DateTime from,
DateTime to)
Gets a list of credits for a reference and effective entire given date
range inclusive but not confined to the date range.
|
CreditList |
getCreditsForResource(Id resourceId)
Gets a
CreditList for the given resource Id. |
CreditList |
getCreditsForResourceAndReference(Id resourceId,
Id referenceId)
Gets a
CreditList for the given resource and reference. |
CreditList |
getCreditsForResourceAndReferenceOnDate(Id resourceId,
Id referenceId,
DateTime from,
DateTime to)
Gets a
CreditList corresponding to the given resource
and reference and effective entire given date range inclusive but not
confined to the date range. |
CreditList |
getCreditsForResourceOnDate(Id resourceId,
DateTime from,
DateTime to)
Gets a list of credits for a resource and effective during the entire
given date range inclusive but not confined to the date range.
|
CreditList |
getCreditsOnDate(DateTime from,
DateTime to)
Gets a
CreditList effective during the entire given
date range inclusive but not confined to the date range. |
void |
useAnyEffectiveCreditView()
All credits of any effective dates are returned by methods in this
session.
|
void |
useComparativeCreditView()
The returns from the lookup methods may omit or translate elements
based on this session, such as authorization, and not result in an
error.
|
void |
useEffectiveCreditView()
Only credits whose effective dates are current are returned by methods
in this session.
|
void |
useFederatedBillingView()
Federates the view for methods in this session.
|
void |
useIsolatedBillingView()
Isolates the view for methods in this session.
|
void |
usePlenaryCreditView()
A complete view of the
Credit returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getBillingId()
Billing
Id
associated with this
session. Billing Id
associated with this sessionmandatory
- This method must be implemented. Billing getBilling() throws OperationFailedException, PermissionDeniedException
Billing
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupCredits()
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer these operations. false
if billing reading methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void useComparativeCreditView()
mandatory
- This method is must be implemented. void usePlenaryCreditView()
Credit
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. void useFederatedBillingView()
mandatory
- This method is must be implemented. void useIsolatedBillingView()
mandatory
- This method is must be implemented. void useEffectiveCreditView()
mandatory
- This method is must be implemented. void useAnyEffectiveCreditView()
mandatory
- This method is must be implemented. Credit getCredit(Id creditId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Credit
specified by its Id.
In plenary mode, the exact Id
is found
or a NOT_FOUND
results. Otherwise, the returned
Credit
may have a different Id
than requested,
such as the case where a duplicate Id
was assigned to a
Credit
and retained for compatibility.
In effective mode, credits are returned that are currently effective.
In any effective mode, effective credits and those currently expired
are returned.creditId
- the Id
of the Credit
to
retrieve Credit
NotFoundException
- no Credit
found with
the given Id
NullArgumentException
- creditId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CreditList getCreditsByIds(IdList creditIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
CreditList
corresponding to the given
IdList.
In plenary mode, the returned list contains all of the
credits specified in the Id
list, in the order of the
list, including duplicates, or an error results if an Id
in the supplied list is not found or inaccessible. Otherwise,
inaccessible credits may be omitted from the list and may present the
elements in any order including returning a unique set.
In effective mode, credits are returned that are currently effective.
In any effective mode, effective credits and those currently expired
are returned.creditIds
- the list of Ids
to retrieve Credit list
NotFoundException
- an Id was
not foundNullArgumentException
- creditIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CreditList getCreditsByGenusType(Type creditGenusType) throws OperationFailedException, PermissionDeniedException
CreditList
corresponding to the given credit
genus Type
which does not include credits of types
derived from the specified Type.
In plenary mode, the returned list contains all known
credits or an error results. Otherwise, the returned list may contain
only those credits that are accessible through this session.
In effective mode, credits are returned that are currently effective.
In any effective mode, effective credits and those currently expired
are returned.creditGenusType
- a credits genus type Credit list
NullArgumentException
- creditGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CreditList getCreditsByParentGenusType(Type creditGenusType) throws OperationFailedException, PermissionDeniedException
CreditList
corresponding to the given credit
genus Type
and include any additional credits with
genus types derived from the specified Type.
In plenary mode, the returned list contains all known
credits or an error results. Otherwise, the returned list may contain
only those credits that are accessible through this session.
In effective mode, credits are returned that are currently effective.
In any effective mode, effective credits and those currently expired
are returned.creditGenusType
- a credit genus type Credit list
NullArgumentException
- creditGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CreditList getCreditsByRecordType(Type creditRecordType) throws OperationFailedException, PermissionDeniedException
CreditList
containing the given credit record
Type.
In plenary mode, the returned list contains all known credits or an
error results. Otherwise, the returned list may contain only those
credits that are accessible through this session.
In effective mode, credits are returned that are currently effective.
In any effective mode, effective credits and those currently expired
are returned.creditRecordType
- a credit record type CreditList
NullArgumentException
- creditRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CreditList getCreditsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
CreditList
effective during the entire given
date range inclusive but not confined to the date range.
In plenary mode, the returned list contains all known credits or an
error results. Otherwise, the returned list may contain only those
credits that are accessible through this session.
In effective mode, credits are returned that are currently effective
in addition to being effective in the given date range. In any
effective mode, effective credits and those currently expired are
returned.from
- start of date rangeto
- end of date range CreditList
InvalidArgumentException
- from
is
greater than to
NullArgumentException
- from or to
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CreditList getCreditsByGenusTypeOnDate(Type creditGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
creditGenusType
- a credit genus Type
from
- start of date rangeto
- end of date range CreditList
InvalidArgumentException
- from
is
greater than to
NullArgumentException
- creditGenusType, from,
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CreditList getCreditsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
CreditList
for the given resource Id.
In plenary mode, the returned list contains all of the
credits corresponding to the given peer, including duplicates, or an
error results if a credit is inaccessible. Otherwise, inaccessible
Credits
may be omitted from the list.
In effective mode, credits are returned that are currently effective.
In any effective mode, effective credits and those currently expired
are returned.resourceId
- the Id
of the resource CreditList
NullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CreditList getCreditsForResourceOnDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
resourceId
- a resource Id
from
- start of date rangeto
- end of date range CreditList
InvalidArgumentException
- from
is
greater than to
NullArgumentException
- resourceId, from,
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CreditList getCreditsByGenusTypeForResource(Id resourceId, Type creditGenusType) throws OperationFailedException, PermissionDeniedException
resourceId
- a resource Id
creditGenusType
- a credit genus Type
CreditList
NullArgumentException
- creditGenusType
or resourceId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CreditList getCreditsByGenusTypeForResourceOnDate(Id resourceId, Type creditGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
resourceId
- a resource Id
creditGenusType
- a credit genus Type
from
- start of date rangeto
- end of date range CreditList
InvalidArgumentException
- from
is
greater than to
NullArgumentException
- resourceId,
creditGenusType, from,
or to
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CreditList getCreditsForReference(Id referenceId) throws OperationFailedException, PermissionDeniedException
CreditList
for the given reference Id.
In plenary mode, the returned list contains all of the
credits corresponding to the given peer, including duplicates, or an
error results if a credit is inaccessible. Otherwise, inaccessible
Credits
may be omitted from the list.
In effective mode, credits are returned that are currently effective.
In any effective mode, effective credits and those currently expired
are returned.referenceId
- a reference Id
CreditList
NullArgumentException
- referenceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CreditList getCreditsForReferenceOnDate(Id referenceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
referenceId
- a reference Id
from
- start of date rangeto
- end of date range CreditList
InvalidArgumentException
- from
is
greater than to
NullArgumentException
- referenceId, from,
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CreditList getCreditsByGenusTypeForReference(Id referenceId, Type creditGenusType) throws OperationFailedException, PermissionDeniedException
referenceId
- a reference Id
creditGenusType
- a credit genus Type
CreditList
NullArgumentException
- referenceId
or
creditGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CreditList getCreditsByGenusTypeForReferenceOnDate(Id referenceId, Type creditGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
referenceId
- a reference Id
creditGenusType
- a credit genus Type
from
- start of date rangeto
- end of date range CreditList
InvalidArgumentException
- from
is
greater than to
NullArgumentException
- referenceId,
creditGenusType, from,
or to
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CreditList getCreditsForResourceAndReference(Id resourceId, Id referenceId) throws OperationFailedException, PermissionDeniedException
CreditList
for the given resource and reference.
In plenary mode, the returned list contains all of the credits
corresponding to the given resource and reference, including
duplicates, or an error results if a credit is inaccessible.
Otherwise, inaccessible Credits
may be omitted from the
list.
In effective mode, credits are returned that are currently effective.
In any effective mode, effective credits and those currently expired
are returned.resourceId
- a resource Id
referenceId
- a reference Id
CreditList
NullArgumentException
- resourceId
or
referenceId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CreditList getCreditsForResourceAndReferenceOnDate(Id resourceId, Id referenceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
CreditList
corresponding to the given resource
and reference and effective entire given date range inclusive but not
confined to the date range.
In plenary mode, the returned list contains all of the credits
corresponding to the given peer, including duplicates, or an error
results if a credit is inaccessible. Otherwise, inaccessible
Credits
may be omitted from the list.
In effective mode, credits are returned that are currently effective.
In any effective mode, effective credits and those currently expired
are returned.resourceId
- a resource Id
referenceId
- a reference Id
from
- start of date rangeto
- end of date range CreditList
InvalidArgumentException
- from
is
greater than to
NullArgumentException
- resourceId
or
referenceId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CreditList getCreditsByGenusTypeForResourceAndReference(Id resourceId, Id referenceId, Type creditGenusType) throws OperationFailedException, PermissionDeniedException
CreditList
of the given genus type for the given
resource and reference.
In plenary mode, the returned list contains all of the credits
corresponding to the given resource and reference, including
duplicates, or an error results if a credit is inaccessible.
Otherwise, inaccessible Credits
may be omitted from the
list.
In effective mode, credits are returned that are currently effective.
In any effective mode, effective credits and those currently expired
are returned.resourceId
- a resource Id
referenceId
- a reference Id
creditGenusType
- a credit genus Type
CreditList
NullArgumentException
- resourceId,
referenceId,
or creditGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CreditList getCreditsByGenusTypeForResourceAndReferenceOnDate(Id resourceId, Id referenceId, Type creditGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
CreditList
of the given genus type corresponding
to the given resource and reference and effective entire given date
range inclusive but not confined to the date range.
In plenary mode, the returned list contains all of the credits
corresponding to the given peer, including duplicates, or an error
results if a credit is inaccessible. Otherwise, inaccessible
Credits
may be omitted from the list.
In effective mode, credits are returned that are currently effective
in addition to being effective in the given date range. In any
effective mode, effective credits and those currently expired are
returned.resourceId
- a resource Id
referenceId
- a reference Id
creditGenusType
- a credit genus Type
from
- start of date rangeto
- end of date range CreditList
InvalidArgumentException
- from
is
greater than to
NullArgumentException
- resourceId, referenceId,
creditGenusType,
from,
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. CreditList getCredits() throws OperationFailedException, PermissionDeniedException
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.