OSID Logo
OSID Specifications
logging package
Version 3.0.0
Release Candidate Preview
Interfaceosid.logging.LogEntryLogAssignmentSession
Implementsosid.OsidSession
Description

This session provides methods to re-assign log entries to Logs. A LogEntry may map to multiple Log objects and removing the last reference to a LogEntry is the equivalent of deleting it. Each Log may have its own authorizations governing who is allowed to operate on it.

Moving or adding a reference of a LogEntry to another Log is not a copy operation (eg: does not change its Id ).

MethodcanAssignLogEntries
Description

Tests if this user can alter log entry/log mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.

Returnboolean false if mapping is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanAssignLogEntriesToLog
Description

Tests if this user can alter log entry/log mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.

Parametersosid.id.IdlogIdthe Id of the Log
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT logId is null
CompliancemandatoryThis method must be implemented.
MethodgetAssignableLogIds
Description

Gets a list of log including and under the given log node in which any log entry can be assigned.

Parametersosid.id.IdlogIdthe Id of the Log
Returnosid.id.IdListlist of assignable log Ids
ErrorsNULL_ARGUMENT logId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetAssignableLogIdsForLogEntry
Description

Gets a list of log including and under the given log node in which a specific log entry can be assigned.

Parametersosid.id.IdlogIdthe Id of the Log
osid.id.IdlogEntryIdthe Id of the LogEntry
Returnosid.id.IdListlist of assignable log Ids
ErrorsNULL_ARGUMENT logId or logEntryId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignLogEntryToLog
Description

Adds an existing LogEntry to a Log.

Parametersosid.id.IdlogEntryIdthe Id of the LogEntry
osid.id.IdlogIdthe Id of the Log
ErrorsALREADY_EXISTS logEntryId is already assigned to logId
NOT_FOUND logEntryId or logId not found
NULL_ARGUMENT logEntryId or logId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignLogEntryFromLog
Description

Removes a LogEntry from a Log.

Parametersosid.id.IdlogEntryIdthe Id of the LogEntry
osid.id.IdlogIdthe Id of the Log
ErrorsNOT_FOUND logEntryId or logId not found or logEntryId not assigned to logId
NULL_ARGUMENT logEntryId or logId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodreassignLogEntryToLog
Description

Moves a LogEntry from one Log to another. Mappings to other Logs are unaffected.

Parametersosid.id.IdlogEntryIdthe Id of the LogEntry
osid.id.IdfromLogIdthe Id of the current Log
osid.id.IdtoLogIdthe Id of the destination Log
ErrorsNOT_FOUND logEntryId, fromLogId, or toLogId not found or logEntryId not mapped to fromLogId
NULL_ARGUMENT logEntryId, fromLogId, or toLogId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.