Objects¶
Agent¶
-
class
dlkit.authentication.objects.Agent¶ Bases:
dlkit.osid.objects.OsidObjectAn
Agentrepresents an authenticatable identity.Like all OSID objects, an
Agentis identified by itsIdand any persisted references should use theId.-
get_agent_record(agent_record_type)¶ Gets the agent record corresponding to the given
AgentrecordType.This method is used to retrieve an object implementing the requested record. The
agent_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(agent_record_type)istrue.Parameters: agent_record_type ( osid.type.Type) – the type of the record to retrieveReturns: the agent record Return type: osid.authentication.records.AgentRecordRaise: NullArgument–agent_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(agent_record_type)isfalsecompliance: mandatory – This method must be implemented.
-
Agent Form¶
-
class
dlkit.authentication.objects.AgentForm¶ Bases:
dlkit.osid.objects.OsidObjectFormThis is the form for creating and updating
Agents.Like all
OsidFormobjects, various data elements may be set here for use in the create and update methods in theAgentAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.-
get_agent_form_record(agent_record_type)¶ Gets the
AgentFormRecordcorresponding to the given agent recordType.Parameters: agent_record_type ( osid.type.Type) – the agent record typeReturns: the agent form record Return type: osid.authentication.records.AgentFormRecordRaise: NullArgument–agent_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: Unsupported–has_record_type(agent_record_type)isfalsecompliance: mandatory – This method must be implemented.
-
Agent List¶
-
class
dlkit.authentication.objects.AgentList¶ Bases:
dlkit.osid.objects.OsidListLike all
OsidLists,AgentListprovides a means for accessingAgentelements sequentially either one at a time or many at a time.Examples: while (al.hasNext()) { Agent agent = al.getNextAgent(); }
- or
- while (al.hasNext()) {
- Agent[] agents = al.getNextAgents(al.available());
}
-
next_agent¶ Gets the next
Agentin this list.Returns: the next Agentin this list. Thehas_next()method should be used to test that a nextAgentis available before calling this method.Return type: osid.authentication.AgentRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
-
get_next_agents(n)¶ Gets the next set of
Agentelements in this list which must be less than or equal to the number returned fromavailable().Parameters: n ( cardinal) – the number ofAgentelements requested which should be less than or equal toavailable()Returns: an array of Agentelements.The length of the array is less than or equal to the number specified.Return type: osid.authentication.AgentRaise: IllegalState– no more elements available in this listRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.