Package com.avaya.clientservices.collaboration

## Interface Whiteboard

-     public interface Whiteboard

  The Whiteboard object provides access to whiteboard related capabilities and actions.

  This object is accessible via `Collaboration` object. Status updates concerning whiteboard are reported via `WhiteboardListener`.

  This object is responsible for handling a whole whiteboard session within which many independent `WhiteboardSurface` objects can be created whereas each of these objects is responsible for one whiteboard drawing.

  In order to display whiteboard client also needs to create a `WhiteboardRenderer` and initialize it properly.

  See Also:
    `Collaboration`, `WhiteboardRenderer`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addListener​(WhiteboardListener listener)` | Add a new `WhiteboardListener` object to the whiteboard.
    `void` | `end​(WhiteboardCompletionHandler handler)` | Ends this whiteboard session.
    `WhiteboardSurface` | `getActiveSurface()` | Returns active whiteboard surface (page).
    `Capability` | `getAddSurfaceCapability()` | Capability object indicating whether the local user is allowed to add whiteboard surface.
    `int` | `getHeight()` |
    `Capability` | `getRemoveSurfaceCapability()` | Capability object indicating whether the local user is allowed to remove whiteboard surface.
    `java.util.List<WhiteboardSurface>` | `getSurfaces()` | Array containing all existing `WhiteboardSurface` objects in the current whiteboard session.
    `int` | `getWidth()` |
    `void` | `removeListener​(WhiteboardListener listener)` | Removes a `WhiteboardListener` object from the whiteboard.
    `void` | `removeSurface​(WhiteboardSurface surfaceToRemove, WhiteboardCompletionHandler handler)` | Removes given `WhiteboardSurface` page from whiteboard session.
    `void` | `requestNewSurface​(WhiteboardCompletionHandler handler)` | Requests new `WhiteboardSurface` object which will be representing a new page on a whiteboard.
    `void` | `start​(WhiteboardCompletionHandler handler)` | Starts the whiteboard session.

- - ### Method Detail

    - #### addListener

          void addListener​(WhiteboardListener listener)

      Add a new `WhiteboardListener` object to the whiteboard.
      Parameters:
        `listener` - object to be added.

    - #### removeListener

          void removeListener​(WhiteboardListener listener)

      Removes a `WhiteboardListener` object from the whiteboard.
      Parameters:
        `listener` - object to be removed.

    - #### getActiveSurface

          WhiteboardSurface getActiveSurface()

      Returns active whiteboard surface (page).
      With property `getSurfaces()` can be used to display number of active sharing surface in UI.
      Returns:
        active whiteboard surface.
      See Also:
        `WhiteboardSurface`, `getSurfaces()`

    - #### getSurfaces

          java.util.List<WhiteboardSurface> getSurfaces()

      Array containing all existing `WhiteboardSurface` objects in the current whiteboard session. Array is sorted by the creation time of objects.
      Returns:
        list of whiteboard surfaces.
      See Also:
        `WhiteboardSurface`

    - #### start

          void start​(WhiteboardCompletionHandler handler)

      Starts the whiteboard session.
      Parameters:
        `handler` - a block to be called when the operation is completed.

    - #### end

          void end​(WhiteboardCompletionHandler handler)

      Ends this whiteboard session. Another participant with presenter privilege may be able to start a new whiteboard session.
      Parameters:
        `handler` - a block to be called when the operation is completed.

    - #### requestNewSurface

          void requestNewSurface​(WhiteboardCompletionHandler handler)

      Requests new `WhiteboardSurface` object which will be representing a new page on a whiteboard.
      Parameters:
        `handler` - a block to be called when the operation is completed.

    - #### removeSurface

          void removeSurface​(WhiteboardSurface surfaceToRemove,
                             WhiteboardCompletionHandler handler)

      Removes given `WhiteboardSurface` page from whiteboard session.
      Parameters:
        `surfaceToRemove` - whiteboard surface object to remove.
        `handler` - a block to be called when the operation is completed.

    - #### getRemoveSurfaceCapability

          Capability getRemoveSurfaceCapability()

      Capability object indicating whether the local user is allowed to remove whiteboard surface. To do so, the local user needs to be moderator, presenter or panel model mode has to be enabled. It's not allowed to remove surface when it's the last whiteboard surface in current whiteboard session.
      Returns:
        capability information.

    - #### getAddSurfaceCapability

          Capability getAddSurfaceCapability()

      Capability object indicating whether the local user is allowed to add whiteboard surface. To do so, the local user needs to be moderator, presenter or panel model mode has to be enabled.
      Returns:
        capability information.

    - #### getHeight

          int getHeight()

      Returns:
        whiteboard height.

    - #### getWidth

          int getWidth()

      Returns:
        whiteboard width.