Interface AgendaEngineAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface AgendaEngineAssignmentSession extends OsidSession

This session provides methods to re-assign Agendas to Engine mappings. An Agenda may appear in multiple Engine objects and removing the last reference to an Agenda is the equivalent of deleting it. Each Engine may have its own authorizations governing who is allowed to operate on it.

Adding a reference of an Agenda to another Engine is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignAgendas

      boolean canAssignAgendas()
      Tests if this user can alter agenda/engine 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 lookup operations to unauthorized users.
      Returns:
      false if check is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignAgendasToEngine

      boolean canAssignAgendasToEngine(Id engineId)
      Tests if this user can alter agenda/engine 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 lookup operations to unauthorized users.
      Parameters:
      engineId - the Id of the Engine
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - engineId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableEngineIds

      IdList getAssignableEngineIds(Id engineId) throws OperationFailedException
      Gets a list of engines including and under the given engine node in which any agenda can be assigned.
      Parameters:
      engineId - the Id of the Engine
      Returns:
      list of assignable engine Ids
      Throws:
      NullArgumentException - engineId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableEngineIdsForAgenda

      IdList getAssignableEngineIdsForAgenda(Id engineId, Id agendaId) throws OperationFailedException
      Gets a list of engines including and under the given engine node in which a specific agenda can be assigned.
      Parameters:
      engineId - the Id of the Engine
      agendaId - the Id of the Agenda
      Returns:
      list of assignable engine Ids
      Throws:
      NullArgumentException - engineId or agendaId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignAgendaToEngine

      void assignAgendaToEngine(Id agendaId, Id engineId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Agenda to a Engine .
      Parameters:
      agendaId - the Id of the Agenda
      engineId - the Id of the Engine
      Throws:
      AlreadyExistsException - agendaId is already assigned to engineId
      NotFoundException - agendaId or engineId not found
      NullArgumentException - agendaId or engineId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignAgendaFromEngine

      void unassignAgendaFromEngine(Id agendaId, Id engineId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes an Agenda from a Engine .
      Parameters:
      agendaId - the Id of the Agenda
      engineId - the Id of the Engine
      Throws:
      NotFoundException - agendaId or engineId not found or agendaId not assigned to engineId
      NullArgumentException - agendaId or engineId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignAgendaToEngine

      void reassignAgendaToEngine(Id agendaId, Id fromEngineId, Id toEngineId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves an Agenda from one Engine to another. Mappings to other Engines are unaffected.
      Parameters:
      agendaId - the Id of the Agenda
      fromEngineId - the Id of the current Engine
      toEngineId - the Id of the destination Engine
      Throws:
      AlreadyExistsException - agendaId already assigned to toEngineId
      NotFoundException - agendaId, fromEngineId , or toEngineId not found or agendaId not mapped to fromEngineId
      NullArgumentException - agendaId, fromEngineId , or toEngineId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.