@Override
  public void addStickerAction() {
    Board selectedBoard = getModel().getSelectedBoard();
    String input =
        JOptionPane.showInputDialog(
            null,
            TextResources.Dialogs.CREATE_STICKER_MESSAGE,
            TextResources.Dialogs.CREATE_BOARD_TITLE,
            JOptionPane.QUESTION_MESSAGE);

    try {
      if (validateInput(input)) {
        selectedBoard.getStickers().add(new Sticker(input));
        databaseContext.getBoardRepository().store(selectedBoard);
        databaseContext.getBoardRepository().commit();
        getModel().update();
      }
    } catch (Exception e) {
      JOptionPane.showMessageDialog(
          null,
          TextResources.Dialogs.INVALID_INPUT_MESSAGE,
          TextResources.Dialogs.INVALID_INPUT_TITLE,
          JOptionPane.ERROR_MESSAGE);
    }
  }
  @Override
  public void removeStickers() {
    Board selectedBoard = getModel().getSelectedBoard();
    String[] possibleStickers = new String[selectedBoard.getStickers().size()];
    List<Sticker> stickers = selectedBoard.getStickers();
    if (stickers.isEmpty()) {
      JOptionPane.showMessageDialog(
          null,
          TextResources.Dialogs.REMOVE_STICKER_ERR1_MESSAGE,
          TextResources.Dialogs.REMOVE_STICKER_ERR1_TITLE,
          JOptionPane.ERROR_MESSAGE);
      return;
    }

    for (int i = 0; i < stickers.size(); i++) {
      Sticker sticker = stickers.get(i);
      possibleStickers[i] = sticker.getTitle();
    }

    String removeBoardTitle =
        (String)
            JOptionPane.showInputDialog(
                null,
                TextResources.Dialogs.REMOVE_STICKERS_MESSAGE,
                TextResources.Dialogs.REMOVE_STICKERS_TITLE,
                JOptionPane.QUESTION_MESSAGE,
                null,
                possibleStickers,
                possibleStickers[0]);

    for (Sticker sticker : stickers) {
      if (sticker.getTitle().equals(removeBoardTitle)) {
        selectedBoard.getStickers().remove(sticker);
        databaseContext.getBoardRepository().store(selectedBoard);
        databaseContext.getBoardRepository().commit();
        getModel().setSelectedBoard(selectedBoard);
        return;
      }
    }
  }
  @Override
  public void renameBoardAction() {
    Board selectedBoard = getModel().getSelectedBoard();
    String input =
        JOptionPane.showInputDialog(
            null, TextResources.Dialogs.RENAME_BOARD_MESSAGE, selectedBoard.getTitle());

    try {
      if (validateInput(input)) {
        selectedBoard.setTitle(input);
        databaseContext.getBoardRepository().store(selectedBoard);
        databaseContext.getBoardRepository().commit();
        getModel().update();
      }
    } catch (Exception e) {
      JOptionPane.showMessageDialog(
          null,
          TextResources.Dialogs.INVALID_INPUT_MESSAGE,
          TextResources.Dialogs.INVALID_INPUT_TITLE,
          JOptionPane.ERROR_MESSAGE);
    }
  }