Objects

Log Entry

class dlkit.logging_.objects.LogEntry

Bases: dlkit.osid.objects.OsidObject

A log entry consists of a time, an agent, and a priority type.

priority

Gets the priority level of this entry.

Returns:the priority level
Return type:osid.type.Type

compliance: mandatory – This method must be implemented.

timestamp

Gets the time this entry was logged.

Returns:the time stamp of this entry
Return type:osid.calendaring.DateTime

compliance: mandatory – This method must be implemented.

resource_id

Gets the resource Id who created this entry.

Returns:the resource Id
Return type:osid.id.Id

compliance: mandatory – This method must be implemented.

resource

Gets the Resource who created this entry.

Returns:the Resource
Return type:osid.resource.Resource
Raise:OperationFailed – unable to complete request

compliance: mandatory – This method must be implemented.

agent_id

Gets the agent Id who created this entry.

Returns:the agent Id
Return type:osid.id.Id

compliance: mandatory – This method must be implemented.

agent

Gets the Agent who created this entry.

Returns:the Agent
Return type:osid.authentication.Agent
Raise:OperationFailed – unable to complete request

compliance: mandatory – This method must be implemented.

get_log_entry_record(log_entry_record_type)

Gets the log entry record corresponding to the given LogEntry record Type.

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

Parameters:log_entry_record_type (osid.type.Type) – the type of log entry record to retrieve
Returns:the log entry record
Return type:osid.logging.records.LogEntryRecord
Raise:NullArgumentlog_entry_record_type is null
Raise:OperationFailed – unable to complete request
Raise:Unsupportedhas_record_type(log_entry_record_type) is false

compliance: mandatory – This method must be implemented.

Log Entry Form

class dlkit.logging_.objects.LogEntryForm

Bases: dlkit.osid.objects.OsidObjectForm

This is the form for creating and updating log entries.

Like all OsidForm objects, various data elements may be set here for use in the create and update methods in the LogEntryAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.

priority_metadata

Gets the metadata for a priority type.

Returns:metadata for the priority
Return type:osid.Metadata

compliance: mandatory – This method must be implemented.

priority
timestamp_metadata

Gets the metadata for a timestamp.

Returns:metadata for the timestamp
Return type:osid.Metadata

compliance: mandatory – This method must be implemented.

timestamp
agent_metadata

Gets the metadata for the agent.

Returns:metadata for the agent
Return type:osid.Metadata

compliance: mandatory – This method must be implemented.

agent
get_log_entry_form_record(log_entry_record_type)

Gets the LogEntryFormRecord corresponding to the given log entry record Type.

Parameters:log_entry_record_type (osid.type.Type) – the log entry record type
Returns:the log entry form record
Return type:osid.logging.records.LogEntryFormRecord
Raise:NullArgumentlog_entry_record_type is null
Raise:OperationFailed – unable to complete request
Raise:Unsupportedhas_record_type(log_entry_record_type) is false

compliance: mandatory – This method must be implemented.

Log Entry List

class dlkit.logging_.objects.LogEntryList

Bases: dlkit.osid.objects.OsidList

Like all OsidLists, LogList provides a means for accessing LogEntry elements sequentially either one at a time or many at a time.

Examples: while (lel.hasNext()) { LogEntry entry = lel.getNextLogEntry(); }

or
while (lel.hasNext()) {
LogEntry[] entries = lel.getNextLogEntries(lel.available());

}

next_log_entry

Gets the next LogEntry in this list.

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

compliance: mandatory – This method must be implemented.

get_next_log_entries(n)

Gets the next set of LogEntry elements in this list.

The specified amount must be less than or equal to the return from available().

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

compliance: mandatory – This method must be implemented.

Log

class dlkit.logging_.objects.Log(abc_logging_objects.Log, osid_objects.OsidCatalog)
:noindex:
get_log_record(log_record_type)

Gets the record corresponding to the given Log record Type.

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

Parameters:log_record_type (osid.type.Type) – the type of log record to retrieve
Returns:the log record
Return type:osid.logging.records.LogRecord
Raise:NullArgumentlog_record_type is null
Raise:OperationFailed – unable to complete request
Raise:Unsupportedhas_record_type(log_record_type) is false

compliance: mandatory – This method must be implemented.

Log Form

class dlkit.logging_.objects.LogForm

Bases: dlkit.osid.objects.OsidCatalogForm

This is the form for creating and updating Logs.

Like all OsidForm objects, various data elements may be set here for use in the create and update methods in the LogAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.

get_log_form_record(log_record_type)

Gets the LogFormRecord corresponding to the given log record Type.

Parameters:log_record_type (osid.type.Type) – the log record type
Returns:the log form record
Return type:osid.logging.records.LogFormRecord
Raise:NullArgumentlog_record_type is null
Raise:OperationFailed – unable to complete request
Raise:Unsupportedhas_record_type(log_record_type) is false

compliance: mandatory – This method must be implemented.

Log List

class dlkit.logging_.objects.LogList

Bases: dlkit.osid.objects.OsidList

Like all OsidLists, LogList provides a means for accessing Log elements sequentially either one at a time or many at a time.

Examples: while (ll.hasNext()) { Log log = ll.getNextLog(); }

or
while (ll.hasNext()) {
Log[] logs = ll.getNextLogs(ll.available());

}

next_log

Gets the next Log in this list.

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

compliance: mandatory – This method must be implemented.

get_next_logs(n)

Gets the next set of Log elements in this list.

The specified amount must be less than or equal to the return from available().

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

compliance: mandatory – This method must be implemented.

Log Node

class dlkit.logging_.objects.LogNode

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 LogHierarchySession.

log

Gets the Log at this node.

Returns:the log represented by this node
Return type:osid.logging.Log

compliance: mandatory – This method must be implemented.

parent_log_nodes

Gets the parents of this log.

Returns:the parents of this log
Return type:osid.logging.LogNodeList

compliance: mandatory – This method must be implemented.

child_log_nodes

Gets the children of this log.

Returns:the children of this log
Return type:osid.logging.LogNodeList

compliance: mandatory – This method must be implemented.

Log Node List

class dlkit.logging_.objects.LogNodeList

Bases: dlkit.osid.objects.OsidList

Like all OsidLists, LogNodeList provides a means for accessing LogNode elements sequentially either one at a time or many at a time.

Examples: while (lnl.hasNext()) { LogNode node = lnl.getNextLogNode(); }

or
while (lnl.hasNext()) {
LogNode[] nodes = lnl.getNextLogNodes(lnl.available());

}

next_log_node

Gets the next LogNode in this list.

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

compliance: mandatory – This method must be implemented.

get_next_log_nodes(n)

Gets the next set of LogNode elements in this list.

The specified amount must be less than or equal to the return from available().

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

compliance: mandatory – This method must be implemented.