/*
   * (non-Javadoc)
   * @see com.silverpeas.workflow.api.model.Presentation#deleteColumns(java.lang. String)
   */
  public void deleteColumns(String strRoleName) throws WorkflowException {
    Columns search = createColumns();

    search.setRoleName(strRoleName);
    if (!columnsList.remove(search))
      throw new WorkflowException(
          "PresentationImpl.deleteColumns",
          "workflowEngine.EX_COLUMNS_NOT_FOUND",
          "Columns role name=" + strRoleName == null ? "<null>" : strRoleName);
  }
  /*
   * (non-Javadoc)
   * @see com.silverpeas.workflow.api.model.Presentation#getColumnsByRole(java.lang .String)
   */
  public Columns getColumnsByRole(String strRoleName) {
    Columns search;
    int index, indexDefault;

    if (columnsList == null) return null;

    search = createColumns();
    search.setRoleName(strRoleName);
    index = columnsList.indexOf(search);

    if (index == -1) {
      search.setRoleName("default");
      indexDefault = columnsList.indexOf(search);

      if (indexDefault == -1) return null;

      return (Columns) columnsList.get(indexDefault);
    } else return (Columns) columnsList.get(index);
  }