Interface LogEntryLogAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface LogEntryLogAssignmentSession extends 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 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 a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignLogEntriesToLog

      boolean canAssignLogEntriesToLog(Id logId)
      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.
      Parameters:
      logId - the Id of the Log
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - logId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableLogIds

      IdList getAssignableLogIds(Id logId) throws OperationFailedException
      Gets a list of log including and under the given log node in which any log entry can be assigned.
      Parameters:
      logId - the Id of the Log
      Returns:
      list of assignable log Ids
      Throws:
      NullArgumentException - logId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableLogIdsForLogEntry

      IdList getAssignableLogIdsForLogEntry(Id logId, Id logEntryId) throws OperationFailedException
      Gets a list of log including and under the given log node in which a specific log entry can be assigned.
      Parameters:
      logId - the Id of the Log
      logEntryId - the Id of the LogEntry
      Returns:
      list of assignable log Ids
      Throws:
      NullArgumentException - logId or logEntryId is null
      OperationFailedException - 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 existing LogEntry to a Log .
      Parameters:
      logEntryId - the Id of the LogEntry
      logId - the Id of the Log
      Throws:
      AlreadyExistsException - logEntryId is already assigned to logId
      NotFoundException - logEntryId or logId not found
      NullArgumentException - logEntryId or logId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignLogEntryFromLog

      void unassignLogEntryFromLog(Id logEntryId, Id logId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a LogEntry from a Log .
      Parameters:
      logEntryId - the Id of the LogEntry
      logId - the Id of the Log
      Throws:
      NotFoundException - logEntryId or logId not found or logEntryId not assigned to logId
      NullArgumentException - logEntryId or logId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignLogEntryToLog

      void reassignLogEntryToLog(Id logEntryId, Id fromLogId, Id toLogId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a LogEntry from one Log to another. Mappings to other Logs are unaffected.
      Parameters:
      logEntryId - the Id of the LogEntry
      fromLogId - the Id of the current Log
      toLogId - the Id of the destination Log
      Throws:
      AlreadyExistsException - logEntryId already assigned to toLogId
      NotFoundException - logEntryId, fromLogId , or toLogId not found or logEntryId not mapped to fromLogId
      NullArgumentException - logEntryId, fromLogId , or toLogId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.