Vault¶
Vault¶
Bases:
dlkit.osid.objects.OsidCatalog
,dlkit.osid.sessions.OsidSession
A vault defines a collection of authorizations and functions.
Gets the vault record corresponding to the given
Vault
recordType
.This method is used to retrieve an object implementing the requested record. The
vault_record_type
may be theType
returned inget_record_types()
or any of its parents in aType
hierarchy wherehas_record_type(vault_record_type)
istrue
.Parameters: vault_record_type ( osid.type.Type
) – a vault record typeReturns: the vault record Return type: osid.authorization.records.VaultRecord
Raise: NullArgument
–vault_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(vault_record_type)
isfalse
compliance: mandatory – This method must be implemented.
Authorization Methods¶
Gets the
Vault
Id
associated with this session.
Returns: the Vault Id
associated with this sessionReturn type: osid.id.Id
compliance: mandatory – This method must be implemented.
Gets the
Vault
associated with this session.
Returns: the Vault
associated with this sessionReturn type: osid.authorization.Vault
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Tests if this user can perform authorization checks.
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
PermissionDenied
. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
Returns: false
if authorization methods are not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Determines if the given agent is authorized.
An agent is authorized if an active authorization exists whose
Agent,
Function
andQualifier
matches the supplied parameters. Authorizations may be defined using groupings or hieratchical structures for both theAgent
and theQualifier
but are queried in the de-nornmalized form.The
Agent
is generally determined through the use of an Authentication OSID. TheFunction
andQualifier
are already known as they map to the desired authorization to validate.
Parameters:
- agent_id (
osid.id.Id
) – theId
of anAgent
- function_id (
osid.id.Id
) – theId
of aFunction
- qualifier_id (
osid.id.Id
) – theId
of aQualifier
Returns:
true
if the user is authorized,false
othersiseReturn type:
boolean
Raise:
NotFound
–function_id
is not foundRaise:
NullArgument
–agent_id
,function_id
orqualifier_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure making requestcompliance: mandatory – This method must be implemented. implementation notes: Authorizations may be stored in a normalized form with respect to various Resources and created using specific nodes in a
Function
orQualifer
hierarchy. The provider needs to maintain a de-normalized implicit authorization store or expand the applicable hierarchies on the fly to honor this query. Querying the authorization service may in itself require a separate authorization. APermissionDenied
is a result of this authorization failure. If no explicit or implicit authorization exists for the queried tuple, this method should returnfalse
.
Gets the
AuthorizationCondition
for making conditional authorization checks.
Parameters: function_id ( osid.id.Id
) – theId
of aFunction
Returns: an authorization condition Return type: osid.authorization.AuthorizationCondition
Raise: NotFound
–function_id
is not foundRaise: NullArgument
–function_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure making requestcompliance: mandatory – This method must be implemented.
Determines if the given agent is authorized.
An agent is authorized if an active authorization exists whose
Agent,
Function
andQualifier
matches the supplied parameters. Authorizations may be defined using groupings or hieratchical structures for both theAgent
and theQualifier
but are queried in the de-nornmalized form.The
Agent
is generally determined through the use of an Authentication OSID. TheFunction
andQualifier
are already known as they map to the desired authorization to validate.
Parameters:
- agent_id (
osid.id.Id
) – theId
of anAgent
- function_id (
osid.id.Id
) – theId
of aFunction
- qualifier_id (
osid.id.Id
) – theId
of aQualifier
- condition (
osid.authorization.AuthorizationCondition
) – an authorization conditionReturns:
true
if the user is authorized,false
othersiseReturn type:
boolean
Raise:
NotFound
–function_id
is not foundRaise:
NullArgument
–agent_id
,function_id, qualifier_id
, orcondition
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure making requestRaise:
Unsupported
–condition
is not of this servicecompliance: mandatory – This method must be implemented. implementation notes: Authorizations may be stored in a normalized form with respect to various Resources and created using specific nodes in a
Function
orQualifer
hierarchy. The provider needs to maintain a de-normalized implicit authorization store or expand the applicable hierarchies on the fly to honor this query. Querying the authorization service may in itself require a separate authorization. APermissionDenied
is a result of this authorization failure. If no explicit or implicit authorization exists for the queried tuple, this method should returnfalse
.
Authorization Lookup Methods¶
Vault.
vault_id
Gets the
Vault
Id
associated with this session.
Returns: the Vault Id
associated with this sessionReturn type: osid.id.Id
compliance: mandatory – This method must be implemented.
Vault.
vault
Gets the
Vault
associated with this session.
Returns: the Vault
associated with this sessionReturn type: osid.authorization.Vault
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
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
PermissionDenied
. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.
Returns: false
if lookup methods are not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
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.
compliance: mandatory – This method is must be implemented.
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.
compliance: mandatory – This method is must be implemented.
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.
compliance: mandatory – This method is must be implemented.
Isolates the view for methods in this session.
An isolated view restricts searches to this vault only.
compliance: mandatory – This method is must be implemented.
Only authorizations whose effective dates are current are returned by methods in this session.
compliance: mandatory – This method is must be implemented.
All authorizations of any effective dates are returned by all methods in this session.
compliance: mandatory – This method is must be implemented.
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
orResource
hierarchies. This method is the opposite ofexplicit_aut
compliance: mandatory – This method is must be implemented.
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()
.compliance: mandatory – This method is must be implemented.
Gets the
Authorization
specified by itsId
.In plenary mode, the exact
Id
is found or aNotFound
results. Otherwise, the returnedAuthorization
may have a differentId
than requested, such as the case where a duplicateId
was assigned to anAuthorization
and retained for compatibility.
Parameters: authorization_id ( osid.id.Id
) – theId
of theAuthorization
to retrieveReturns: the returned Authorization
Return type: osid.authorization.Authorization
Raise: NotFound
– noAuthorization
found with the givenId
Raise: NullArgument
–authorization_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gets an
AuthorizationList
corresponding to the givenIdList
.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 anId
in the supplied list is not found or inaccessible. Otherwise, inaccessibleAuthorizations
may be omitted from the list and may present the elements in any order including returning a unique set.
Parameters: authorization_ids ( osid.id.IdList
) – the list ofIds
to retrieveReturns: the returned Authorization list
Return type: osid.authorization.AuthorizationList
Raise: NotFound
– anId was
not foundRaise: NullArgument
–authorization_ids
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gets an
AuthorizationList
corresponding to the given authorization genusType
which does not include authorizations of genus types derived from the specifiedType
.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.
Parameters: authorization_genus_type ( osid.type.Type
) – an authorization genus typeReturns: the returned Authorization
listReturn type: osid.authorization.AuthorizationList
Raise: NullArgument
–authorization_genus_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure occurredcompliance: mandatory – This method must be implemented.
Gets an
AuthorizationList
corresponding to the given authorization genusType
and include authorizations of genus types derived from the specifiedType
.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.
Parameters: authorization_genus_type ( osid.type.Type
) – an authorization genus typeReturns: the returned Authorization
listReturn type: osid.authorization.AuthorizationList
Raise: NullArgument
–authorization_genus_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure occurredcompliance: mandatory – This method must be implemented.
Gets an
AuthorizationList
containing the given authorization recordType
.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.
Parameters: authorization_record_type ( osid.type.Type
) – an authorization record typeReturns: the returned Authorization
listReturn type: osid.authorization.AuthorizationList
Raise: NullArgument
–authorization_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failure occurredcompliance: mandatory – This method must be implemented.
Gets an
AuthorizationList
effective during the entire given date range inclusive but not confined to the date range.
Parameters:
- from (
osid.calendaring.DateTime
) – starting date- to (
osid.calendaring.DateTime
) – ending dateReturns: the returned
Authorization
listReturn type:
osid.authorization.AuthorizationList
Raise:
InvalidArgument
–from
is greater thanto
Raise:
NullArgument
–from
orto
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure occurredcompliance: mandatory – This method must be implemented.
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.
Parameters: resource_id ( osid.id.Id
) – a resourceId
Returns: the returned Authorization list
Return type: osid.authorization.AuthorizationList
Raise: NullArgument
–resource_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
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.
Parameters:
- resource_id (
osid.id.Id
) – a resourceId
- from (
osid.calendaring.DateTime
) – starting date- to (
osid.calendaring.DateTime
) – ending dateReturns: the returned
Authorization
listReturn type:
osid.authorization.AuthorizationList
Raise:
InvalidArgument
–from
is greater thanto
Raise:
NullArgument
–resource_id, from
orto
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure occurredcompliance: mandatory – This method must be implemented.
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.
Parameters: agent_id ( osid.id.Id
) – an agentId
Returns: the returned Authorization list
Return type: osid.authorization.AuthorizationList
Raise: NullArgument
–agent_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gets an
AuthorizationList
for the given agent and effective during the entire given date range inclusive but not confined to the date range.
Parameters:
- agent_id (
osid.id.Id
) – an agentId
- from (
osid.calendaring.DateTime
) – starting date- to (
osid.calendaring.DateTime
) – ending dateReturns: the returned
Authorization
listReturn type:
osid.authorization.AuthorizationList
Raise:
InvalidArgument
–from
is greater thanto
Raise:
NullArgument
–agent_id, from
orto
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure occurredcompliance: mandatory – This method must be implemented.
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.
Parameters: function_id ( osid.id.Id
) – a functionId
Returns: the returned Authorization list
Return type: osid.authorization.AuthorizationList
Raise: NullArgument
–function_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gets an
AuthorizationList
for the given function and effective during the entire given date range inclusive but not confined to the date range.
Parameters:
- function_id (
osid.id.Id
) – a functionId
- from (
osid.calendaring.DateTime
) – starting date- to (
osid.calendaring.DateTime
) – ending dateReturns: the returned
Authorization
listReturn type:
osid.authorization.AuthorizationList
Raise:
InvalidArgument
–from
is greater thanto
Raise:
NullArgument
–function_id, from
orto
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure occurredcompliance: mandatory – This method must be implemented.
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.
Parameters:
- resource_id (
osid.id.Id
) – a resourceId
- function_id (
osid.id.Id
) – a functionId
Returns: the returned
Authorization list
Return type:
osid.authorization.AuthorizationList
Raise:
NullArgument
–resource_id
orfunction_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
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.
Parameters:
- resource_id (
osid.id.Id
) – a resourceId
- function_id (
osid.id.Id
) – a functionId
- from (
osid.calendaring.DateTime
) – starting date- to (
osid.calendaring.DateTime
) – ending dateReturns: the returned
Authorization
listReturn type:
osid.authorization.AuthorizationList
Raise:
InvalidArgument
–from
is greater thanto
Raise:
NullArgument
–resource_id, function_id, from
orto
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure occurredcompliance: mandatory – This method must be implemented.
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.
Parameters:
- agent_id (
osid.id.Id
) – an agentId
- function_id (
osid.id.Id
) – a functionId
Returns: the returned
Authorization list
Return type:
osid.authorization.AuthorizationList
Raise:
NullArgument
–agent_id
orfunction_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gets an
AuthorizationList
for the given agent and effective during the entire given date range inclusive but not confined to the date range.
Parameters:
- agent_id (
osid.id.Id
) – an agentId
- function_id (
osid.id.Id
) – a functionId
- from (
osid.calendaring.DateTime
) – starting date- to (
osid.calendaring.DateTime
) – ending dateReturns: the returned
Authorization
listReturn type:
osid.authorization.AuthorizationList
Raise:
InvalidArgument
–from
is greater thanto
Raise:
NullArgument
–agent_id, function_id, from
orto
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failure occurredcompliance: mandatory – This method must be implemented.
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.
Parameters: qualifier_id ( osid.id.Id
) – a qualifierId
Returns: the returned Authorization list
Return type: osid.authorization.AuthorizationList
Raise: NullArgument
–qualifier_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Gets the explicit
Authorization
that generated the given implicit authorization.If the given
Authorization
is explicit, then the sameAuthorization
is returned.
Parameters: authorization_id ( osid.id.Id
) – an authorizationReturns: the explicit Authorization
Return type: osid.authorization.Authorization
Raise: NotFound
–authorization_id
is not foundRaise: NullArgument
–authorization_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
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.
Returns: a list of Authorizations
Return type: osid.authorization.AuthorizationList
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Authorization Query Methods¶
Vault.
vault_id
Gets the
Vault
Id
associated with this session.
Returns: the Vault Id
associated with this sessionReturn type: osid.id.Id
compliance: mandatory – This method must be implemented.
Vault.
vault
Gets the
Vault
associated with this session.
Returns: the Vault
associated with this sessionReturn type: osid.authorization.Vault
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Tests if this user can perform authorization searches.
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
PermissionDenied
. This is intended as a hint to an application that may opt not to offer search operations to unauthorized users.
Returns: false
if search methods are not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Vault.
use_federated_vault_view
()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.
compliance: mandatory – This method is must be implemented.
Vault.
use_isolated_vault_view
()Isolates the view for methods in this session.
An isolated view restricts searches to this vault only.
compliance: mandatory – This method is must be implemented.
Vault.
use_implicit_authorization_view
()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
orResource
hierarchies. This method is the opposite ofexplicit_aut
compliance: mandatory – This method is must be implemented.
Vault.
use_explicit_authorization_view
()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()
.compliance: mandatory – This method is must be implemented.
Gets an authorization query.
Returns: the authorization query Return type: osid.authorization.AuthorizationQuery
compliance: mandatory – This method must be implemented.
Gets a list of
Authorizations
matching the given query.
Parameters: authorization_query ( osid.authorization.AuthorizationQuery
) – the authorization queryReturns: the returned AuthorizationList
Return type: osid.authorization.AuthorizationList
Raise: NullArgument
–authorization_query
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failureRaise: Unsupported
–authorization_query
is not of this servicecompliance: mandatory – This method must be implemented.
Authorization Admin Methods¶
Vault.
vault_id
Gets the
Vault
Id
associated with this session.
Returns: the Vault Id
associated with this sessionReturn type: osid.id.Id
compliance: mandatory – This method must be implemented.
Vault.
vault
Gets the
Vault
associated with this session.
Returns: the Vault
associated with this sessionReturn type: osid.authorization.Vault
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Tests if this user can create
Authorizations
.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
PermissionDenied
. This is intended as a hint to an application that may opt not to offer create operations to unauthorized users.
Returns: false
ifAuthorization
creation is not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Tests if this user can create a single
Authorization
using the desired record types.While
AuthorizationManager.getAuthorizationRecordTypes()
can be used to examine which records are supported, this method tests which record(s) are required for creating a specificAuthorization
. Providing an empty array tests if anAuthorization
can be created with no records.
Parameters: authorization_record_types ( osid.type.Type[]
) – array of authorization record typesReturns: true
ifAuthorization
creation using the specifiedTypes
is supported,false
otherwiseReturn type: boolean
Raise: NullArgument
–authorization_record_types
isnull
compliance: mandatory – This method must be implemented.
Gets the authorization form for creating new authorizations.
A new form should be requested for each create transaction.
Parameters:
- agent_id (
osid.id.Id
) – the agentId
- function_id (
osid.id.Id
) – the functionId
- qualifier_id (
osid.id.Id
) – the qualifierId
- authorization_record_types (
osid.type.Type[]
) – array of authorization record typesReturns: the authorization form
Return type:
osid.authorization.AuthorizationForm
Raise:
NotFound
–agent_id, function_id
orqualifier_id
is not foundRaise:
NullArgument
–agent_id, function_id, qualifier_id
orauthorization_record_types
isnull
Raise:
OperationFailed
–unable to complete request
Raise:
PermissionDenied
– authorization failureRaise:
Unsupported
– unable to get form with requested record typescompliance: mandatory – This method must be implemented.
Gets the authorization form for creating new authorizations.
A new form should be requested for each create transaction.
Parameters:
- resource_id (
osid.id.Id
) – the resourceId
- function_id (
osid.id.Id
) – the functionId
- qualifier_id (
osid.id.Id
) – the qualifierId
- authorization_record_types (
osid.type.Type[]
) – array of authorization record typesReturns: the authorization form
Return type:
osid.authorization.AuthorizationForm
Raise:
NotFound
–resource_id, function_id
orqualifier_id
is not foundRaise:
NullArgument
–resource_id, function_id, qualifier_id,
orauthorization_record_types
isnull
Raise:
OperationFailed
–unable to complete request
Raise:
PermissionDenied
– authorization failureRaise:
Unsupported
– unable to get form with requested record typescompliance: mandatory – This method must be implemented.
Gets the authorization form for creating new authorizations.
A new form should be requested for each create transaction.
Parameters:
- resource_id (
osid.id.Id
) – a resourceId
- trust_id (
osid.id.Id
) – anId
for a circle of trust- function_id (
osid.id.Id
) – a functionId
- qualifier_id (
osid.id.Id
) – the qualifierId
- authorization_record_types (
osid.type.Type[]
) – array of authorization record typesReturns: the authorization form
Return type:
osid.authorization.AuthorizationForm
Raise:
NotFound
–resource_id, trust_id, function_id
, orqualifierid
is not foundRaise:
NullArgument
–resource_id, trust_id
,resource_id, qualifier_id
orauthorization_record_types
isnull
Raise:
OperationFailed
–unable to complete request
Raise:
PermissionDenied
– authorization failureRaise:
Unsupported
– unable to get form with requested record typescompliance: mandatory – This method must be implemented.
Creates a new explicit
Authorization
.
Parameters: authorization_form ( osid.authorization.AuthorizationForm
) – the authorization formReturns: t
he newAuthorization
Return type: osid.authorization.Authorization
Raise: IllegalState
–authorization_form
already used in a create transactionRaise: InvalidArgument
– one or more of the form elements is invalidRaise: NullArgument
–authorization_form
isnull
Raise: OperationFailed
–unable to complete request
Raise: PermissionDenied
– authorization failureRaise: Unsupported
–authorization_form
did not originate from this servicecompliance: mandatory – This method must be implemented.
Tests if this user can update
Authorizations
.A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an
Authorization
will result in aPermissionDenied
. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.
Returns: false
if authorization modification is not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Gets the authorization form for updating an existing authorization.
A new authorization form should be requested for each update transaction.
Parameters: authorization_id ( osid.id.Id
) – theId
of theAuthorization
Returns: the authorization form Return type: osid.authorization.AuthorizationForm
Raise: NotFound
–authorization_id
is not foundRaise: NullArgument
–authorization_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Updates an existing authorization.
Parameters: authorization_form ( osid.authorization.AuthorizationForm
) – the authorizationId
Raise: IllegalState
–authorization_form
already used in an update transactionRaise: InvalidArgument
– one or more of the form elements is invalidRaise: NullArgument
–authorization_form
isnull
Raise: OperationFailed
–unable to complete request
Raise: PermissionDenied
– authorization failureRaise: Unsupported
–authorization_form
did not originate fromget_authorization_form_for_update()
compliance: mandatory – This method must be implemented.
Tests if this user can delete
Authorizations
.A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an
Authorization
will result in aPermissionDenied
. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.
Returns: false
ifAuthorization
deletion is not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Deletes the
Authorization
identified by the givenId
.
Parameters: authorization_id ( osid.id.Id
) – theId
of theAuthorization
to deleteRaise: NotFound
– anAuthorization
was not found identified by the givenId
Raise: NullArgument
–authorization_id
isnull
Raise: OperationFailed
– unable to complete requestRaise: PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.
Tests if this user can manage
Id
aliases forAuthorizations
.A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a
PermissionDenied
. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.
Returns: false
ifAuthorization
aliasing is not authorized,true
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Adds an
Id
to anAuthorization
for the purpose of creating compatibility.The primary
Id
of theAuthorization
is determined by the provider. The newId
performs as an alias to the primaryId
. If the alias is a pointer to another authorization. it is reassigned to the given authorizationId
.
Parameters:
- authorization_id (
osid.id.Id
) – theId
of anAuthorization
- alias_id (
osid.id.Id
) – the aliasId
Raise:
AlreadyExists
–alias_id
is already assignedRaise:
NotFound
–authorization_id
not foundRaise:
NullArgument
–authorization_id
oralias_id
isnull
Raise:
OperationFailed
– unable to complete requestRaise:
PermissionDenied
– authorization failurecompliance: mandatory – This method must be implemented.