Objects

Agent

class dlkit.authentication.objects.Agent

Bases: dlkit.osid.objects.OsidObject

An Agent represents an authenticatable identity.

Like all OSID objects, an Agent is identified by its Id and any persisted references should use the Id.

get_agent_record(agent_record_type)

Gets the agent record corresponding to the given Agent record Type.

This method is used to retrieve an object implementing the requested record. The agent_record_type may be the Type returned in get_record_types() or any of its parents in a Type hierarchy where has_record_type(agent_record_type) is true .

Parameters:agent_record_type (osid.type.Type) – the type of the record to retrieve
Returns:the agent record
Return type:osid.authentication.records.AgentRecord
Raise:NullArgumentagent_record_type is null
Raise:OperationFailed – unable to complete request
Raise:Unsupportedhas_record_type(agent_record_type) is false

compliance: mandatory – This method must be implemented.

Agent Form

class dlkit.authentication.objects.AgentForm

Bases: dlkit.osid.objects.OsidObjectForm

This is the form for creating and updating Agents.

Like all OsidForm objects, various data elements may be set here for use in the create and update methods in the AgentAdminSession. 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 AgentFormRecord corresponding to the given agent record Type.

Parameters:agent_record_type (osid.type.Type) – the agent record type
Returns:the agent form record
Return type:osid.authentication.records.AgentFormRecord
Raise:NullArgumentagent_record_type is null
Raise:OperationFailed – unable to complete request
Raise:Unsupportedhas_record_type(agent_record_type) is false

compliance: mandatory – This method must be implemented.

Agent List

class dlkit.authentication.objects.AgentList

Bases: dlkit.osid.objects.OsidList

Like all OsidLists, AgentList provides a means for accessing Agent elements 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 Agent in this list.

Returns:the next Agent in this list. The has_next() method should be used to test that a next Agent is available before calling this method.
Return type:osid.authentication.Agent
Raise:IllegalState – no more elements available in this list
Raise:OperationFailed – unable to complete request

compliance: mandatory – This method must be implemented.

get_next_agents(n)

Gets the next set of Agent elements in this list which must be less than or equal to the number returned from available().

Parameters:n (cardinal) – the number of Agent elements requested which should be less than or equal to available()
Returns:an array of Agent elements.The length of the array is less than or equal to the number specified.
Return type:osid.authentication.Agent
Raise:IllegalState – no more elements available in this list
Raise:OperationFailed – unable to complete request

compliance: mandatory – This method must be implemented.