OSID Logo
OSID Specifications
authorization package
Version 3.0.0
Release Candidate Preview
Interfaceosid.authorization.AuthorizationLookupSession
Implementsosid.OsidSession
Description

This session defines methods to search and retrieve Authorization mappings.

This lookup session defines two sets of views:

  • isolated vault view: All authorization methods in this session operate, retrieve and pertain to Authorizations defined explicitly in the current Vault. Using an isolated view is useful for managing Authorizations with the AuthorizationAdminSession.
  • federated vault view; All authorization methods in this session operate, retrieve and pertain to all authorizations defined in this vault and any other authorizations implicitly available in this vault through vault inheritence.
  • effective authorization view: All authorization lookup methods return edges where the current dates falls in between the effective dates inclusive.
  • any effective authorization edge view: Authorizations of any effective date are returned.
  • explicit authorization view: All authorization methods in this session operate, retrieve and pertain to only those authorizations that have been explicitly defined and not derived from Resource groups or Qualifier hierarchies.
  • implicit authorization view; All authorization methods in this session operate, retrieve and pertain to all authorizations including those derived from 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.

MethodgetVaultId
Description

Gets the Vault Id associated with this session.

Returnosid.id.Idthe Vault Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetVault
Description

Gets the Vault associated with this session.

Returnosid.authorization.Vaultthe Vault associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanLookupAuthorizations
Description

Tests if this user can perform authorization lookups. 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 a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.

Returnboolean false if lookup methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeAuthorizationView
Description

The returns from the lookup 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.

CompliancemandatoryThis method is must be implemented.
MethodusePlenaryAuthorizationView
Description

A complete view of the 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.

CompliancemandatoryThis method is must be implemented.
MethoduseFederatedVaultView
Description

Federates the view for methods in this session. A federated view will include authorizations in vaults which are children of this vault in the vault hierarchy.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedVaultView
Description

Isolates the view for methods in this session. An isolated view restricts lookups to this vault only.

CompliancemandatoryThis method is must be implemented.
MethoduseEffectiveAuthorizationView
Description

Only authorizations whose effective dates are current are returned by methods in this session.

CompliancemandatoryThis method is must be implemented.
MethoduseAnyEffectiveAuthorizationView
Description

All authorizations of any effective dates are returned by all methods in this session.

CompliancemandatoryThis method is must be implemented.
MethoduseImplicitAuthorizationView
Description

Sets the view for methods in this session to implicit authorizations. An implicit view will include authorizations derived from other authorizations as a result of the Qualifier, Function or Resource hierarchies. This method is the opposite of explicitAuthorizationView().

CompliancemandatoryThis method is must be implemented.
MethoduseExplicitAuthorizationView
Description

Sets the view for methods in this session to explicit authorizations. An explicit view includes only those authorizations that were explicitly defined and not implied. This method is the opposite of implicitAuthorizationView().

CompliancemandatoryThis method is must be implemented.
MethodgetAuthorization
Description

Gets the 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.

Parametersosid.id.IdauthorizationIdthe Id of the Authorization to retrieve
Returnosid.authorization.Authorizationthe returned Authorization
ErrorsNOT_FOUNDno Authorization found with the given Id
NULL_ARGUMENT authorizationId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAuthorizationsByIds
Description

Gets an 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.

Parametersosid.id.IdListauthorizationIdsthe list of Ids to retrieve
Returnosid.authorization.AuthorizationListthe returned Authorization list
ErrorsNOT_FOUNDan Id was not found
NULL_ARGUMENT authorizationIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAuthorizationsByGenusType
Description

Gets an 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.

Parametersosid.type.TypeauthorizationGenusTypean authorization genus type
Returnosid.authorization.AuthorizationListthe returned Authorization list
ErrorsNULL_ARGUMENT authorizationGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodgetAuthorizationsByParentGenusType
Description

Gets an 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.

Parametersosid.type.TypeauthorizationGenusTypean authorization genus type
Returnosid.authorization.AuthorizationListthe returned Authorization list
ErrorsNULL_ARGUMENT authorizationGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodgetAuthorizationsByRecordType
Description

Gets an 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.

Parametersosid.type.TypeauthorizationRecordTypean authorization record type
Returnosid.authorization.AuthorizationListthe returned Authorization list
ErrorsNULL_ARGUMENT authorizationRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodgetAuthorizationsOnDate
Description

Gets an 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.

Parametersosid.calendaring.DateTimefromstarting date
osid.calendaring.DateTimetoending date
Returnosid.authorization.AuthorizationListthe returned Authorization list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodgetAuthorizationsForResource
Description

Gets a list of 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.

Parametersosid.id.IdresourceIda resource Id
Returnosid.authorization.AuthorizationListthe returned Authorization list
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAuthorizationsForResourceOnDate
Description

Gets an 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.

Parametersosid.id.IdresourceIda resource Id
osid.calendaring.DateTimefromstarting date
osid.calendaring.DateTimetoending date
Returnosid.authorization.AuthorizationListthe returned Authorization list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT resourceId, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodgetAuthorizationsForAgent
Description

Gets a list of 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.

Parametersosid.id.IdagentIdan agent Id
Returnosid.authorization.AuthorizationListthe returned Authorization list
ErrorsNULL_ARGUMENT agentId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAuthorizationsForAgentOnDate
Description

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. 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.

Parametersosid.id.IdagentIdan agent Id
osid.calendaring.DateTimefromstarting date
osid.calendaring.DateTimetoending date
Returnosid.authorization.AuthorizationListthe returned Authorization list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT agentId, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodgetAuthorizationsForFunction
Description

Gets a list of 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.

Parametersosid.id.IdfunctionIda function Id
Returnosid.authorization.AuthorizationListthe returned Authorization list
ErrorsNULL_ARGUMENT functionId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAuthorizationsForFunctionOnDate
Description

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. 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.

Parametersosid.id.IdfunctionIda function Id
osid.calendaring.DateTimefromstarting date
osid.calendaring.DateTimetoending date
Returnosid.authorization.AuthorizationListthe returned Authorization list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT functionId, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodgetAuthorizationsForResourceAndFunction
Description

Gets a list of 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.

Parametersosid.id.IdresourceIda resource Id
osid.id.IdfunctionIda function Id
Returnosid.authorization.AuthorizationListthe returned Authorization list
ErrorsNULL_ARGUMENT resourceId or functionId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAuthorizationsForResourceAndFunctionOnDate
Description

Gets an 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.

Parametersosid.id.IdresourceIda resource Id
osid.id.IdfunctionIda function Id
osid.calendaring.DateTimefromstarting date
osid.calendaring.DateTimetoending date
Returnosid.authorization.AuthorizationListthe returned Authorization list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT resourceId, functionId, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodgetAuthorizationsForAgentAndFunction
Description

Gets a list of 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.

Parametersosid.id.IdagentIdan agent Id
osid.id.IdfunctionIda function Id
Returnosid.authorization.AuthorizationListthe returned Authorization list
ErrorsNULL_ARGUMENT agentId or functionId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAuthorizationsForAgentAndFunctionOnDate
Description

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. 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.

Parametersosid.id.IdagentIdan agent Id
osid.id.IdfunctionIda function Id
osid.calendaring.DateTimefromstarting date
osid.calendaring.DateTimetoending date
Returnosid.authorization.AuthorizationListthe returned Authorization list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT agentId, functionId, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodgetAuthorizationsByQualifier
Description

Gets a list of 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.

Parametersosid.id.IdqualifierIda qualifier Id
Returnosid.authorization.AuthorizationListthe returned Authorization list
ErrorsNULL_ARGUMENT qualifierId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetExplicitAuthorization
Description

Gets the explicit Authorization that generated the given implicit authorization. If the given Authorization is explicit, then the same Authorization is returned.

Parametersosid.id.IdauthorizationIdan authorization
Returnosid.authorization.Authorizationthe explicit Authorization
ErrorsNOT_FOUND authorizationId is not found
NULL_ARGUMENT authorizationId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAuthorizations
Description

Geta all 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.

Returnosid.authorization.AuthorizationLista list of Authorizations
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.