Class AbstractIndexTableModel

    • Field Detail

      • sortColumn

        protected int sortColumn
        The sort column of the table.
      • sortAscending

        protected boolean sortAscending
        Whether the sorting is ascending or descending.
    • Constructor Detail

      • AbstractIndexTableModel

        public AbstractIndexTableModel()
    • Method Detail

      • setData

        public void setData​(Set<AbstractIndexDescriptor> newData,
                            ControlPanelInfo info)
        Sets the data for this table model.
        Parameters:
        newData - the data for this table model.
        info - the control panel info.
      • forceResort

        public void forceResort()
        Updates the table model contents and sorts its contents depending on the sort options set by the user.
        Specified by:
        forceResort in class SortableTableModel
      • isSortAscending

        public boolean isSortAscending()
        Returns whether the sort is ascending or descending.
        Specified by:
        isSortAscending in class SortableTableModel
        Returns:
        true if the sort is ascending and false otherwise.
      • setSortAscending

        public void setSortAscending​(boolean sortAscending)
        Sets whether to sort ascending of descending.
        Specified by:
        setSortAscending in class SortableTableModel
        Parameters:
        sortAscending - whether to sort ascending or descending.
      • getSortColumn

        public int getSortColumn()
        Returns the column index used to sort.
        Specified by:
        getSortColumn in class SortableTableModel
        Returns:
        the column index used to sort.
      • setSortColumn

        public void setSortColumn​(int sortColumn)
        Sets the column index used to sort.
        Specified by:
        setSortColumn in class SortableTableModel
        Parameters:
        sortColumn - column index used to sort..
      • getIndexAt

        public AbstractIndexDescriptor getIndexAt​(int row)
        Returns the index in the specified row.
        Parameters:
        row - the row.
        Returns:
        the index in the specified row.
      • getRebuildRequiredString

        protected org.forgerock.i18n.LocalizableMessage getRebuildRequiredString​(AbstractIndexDescriptor index)
        Returns the message to be displayed in the cell if an index must be rebuilt.
        Parameters:
        index - the index to be analyzed.
        Returns:
        the message to be displayed in the cell if an index must be rebuilt.
      • compareNames

        protected int compareNames​(AbstractIndexDescriptor i1,
                                   AbstractIndexDescriptor i2)
        Compares the names of the two indexes.
        Parameters:
        i1 - the first index.
        i2 - the second index.
        Returns:
        the alphabetical comparison of the names of both indexes.
      • compareRebuildRequired

        protected int compareRebuildRequired​(AbstractIndexDescriptor i1,
                                             AbstractIndexDescriptor i2)
        Compares the rebuild messages for the two indexes.
        Parameters:
        i1 - the first index.
        i2 - the second index.
        Returns:
        the alphabetical comparison of the rebuild required message of both indexes.
      • getColumnNames

        protected abstract String[] getColumnNames()
        Returns the column names of the table.
        Returns:
        the column names of the table.
      • getLine

        protected abstract String[] getLine​(AbstractIndexDescriptor index)
        Returns the different cell values for a given index in a String array.
        Parameters:
        index - the index.
        Returns:
        the different cell values for a given index in a String array.