Objects¶
Authorization¶
Bases:
dlkit.osid.objects.OsidRelationshipAn Authorization is a mapping among an actor, a
Functionand 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.
AgentResource:the authorization provider uses all theAgentsassociated with aResourcefor matching authorizationsResourceandTrust:the authorization provider uses the associatedAgentswithin a cicle ofTrust
An explicit
Authorizationrepresents the mappings as they are specified in the authorization provdier. Implicit authorizations may be retrieved which are authorizations inferred through theFunctionorQualifierhierarchies. An implicitAuthorizationis one whereis_implicit()is true and should not be used for modification as it is only available for auditing purposes.An
Authorizationcontaining aResourcemay 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: trueif this authorization is implicit,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Tests if this authorization has a
Resource.Returns: trueif this authorization has aResource,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Gets the
resource _idfor this authorization.Returns: the Resource IdReturn type: osid.id.IdRaise: IllegalState–has_resource()isfalsecompliance: mandatory – This method must be implemented.
Gets the
Resourcefor this authorization.Returns: the ResourceReturn type: osid.resource.ResourceRaise: IllegalState–has_resource()isfalseRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
Tests if this authorization has a
Trust.Returns: trueif this authorization has aTrust,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Gets the
TrustIdfor this authorization.Returns: the trust IdReturn type: osid.id.IdRaise: IllegalState–has_trust()isfalsecompliance: mandatory – This method must be implemented.
Gets the
Trustfor this authorization.Returns: the TrustReturn type: osid.authentication.process.TrustRaise: IllegalState–has_trust()isfalseRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
Tests if this authorization has an
Agent.An implied authorization may have an
Agentin addition to a specifiedResource.Returns: trueif this authorization has anAgent,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
Gets the
Agent Idfor this authorization.Returns: the Agent IdReturn type: osid.id.IdRaise: IllegalState–has_agent()isfalsecompliance: mandatory – This method must be implemented.
Gets the
Agentfor this authorization.Returns: the AgentReturn type: osid.authentication.AgentRaise: IllegalState–has_agent()isfalseRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
Gets the
Function Idfor this authorization.Returns: the function IdReturn type: osid.id.Idcompliance: mandatory – This method must be implemented.
Gets the
Functionfor this authorization.Returns: the function Return type: osid.authorization.FunctionRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
Gets the
Qualifier Idfor this authorization.Returns: the qualifier IdReturn type: osid.id.Idcompliance: mandatory – This method must be implemented.
Gets the qualifier for this authorization.
Returns: the qualifier Return type: osid.authorization.QualifierRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
Gets the authorization record corresponding to the given
AuthorizationrecordType.This method is used to retrieve an object implementing the requested record. The
authorization_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy 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.AuthorizationRecordRaise: NullArgument–authorization_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(authorization_record_type)isfalsecompliance: mandatory – This method must be implemented.
Authorization Form¶
Bases:
dlkit.osid.objects.OsidRelationshipFormThis is the form for creating and updating
Authorizations.Like all
OsidFormobjects, 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
AuthorizationFormRecordcorresponding 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.AuthorizationFormRecordRaise: NullArgument–authorization_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(authorization_record_type)isfalsecompliance: mandatory – This method must be implemented.
Authorization List¶
Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,AuthorizationListprovides a means for accessingAuthorizationelements 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
Authorizationin this list.Returns: the next Authorizationin this list. Thehas_next()method should be used to test that a nextAuthorizationis available before calling this method.Return type: osid.authorization.AuthorizationRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
Gets the next set of
Authorizationelements in this list which must be less than or equal to the number returned fromavailable().Parameters: n ( cardinal) – the number ofAuthorizationelements requested which should be less than or equal toavailable()Returns: an array of Authorizationelements.The length of the array is less than or equal to the number specified.Return type: osid.authorization.AuthorizationRaise: 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
VaultrecordType.This method is used to retrieve an object implementing the requested record. The
vault_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy 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.VaultRecordRaise: NullArgument–vault_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(vault_record_type)isfalsecompliance: mandatory – This method must be implemented.
Vault Form¶
Bases:
dlkit.osid.objects.OsidCatalogFormThis is the form for creating and updating vaults.
Like all
OsidFormobjects, 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
VaultFormRecordcorresponding 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.VaultFormRecordRaise: NullArgument–vault_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(vault_record_type)isfalsecompliance: mandatory – This method must be implemented.
Vault List¶
Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,VaultListprovides a means for accessingVaultelements 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
Vaultin this list.Returns: the next Vaultin this list. Thehas_next()method should be used to test that a nextVaultis available before calling this method.Return type: osid.authorization.VaultRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
Gets the next set of
Vaultelements in this list which must be less than or equal to the return fromavailable().Parameters: n ( cardinal) – the number ofVaultelements requested which must be less than or equal toavailable()Returns: an array of Vaultelements.The length of the array is less than or equal to the number specified.Return type: osid.authorization.VaultRaise: 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.OsidNodeThis 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
Vaultat this node.Returns: the vault represented by this node Return type: osid.authorization.Vaultcompliance: mandatory – This method must be implemented.
Gets the parents of this vault.
Returns: the parents of this vault Return type: osid.authorization.VaultNodeListcompliance: mandatory – This method must be implemented.
Gets the children of this vault.
Returns: the children of this vault Return type: osid.authorization.VaultNodeListcompliance: mandatory – This method must be implemented.
Vault Node List¶
Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,VaultNodeListprovides a means for accessingVaultNodeelements 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
VaultNodein this list.Returns: the next VaultNodein this list. Thehas_next()method should be used to test that a nextVaultNodeis available before calling this method.Return type: osid.authorization.VaultNodeRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
Gets the next set of
VaultNodeelements in this list which must be less than or equal to the return fromavailable().Parameters: n ( cardinal) – the number ofVaultNodeelements requested which must be less than or equal toavailable()Returns: an array of VaultNodeelements.The length of the array is less than or equal to the number specified.Return type: osid.authorization.VaultNodeRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.