Interface TextSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface TextSession extends OsidSession

This session defines methods for retrieving DisplayTexts for a Text and set of Parameter arguments.

  • Method Details

    • getPressId

      Id getPressId()
      Gets the Press Id associated with this session.
      Returns:
      the Press Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getPress

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

      boolean canGetText()
      Tests if this user can acquire text. 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 press that may not offer lookup operations to unauthorized users.
      Returns:
      false if text methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • text

      Gets a DisplayText for a Text and set of Parameter arguments supplied in order of their input position.
      Parameters:
      textId - the Id of the text
      arguments - the arguments
      Returns:
      the returned text
      Throws:
      InvalidArgumentException - arguments do not match parameters
      NotFoundException - textId not found
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.