Interface LogEntryLogAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
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 ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignLogEntryToLog(Id logEntryId, Id logId) Adds an existingLogEntryto aLog.booleanTests if this user can alter log entry/log mappings.booleancanAssignLogEntriesToLog(Id logId) Tests if this user can alter log entry/log mappings.getAssignableLogIds(Id logId) Gets a list of log including and under the given log node in which any log entry can be assigned.getAssignableLogIdsForLogEntry(Id logId, Id logEntryId) Gets a list of log including and under the given log node in which a specific log entry can be assigned.voidreassignLogEntryToLog(Id logEntryId, Id fromLogId, Id toLogId) Moves aLogEntryfrom oneLogto another.voidunassignLogEntryFromLog(Id logEntryId, Id logId) Removes aLogEntryfrom aLog.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canAssignLogEntries
boolean canAssignLogEntries()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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignLogEntriesToLog
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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Parameters:
logId- theIdof theLog- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-logIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableLogIds
Gets a list of log including and under the given log node in which any log entry can be assigned.- Parameters:
logId- theIdof theLog- Returns:
- list of assignable log
Ids - Throws:
NullArgumentException-logIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableLogIdsForLogEntry
Gets a list of log including and under the given log node in which a specific log entry can be assigned.- Parameters:
logId- theIdof theLoglogEntryId- theIdof theLogEntry- Returns:
- list of assignable log
Ids - Throws:
NullArgumentException-logIdorlogEntryIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignLogEntryToLog
void assignLogEntryToLog(Id logEntryId, Id logId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingLogEntryto aLog.- Parameters:
logEntryId- theIdof theLogEntrylogId- theIdof theLog- Throws:
AlreadyExistsException-logEntryIdis already assigned tologIdNotFoundException-logEntryIdorlogIdnot foundNullArgumentException-logEntryIdorlogIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignLogEntryFromLog
void unassignLogEntryFromLog(Id logEntryId, Id logId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aLogEntryfrom aLog.- Parameters:
logEntryId- theIdof theLogEntrylogId- theIdof theLog- Throws:
NotFoundException-logEntryIdorlogIdnot found orlogEntryIdnot assigned tologIdNullArgumentException-logEntryIdorlogIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignLogEntryToLog
void reassignLogEntryToLog(Id logEntryId, Id fromLogId, Id toLogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aLogEntryfrom oneLogto another. Mappings to otherLogsare unaffected.- Parameters:
logEntryId- theIdof theLogEntryfromLogId- theIdof the currentLogtoLogId- theIdof the destinationLog- Throws:
AlreadyExistsException-logEntryIdalready assigned totoLogIdNotFoundException-logEntryId, fromLogId, ortoLogIdnot found orlogEntryIdnot mapped tofromLogIdNullArgumentException-logEntryId, fromLogId, ortoLogIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-