Interface EntryRetrievalSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface EntryRetrievalSession extends OsidSession

EntryRetrievalSession is used to get dictionary entries. A dictionary entry contains a key and a value. The uniqeness of the entry depends on the key, the key type and the value type.

  • Method Details

    • getDictionaryId

      Id getDictionaryId()
      Gets the Dictionary Id associated with this session.
      Returns:
      the Dictionary Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getDictionary

      Gets the Dictionary associated with this session.
      Returns:
      the Dictionary associated with this session
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canRetrieveEntries

      boolean canRetrieveEntries()
      Tests if this user can perform Entry retrievals. A return of true does not guarantee successful authorization. A return of false indicates that it is known all 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 retrieval methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • retrieveEntry

      Object retrieveEntry(Object key, Type keyType, Type valueType) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the Dictionary entry associated with the given key and types. The keyType indicates the key object type and the valueType indicates the value object return.
      Parameters:
      key - the key of the entry to retrieve
      keyType - the key type of the entry to retrieve
      valueType - the value type of the entry to retrieve
      Returns:
      the returned object
      Throws:
      InvalidArgumentException - key is not of keyType
      NotFoundException - no entry found
      NullArgumentException - key, keyType , or valueType is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.