Interface EntryDictionaryAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface EntryDictionaryAssignmentSession extends OsidSession

This session provides methods to re-assign enrties to dictionaries. An Entry may map to multiple Dictionaries and removing the last reference to an Entry is the equivalent of deleting it. Each Dictionary may have its own authorizations governing who is allowed to operate on it.

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

  • Method Details

    • canAssignEntries

      boolean canAssignEntries()
      Tests if this user can alter entry/dictionary 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.
    • canAssignEntriesToDictionary

      boolean canAssignEntriesToDictionary(Id dictionaryId)
      Tests if this user can alter entry/dictionary 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:
      dictionaryId - the Id of the Dictionary
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - dictionaryId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableDictionaryIds

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

      IdList getAssignableDictionaryIdsForEntry(Id dictionaryId, Id entryId) throws OperationFailedException
      Gets a list of dictionaries including and under the given dictionary node in which a specific entry can be assigned.
      Parameters:
      dictionaryId - the Id of the Dictionary
      entryId - the Id of the Entry
      Returns:
      list of assignable dictionary Ids
      Throws:
      NullArgumentException - dictionaryId or entryId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignEntryToDictionary

      void assignEntryToDictionary(Id entryId, Id dictionaryId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Entry to a Dictionary .
      Parameters:
      entryId - the Id of the Entry
      dictionaryId - the Id of the Dictionary
      Throws:
      AlreadyExistsException - entryId is already assigned to dictionaryId
      NotFoundException - entryId or dictionaryId not found
      NullArgumentException - entryId or dictionaryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignEntryFromDictionary

      void unassignEntryFromDictionary(Id entryId, Id dictionaryId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes an Entry from a Dictionary .
      Parameters:
      entryId - the Id of the Entry
      dictionaryId - the Id of the Dictionary
      Throws:
      NotFoundException - entryId or dictionaryId not found or entryId not assigned to dictionaryId
      NullArgumentException - entryId or dictionaryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignEntryToDictionary

      void reassignEntryToDictionary(Id entryId, Id fromDictionaryId, Id toDictionaryId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves an Entry from one Dictionary to another. Mappings to other Dictionaries are unaffected.
      Parameters:
      entryId - the Id of the Entry
      fromDictionaryId - the Id of the current Dictionary
      toDictionaryId - the Id of the destination Dictionary
      Throws:
      AlreadyExistsException - entryId already assigned to toDictionaryId
      NotFoundException - entryId, fromDictionaryId , or toDictionaryId not found or entryId not mapped to fromDictionaryId
      NullArgumentException - entryId fromDictionaryId , or toDictionaryId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.