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 itsId
and any persisted references should use theId
.-
get_agent_record
(agent_record_type)¶ Gets the agent record corresponding to the given
Agent
recordType
.This method is used to retrieve an object implementing the requested record. The
agent_record_type
may be theType
returned inget_record_types()
or any of its parents in aType
hierarchy 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.AgentRecord
Raise: NullArgument
–agent_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(agent_record_type)
isfalse
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 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
AgentFormRecord
corresponding 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.AgentFormRecord
Raise: NullArgument
–agent_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(agent_record_type)
isfalse
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 accessingAgent
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. Thehas_next()
method should be used to test that a nextAgent
is available before calling this method.Return type: osid.authentication.Agent
Raise: 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
Agent
elements in this list which must be less than or equal to the number returned fromavailable()
.Parameters: n ( cardinal
) – the number ofAgent
elements requested which should be less than or equal toavailable()
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 listRaise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.