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 requestcompliance: 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 requestcompliance: mandatory – This method must be implemented.
-
get_log_entry_record
(log_entry_record_type)¶ Gets the log entry record corresponding to the given
LogEntry
recordType
.This method is used to retrieve an object implementing the requested record. The
log_entry_record_type
may be theType
returned inget_record_types()
or any of its parents in aType
hierarchy wherehas_record_type(log_entry_record_type)
istrue
.Parameters: log_entry_record_type ( osid.type.Type
) – the type of log entry record to retrieveReturns: the log entry record Return type: osid.logging.records.LogEntryRecord
Raise: NullArgument
–log_entry_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(log_entry_record_type)
isfalse
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 theLogEntryAdminSession
. 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 recordType
.Parameters: log_entry_record_type ( osid.type.Type
) – the log entry record typeReturns: the log entry form record Return type: osid.logging.records.LogEntryFormRecord
Raise: NullArgument
–log_entry_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(log_entry_record_type)
isfalse
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 accessingLogEntry
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. Thehas_next()
method should be used to test that a nextLogEntry
is available before calling this method.Return type: osid.logging.LogEntry
Raise: IllegalState
– no more elements available in this listRaise: OperationFailed
– unable to complete requestcompliance: 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 ofLogEntry
elements requested which must be less than or equal toavailable()
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 listRaise: OperationFailed
– unable to complete requestcompliance: 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
recordType
.This method is used to retrieve an object implementing the requested record. The
log_record_type
may be theType
returned inget_record_types()
or any of its parents in aType
hierarchy wherehas_record_type(log_record_type)
istrue
.Parameters: log_record_type ( osid.type.Type
) – the type of log record to retrieveReturns: the log record Return type: osid.logging.records.LogRecord
Raise: NullArgument
–log_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(log_record_type)
isfalse
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 theLogAdminSession
. 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 recordType
.Parameters: log_record_type ( osid.type.Type
) – the log record typeReturns: the log form record Return type: osid.logging.records.LogFormRecord
Raise: NullArgument
–log_record_type
isnull
Raise: OperationFailed
– unable to complete requestRaise: Unsupported
–has_record_type(log_record_type)
isfalse
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 accessingLog
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. Thehas_next()
method should be used to test that a nextLog
is available before calling this method.Return type: osid.logging.Log
Raise: IllegalState
– no more elements available in this listRaise: OperationFailed
– unable to complete requestcompliance: 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 ofLog
elements requested which must be less than or equal toavailable()
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 listRaise: OperationFailed
– unable to complete requestcompliance: 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 accessingLogNode
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. Thehas_next()
method should be used to test that a nextLogNode
is available before calling this method.Return type: osid.logging.LogNode
Raise: IllegalState
– no more elements available in this listRaise: OperationFailed
– unable to complete requestcompliance: 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 ofLogNode
elements requested which must be less than or equal toavailable()
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 listRaise: OperationFailed
– unable to complete requestcompliance: mandatory – This method must be implemented.