public interface AuthorizationLookupSession extends OsidSession
This session defines methods to search and retrieve
Authorization
mappings.
This lookup session defines two sets of views:
Authorizations
defined
explicitly in the current Vault.
Using an isolated view
is useful for managing Authorizations
with the
AuthorizationAdminSession.
Resource
groups or Qualifier
hierarchies. Resource
groups or Qualifier
hierarchies. The methods useExplicitAuthorizationView()
and
useImplicitAuthorizationView()
behave as a radio group and one
should be selected before invoking any lookup methods.
Modifier and Type | Method and Description |
---|---|
boolean |
canLookupAuthorizations()
Tests if this user can perform authorization lookups.
|
Authorization |
getAuthorization(Id authorizationId)
Gets the
Authorization specified by its Id. |
AuthorizationList |
getAuthorizations()
Geta all
Authorizations. |
AuthorizationList |
getAuthorizationsByGenusType(Type authorizationGenusType)
Gets an
AuthorizationList corresponding to the given
authorization genus Type which does not include
authorizations of genus types derived from the specified Type. |
AuthorizationList |
getAuthorizationsByIds(IdList authorizationIds)
Gets an
AuthorizationList corresponding to the given
IdList. |
AuthorizationList |
getAuthorizationsByParentGenusType(Type authorizationGenusType)
Gets an
AuthorizationList corresponding to the given
authorization genus Type and include authorizations of
genus types derived from the specified Type. |
AuthorizationList |
getAuthorizationsByQualifier(Id qualifierId)
Gets a list of
Authorizations associated with a given
qualifier. |
AuthorizationList |
getAuthorizationsByRecordType(Type authorizationRecordType)
Gets an
AuthorizationList containing the given
authorization record Type. |
AuthorizationList |
getAuthorizationsForAgent(Id agentId)
Gets a list of
Authorizations associated with a given
agent. |
AuthorizationList |
getAuthorizationsForAgentAndFunction(Id agentId,
Id functionId)
Gets a list of
Authorizations associated with a given
agent. |
AuthorizationList |
getAuthorizationsForAgentAndFunctionOnDate(Id agentId,
Id functionId,
DateTime from,
DateTime to)
Gets an
AuthorizationList for the given agent and
effective during the entire given date range inclusive but not
confined to the date range. |
AuthorizationList |
getAuthorizationsForAgentOnDate(Id agentId,
DateTime from,
DateTime to)
Gets an
AuthorizationList for the given 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 authorizations
or an error results. |
AuthorizationList |
getAuthorizationsForFunction(Id functionId)
Gets a list of
Authorizations associated with a given
function. |
AuthorizationList |
getAuthorizationsForFunctionOnDate(Id functionId,
DateTime from,
DateTime to)
Gets an
AuthorizationList for the given function 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 authorizations
or an error results. |
AuthorizationList |
getAuthorizationsForResource(Id resourceId)
Gets a list of
Authorizations associated with a given
resource. |
AuthorizationList |
getAuthorizationsForResourceAndFunction(Id resourceId,
Id functionId)
Gets a list of
Authorizations associated with a given
resource. |
AuthorizationList |
getAuthorizationsForResourceAndFunctionOnDate(Id resourceId,
Id functionId,
DateTime from,
DateTime to)
Gets an
AuthorizationList effective during the entire
given date range inclusive but not confined to the date range. |
AuthorizationList |
getAuthorizationsForResourceOnDate(Id resourceId,
DateTime from,
DateTime to)
Gets an
AuthorizationList effective during the entire
given date range inclusive but not confined to the date range. |
AuthorizationList |
getAuthorizationsOnDate(DateTime from,
DateTime to)
Gets an
AuthorizationList effective during the entire
given date range inclusive but not confined to the date range. |
Authorization |
getExplicitAuthorization(Id authorizationId)
Gets the explicit
Authorization that generated the
given implicit authorization. |
Vault |
getVault()
Gets the
Vault associated with this session. |
Id |
getVaultId()
Gets the
Vault Id associated with this
session. |
void |
useAnyEffectiveAuthorizationView()
All authorizations of any effective dates are returned by all methods
in this session.
|
void |
useComparativeAuthorizationView()
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 |
useEffectiveAuthorizationView()
Only authorizations whose effective dates are current are returned by
methods in this session.
|
void |
useExplicitAuthorizationView()
Sets the view for methods in this session to explicit authorizations.
|
void |
useFederatedVaultView()
Federates the view for methods in this session.
|
void |
useImplicitAuthorizationView()
Sets the view for methods in this session to implicit authorizations.
|
void |
useIsolatedVaultView()
Isolates the view for methods in this session.
|
void |
usePlenaryAuthorizationView()
A complete view of the
Authorization returns is
desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getVaultId()
Vault
Id
associated with this
session. Vault Id
associated with this sessionmandatory
- This method must be implemented. Vault getVault() throws OperationFailedException, PermissionDeniedException
Vault
associated with this session. Vault
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canLookupAuthorizations()
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer lookup operations to
unauthorized users. false
if lookup methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeAuthorizationView()
mandatory
- This method is must be implemented. void usePlenaryAuthorizationView()
Authorization
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 useFederatedVaultView()
mandatory
- This method is must be implemented. void useIsolatedVaultView()
mandatory
- This method is must be implemented. void useEffectiveAuthorizationView()
mandatory
- This method is must be implemented. void useAnyEffectiveAuthorizationView()
mandatory
- This method is must be implemented. void useImplicitAuthorizationView()
Qualifier,
Function
or Resource
hierarchies. This method
is the opposite of explicitAuthorizationView().
mandatory
- This method is must be implemented. void useExplicitAuthorizationView()
implicitAuthorizationView().
mandatory
- This method is must be implemented. Authorization getAuthorization(Id authorizationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Authorization
specified by its Id.
In plenary mode, the exact Id
is found or a
NOT_FOUND
results. Otherwise, the returned
Authorization
may have a different Id
than
requested, such as the case where a duplicate Id
was
assigned to an Authorization
and retained for
compatibility.authorizationId
- the Id
of the
Authorization
to retrieve Authorization
NotFoundException
- no Authorization
found with the given Id
NullArgumentException
- authorizationId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AuthorizationList getAuthorizationsByIds(IdList authorizationIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
AuthorizationList
corresponding to the given
IdList.
In plenary mode, the returned list contains all
of the authorizations 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 Authorizations
may be omitted
from the list and may present the elements in any order including
returning a unique set.authorizationIds
- the list of Ids
to retrieve Authorization list
NotFoundException
- an Id was
not foundNullArgumentException
- authorizationIds
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AuthorizationList getAuthorizationsByGenusType(Type authorizationGenusType) throws OperationFailedException, PermissionDeniedException
AuthorizationList
corresponding to the given
authorization genus Type
which does not include
authorizations of genus types derived from the specified Type.
In plenary mode, the returned list contains all known
authorizations or an error results. Otherwise, the returned list may
contain only those authorizations that are accessible through this
session.authorizationGenusType
- an authorization genus type Authorization
listNullArgumentException
- authorizationGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failure
occurredmandatory
- This method must be implemented. AuthorizationList getAuthorizationsByParentGenusType(Type authorizationGenusType) throws OperationFailedException, PermissionDeniedException
AuthorizationList
corresponding to the given
authorization genus Type
and include authorizations of
genus types derived from the specified Type.
In plenary
mode, the returned list contains all known authorizations or an error
results. Otherwise, the returned list may contain only those
authorizations that are accessible through this session.authorizationGenusType
- an authorization genus type Authorization
listNullArgumentException
- authorizationGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failure
occurredmandatory
- This method must be implemented. AuthorizationList getAuthorizationsByRecordType(Type authorizationRecordType) throws OperationFailedException, PermissionDeniedException
AuthorizationList
containing the given
authorization record Type.
In plenary mode, the
returned list contains all known authorizations or an error results.
Otherwise, the returned list may contain only those authorizations
that are accessible through this session.authorizationRecordType
- an authorization record type Authorization
listNullArgumentException
- authorizationRecordType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failure
occurredmandatory
- This method must be implemented. AuthorizationList getAuthorizationsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
AuthorizationList
effective during the entire
given date range inclusive but not confined to the date range.
In plenary mode, the returned list contains all known
authorizations or an error results. Otherwise, the returned list may
contain only those authorizations that are accessible through this
session.
In effective mode, authorizations are returned that are currently
effective. In any effective mode, active authorizations and those
currently expired are returned.from
- starting dateto
- ending date Authorization
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- from
or
to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failure
occurredmandatory
- This method must be implemented. AuthorizationList getAuthorizationsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
Authorizations
associated with a given
resource. Authorizations related to the given resource, including
those related through an Agent,
are returned. In
plenary mode, the returned list contains all known authorizations or
an error results. Otherwise, the returned list may contain only those
authorizations that are accessible through this session.resourceId
- a resource Id
Authorization list
NullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AuthorizationList getAuthorizationsForResourceOnDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
AuthorizationList
effective during the entire
given date range inclusive but not confined to the date range.
Authorizations related to the given resource, including those related
through an Agent,
are returned.
In plenary mode, the returned list contains all known authorizations
or an error results. Otherwise, the returned list may contain only
those authorizations that are accessible through this session.
In effective mode, authorizations are returned that are currently
effective. In any effective mode, active authorizations and those
currently expired are returned.resourceId
- a resource Id
from
- starting dateto
- ending date Authorization
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- resourceId, from
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failure
occurredmandatory
- This method must be implemented. AuthorizationList getAuthorizationsForAgent(Id agentId) throws OperationFailedException, PermissionDeniedException
Authorizations
associated with a given
agent. In plenary mode, the returned list contains all known
authorizations or an error results. Otherwise, the returned list may
contain only those authorizations that are accessible through this
session.agentId
- an agent Id
Authorization list
NullArgumentException
- agentId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AuthorizationList getAuthorizationsForAgentOnDate(Id agentId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
AuthorizationList
for the given 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 authorizations
or an error results. Otherwise, the returned list may contain only
those authorizations that are accessible through this session.
In effective mode, authorizations are returned that are currently
effective. In any effective mode, active authorizations and those
currently expired are returned.agentId
- an agent Id
from
- starting dateto
- ending date Authorization
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- agentId, from
or
to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failure
occurredmandatory
- This method must be implemented. AuthorizationList getAuthorizationsForFunction(Id functionId) throws OperationFailedException, PermissionDeniedException
Authorizations
associated with a given
function. In plenary mode, the returned list contains all known
authorizations or an error results. Otherwise, the returned list may
contain only those authorizations that are accessible through this
session.functionId
- a function Id
Authorization list
NullArgumentException
- functionId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AuthorizationList getAuthorizationsForFunctionOnDate(Id functionId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
AuthorizationList
for the given function 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 authorizations
or an error results. Otherwise, the returned list may contain only
those authorizations that are accessible through this session.
In effective mode, authorizations are returned that are currently
effective. In any effective mode, active authorizations and those
currently expired are returned.functionId
- a function Id
from
- starting dateto
- ending date Authorization
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- functionId, from
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failure
occurredmandatory
- This method must be implemented. AuthorizationList getAuthorizationsForResourceAndFunction(Id resourceId, Id functionId) throws OperationFailedException, PermissionDeniedException
Authorizations
associated with a given
resource. Authorizations related to the given resource, including
those related through an Agent,
are returned. In
plenary mode, the returned list contains all known authorizations or
an error results. Otherwise, the returned list may contain only those
authorizations that are accessible through this session.resourceId
- a resource Id
functionId
- a function Id
Authorization list
NullArgumentException
- resourceId
or
functionId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AuthorizationList getAuthorizationsForResourceAndFunctionOnDate(Id resourceId, Id functionId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
AuthorizationList
effective during the entire
given date range inclusive but not confined to the date range.
Authorizations related to the given resource, including those related
through an Agent,
are returned.
In plenary mode, the returned list contains all known authorizations
or an error results. Otherwise, the returned list may contain only
those authorizations that are accessible through this session.
In effective mode, authorizations are returned that are currently
effective. In any effective mode, active authorizations and those
currently expired are returned.resourceId
- a resource Id
functionId
- a function Id
from
- starting dateto
- ending date Authorization
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- resourceId, functionId,
from
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failure
occurredmandatory
- This method must be implemented. AuthorizationList getAuthorizationsForAgentAndFunction(Id agentId, Id functionId) throws OperationFailedException, PermissionDeniedException
Authorizations
associated with a given
agent. Authorizations related to the given resource, including those
related through an Agent,
are returned. In plenary
mode, the returned list contains all known authorizations or an error
results. Otherwise, the returned list may contain only those
authorizations that are accessible through this session.agentId
- an agent Id
functionId
- a function Id
Authorization list
NullArgumentException
- agentId
or
functionId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AuthorizationList getAuthorizationsForAgentAndFunctionOnDate(Id agentId, Id functionId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
AuthorizationList
for the given 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 authorizations
or an error results. Otherwise, the returned list may contain only
those authorizations that are accessible through this session.
In effective mode, authorizations are returned that are currently
effective. In any effective mode, active authorizations and those
currently expired are returned.agentId
- an agent Id
functionId
- a function Id
from
- starting dateto
- ending date Authorization
listInvalidArgumentException
- from
is
greater than to
NullArgumentException
- agentId, functionId,
from
or to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failure
occurredmandatory
- This method must be implemented. AuthorizationList getAuthorizationsByQualifier(Id qualifierId) throws OperationFailedException, PermissionDeniedException
Authorizations
associated with a given
qualifier. In plenary mode, the returned list contains all known
authorizations or an error results. Otherwise, the returned list may
contain only those authorizations that are accessible through this
session.qualifierId
- a qualifier Id
Authorization list
NullArgumentException
- qualifierId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. Authorization getExplicitAuthorization(Id authorizationId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Authorization
that generated the
given implicit authorization. If the given Authorization
is explicit, then the same Authorization
is
returned.authorizationId
- an authorization Authorization
NotFoundException
- authorizationId
is
not foundNullArgumentException
- authorizationId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. AuthorizationList getAuthorizations() throws OperationFailedException, PermissionDeniedException
Authorizations.
In plenary mode, the returned
list contains all known authorizations or an error results. Otherwise,
the returned list may contain only those authorizations that are
accessible through this session. Authorizations
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.