Objects¶
Authorization¶
Bases:
dlkit.osid.objects.OsidRelationship
An Authorization is a mapping among an actor, a
Function
and aQualifier
.This interface is not required for performing authorization checks but is used for examining and managing authorizations.
The actor of an authorization may be specified in a variety of forms.
Agent
Resource:
the authorization provider uses all theAgents
associated with aResource
for matching authorizationsResource
andTrust:
the authorization provider uses the associatedAgents
within a cicle ofTrust
An explicit
Authorization
represents the mappings as they are specified in the authorization provdier. Implicit authorizations may be retrieved which are authorizations inferred through theFunction
orQualifier
hierarchies. An implicitAuthorization
is one whereis_implicit()
is true and should not be used for modification as it is only available for auditing purposes.An
Authorization
containing aResource
may also provide the associated Agent in a request for implicit authorizations or for all the authorizations, both explicit and implicit, for a givenAgent
.Tests if this authorization is implicit.
Returns: true
if this authorization is implicit,false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Tests if this authorization has a
Resource
.Returns: true
if this authorization has aResource,
false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Gets the
resource _id
for this authorization.Returns: the Resource Id
Return type: osid.id.Id
Raise: IllegalState
–has_resource()
isfalse
compliance: mandatory – This method must be implemented.
Gets the
Resource
for this authorization.Returns: the Resource
Return type: osid.resource.Resource
Raise: IllegalState
–has_resource()
isfalse
Raise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
Tests if this authorization has a
Trust
.Returns: true
if this authorization has aTrust,
false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Gets the
Trust
Id
for this authorization.Returns: the trust Id
Return type: osid.id.Id
Raise: IllegalState
–has_trust()
isfalse
compliance: mandatory – This method must be implemented.
Gets the
Trust
for this authorization.Returns: the Trust
Return type: osid.authentication.process.Trust
Raise: IllegalState
–has_trust()
isfalse
Raise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
Tests if this authorization has an
Agent
.An implied authorization may have an
Agent
in addition to a specifiedResource
.Returns: true
if this authorization has anAgent,
false
otherwiseReturn type: boolean
compliance: mandatory – This method must be implemented.
Gets the
Agent Id
for this authorization.Returns: the Agent Id
Return type: osid.id.Id
Raise: IllegalState
–has_agent()
isfalse
compliance: mandatory – This method must be implemented.
Gets the
Agent
for this authorization.Returns: the Agent
Return type: osid.authentication.Agent
Raise: IllegalState
–has_agent()
isfalse
Raise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
Gets the
Function Id
for this authorization.Returns: the function Id
Return type: osid.id.Id
compliance: mandatory – This method must be implemented.
Gets the
Function
for this authorization.Returns: the function Return type: osid.authorization.Function
Raise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
Gets the
Qualifier Id
for this authorization.Returns: the qualifier Id
Return type: osid.id.Id
compliance: mandatory – This method must be implemented.
Gets the qualifier for this authorization.
Returns: the qualifier Return type: osid.authorization.Qualifier
Raise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
Gets the authorization record corresponding to the given
Authorization
recordType
.This method is used to retrieve an object implementing the requested record. The
authorization_record_type
may be theType
returned inget_record_types()
or any of its parents in aType
hierarchy wherehas_record_type(authorization_record_type)
istrue
.Parameters: authorization_record_type ( osid.type.Type
) – the type of the record to retrieveReturns: the authorization record Return type: osid.authorization.records.AuthorizationRecord
Raise: NullArgument
–authorization_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(authorization_record_type)
isfalse
compliance: mandatory – This method must be implemented.
Authorization Form¶
Bases:
dlkit.osid.objects.OsidRelationshipForm
This is the form for creating and updating
Authorizations
.Like all
OsidForm
objects, various data elements may be set here for use in the create and update methods in theAuthorizationAdminSession
. For each data element that may be set, metadata may be examined to provide display hints or data constraints.Gets the
AuthorizationFormRecord
corresponding to the given authorization recordType
.Parameters: authorization_record_type ( osid.type.Type
) – the authorization record typeReturns: the authorization form record Return type: osid.authorization.records.AuthorizationFormRecord
Raise: NullArgument
–authorization_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(authorization_record_type)
isfalse
compliance: mandatory – This method must be implemented.
Authorization List¶
Bases:
dlkit.osid.objects.OsidList
Like all
OsidLists,
AuthorizationList
provides a means for accessingAuthorization
elements sequentially either one at a time or many at a time.Examples: while (al.hasNext()) { Authorization authorization = al.getNextAuthorization(); }
- or
- while (al.hasNext()) {
- Authorization[] authorizations = al.getNextAuthorizations(al.available());
}
Gets the next
Authorization
in this list.Returns: the next Authorization
in this list. Thehas_next()
method should be used to test that a nextAuthorization
is available before calling this method.Return type: osid.authorization.Authorization
Raise: IllegalState
– no more elements available in this listRaise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
Gets the next set of
Authorization
elements in this list which must be less than or equal to the number returned fromavailable()
.Parameters: n ( cardinal
) – the number ofAuthorization
elements requested which should be less than or equal toavailable()
Returns: an array of Authorization
elements.The length of the array is less than or equal to the number specified.Return type: osid.authorization.Authorization
Raise: IllegalState
– no more elements available in this listRaise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
Vault¶
-
:noindex:
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.
Vault Form¶
Bases:
dlkit.osid.objects.OsidCatalogForm
This is the form for creating and updating vaults.
Like all
OsidForm
objects, various data elements may be set here for use in the create and update methods in theVaultAdminSession
. For each data element that may be set, metadata may be examined to provide display hints or data constraints.Gets the
VaultFormRecord
corresponding to the given vault recordType
.Parameters: vault_record_type ( osid.type.Type
) – a vault record typeReturns: the vault form record Return type: osid.authorization.records.VaultFormRecord
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.
Vault List¶
Bases:
dlkit.osid.objects.OsidList
Like all
OsidLists,
VaultList
provides a means for accessingVault
elements sequentially either one at a time or many at a time.Examples: while (vl.hasNext()) { Vault vault = vl.getNextVault(); }
- or
- while (vl.hasNext()) {
- Vault[] vaults = vl.getNextVaults(vl.available());
}
Gets the next
Vault
in this list.Returns: the next Vault
in this list. Thehas_next()
method should be used to test that a nextVault
is available before calling this method.Return type: osid.authorization.Vault
Raise: IllegalState
– no more elements available in this listRaise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
Gets the next set of
Vault
elements in this list which must be less than or equal to the return fromavailable()
.Parameters: n ( cardinal
) – the number ofVault
elements requested which must be less than or equal toavailable()
Returns: an array of Vault
elements.The length of the array is less than or equal to the number specified.Return type: osid.authorization.Vault
Raise: IllegalState
– no more elements available in this listRaise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
Vault Node¶
Bases:
dlkit.osid.objects.OsidNode
This interface is a container for a partial hierarchy retrieval.
The number of hierarchy levels traversable through this interface depend on the number of levels requested in the
VaultHierarchySession
.Gets the
Vault
at this node.Returns: the vault represented by this node Return type: osid.authorization.Vault
compliance: mandatory – This method must be implemented.
Gets the parents of this vault.
Returns: the parents of this vault Return type: osid.authorization.VaultNodeList
compliance: mandatory – This method must be implemented.
Gets the children of this vault.
Returns: the children of this vault Return type: osid.authorization.VaultNodeList
compliance: mandatory – This method must be implemented.
Vault Node List¶
Bases:
dlkit.osid.objects.OsidList
Like all
OsidLists,
VaultNodeList
provides a means for accessingVaultNode
elements sequentially either one at a time or many at a time.Examples: while (vnl.hasNext()) { VaultNode node = vnl.getNextVaultNode(); }
- or
- while (vnl.hasNext()) {
- VaultNode[] nodes = vnl.getNextVaultNodes(vnl.available());
}
Gets the next
VaultNode
in this list.Returns: the next VaultNode
in this list. Thehas_next()
method should be used to test that a nextVaultNode
is available before calling this method.Return type: osid.authorization.VaultNode
Raise: IllegalState
– no more elements available in this listRaise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.
Gets the next set of
VaultNode
elements in this list which must be less than or equal to the return fromavailable()
.Parameters: n ( cardinal
) – the number ofVaultNode
elements requested which must be less than or equal toavailable()
Returns: an array of VaultNode
elements.The length of the array is less than or equal to the number specified.Return type: osid.authorization.VaultNode
Raise: IllegalState
– no more elements available in this listRaise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.