com.microfocus.awm.control

## Class FilterController

- java.lang.Object
- - com.microfocus.awm.control.FilterController

-     public class FilterController
      extends java.lang.Object

  Contains methods to add, remove and move `IFilter` instances of a loaded AWM application.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `SORT_DIR_ASCENDING` Ascending sort order.
    `static int` | `SORT_DIR_DESCENDING` Descending sort order.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FilterController()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `execFilterAdd(IFilter pFilter, boolean pSaveFilter, boolean pNotify)` Add a the given filter to the TAURUS filter list.
    `static void` | `execFilterAdd(IFilter pFilter, boolean pSaveFilter, boolean pNotify, int pIndex)` Add the given filter to the TAURUS filter list at the given position.
    `static void` | `execFilterAdd(java.util.List<IFilter> pFilters, boolean pSaveFilter, boolean pNotify)` Add the given filters to the TAURUS filter list.
    `static void` | `execFilterAdd(java.util.List<IFilter> pFilters, boolean pSaveFilter, boolean pNotify, int pIndex)` Add the given filters to the TAURUS filter list at the given position.
    `static void` | `execFilterMove(IFilter pFilter, boolean pSaveFilter, boolean pNotify, int pIndex)` Move the given filter to the TAURUS filter list at the given position.
    `static void` | `execFilterMove(java.util.List<IFilter> pFilters, boolean pSaveFilter, boolean pNotify, int pIndex)` Move the given filters to the TAURUS filter list at the given position.
    `static void` | `execFilterRemove(IFilter pFilter)` Remove the given filter from the TAURUS filter list.
    `static void` | `execFilterRemove(java.util.List<IFilter> pFilters)` Remove the given filters from the TAURUS filter list.
    `static IFilter` | `getFilter(java.lang.String pFilterID)` Call `FilterList.getFilter(String)`.
    `static int` | `getFilterListSize()` Gets the number of existing filters of the currently loaded application.
    `static int` | `indexOf(IFilter pFilter)` Returns the index of the given filter or `-1` if it is not in the filter list.
    `static void` | `setFilter(IFilter pFilter)` Call the `FilterList.setFilter(IFilter)`.
    `static void` | `sortFilterList(int pDirection)` Sorts the list of filters alphabetically.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### SORT_DIR_ASCENDING

          public static final int SORT_DIR_ASCENDING

      Ascending sort order.
      See Also:
        Constant Field Values

    - #### SORT_DIR_DESCENDING

          public static final int SORT_DIR_DESCENDING

      Descending sort order.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### FilterController

          public FilterController()

  - ### Method Detail

    - #### execFilterAdd

          public static void execFilterAdd(IFilter pFilter,
                                           boolean pSaveFilter,
                                           boolean pNotify)
                                    throws TaurusCoreException

      Add a the given filter to the TAURUS filter list.
      Parameters:
        `pFilter` - filter to be added
        `pSaveFilter` - if `true` save the filter list to the ft_filters.xml file in the workspace
        `pNotify` - if `true` notify the observers of the filter list
      Throws:
        `TaurusCoreException` - if saving the added filter into cache fails

    - #### execFilterAdd

          public static void execFilterAdd(IFilter pFilter,
                                           boolean pSaveFilter,
                                           boolean pNotify,
                                           int pIndex)
                                    throws TaurusCoreException

      Add the given filter to the TAURUS filter list at the given position.
      Parameters:
        `pFilter` - filter to be added
        `pSaveFilter` - if `true` save the filter list to the ft_filters.xml file in the workspace
        `pNotify` - if `true` notify the observers of the filter list
        `pIndex` - position at which the filter should be added
      Throws:
        `TaurusCoreException` - if saving the added filter into cache fails

    - #### execFilterAdd

          public static void execFilterAdd(java.util.List<IFilter> pFilters,
                                           boolean pSaveFilter,
                                           boolean pNotify)
                                    throws TaurusCoreException

      Add the given filters to the TAURUS filter list.
      Parameters:
        `pFilters` - filters to be added
        `pSaveFilter` - if `true` save the filter list to the ft_filters.xml file in the workspace
        `pNotify` - if `true` notify the observers of the filter list
      Throws:
        `TaurusCoreException` - if saving the added filter into cache fails

    - #### execFilterAdd

          public static void execFilterAdd(java.util.List<IFilter> pFilters,
                                           boolean pSaveFilter,
                                           boolean pNotify,
                                           int pIndex)
                                    throws TaurusCoreException

      Add the given filters to the TAURUS filter list at the given position.
      Parameters:
        `pFilters` - filters to be added
        `pSaveFilter` - if `true` save the filter list to the ft_filters.xml file in the workspace
        `pNotify` - if `true` notify the observers of the filter list
        `pIndex` - position at which the filters should be added
      Throws:
        `TaurusCoreException` - if saving the added filter into cache fails

    - #### execFilterMove

          public static void execFilterMove(IFilter pFilter,
                                            boolean pSaveFilter,
                                            boolean pNotify,
                                            int pIndex)
                                     throws TaurusCoreException

      Move the given filter to the TAURUS filter list at the given position.
      Parameters:
        `pFilter` - filter to be moved
        `pSaveFilter` - if `true` save the filter list to the ft_filters.xml file in the workspace
        `pNotify` - if `true` notify the observers of the filter list
        `pIndex` - position at which the filter should be moved
      Throws:
        `TaurusCoreException` - if saving the moved filter into cache fails

    - #### execFilterMove

          public static void execFilterMove(java.util.List<IFilter> pFilters,
                                            boolean pSaveFilter,
                                            boolean pNotify,
                                            int pIndex)
                                     throws TaurusCoreException

      Move the given filters to the TAURUS filter list at the given position.
      Parameters:
        `pFilters` - filters to be moved
        `pSaveFilter` - if `true` save the filter list to the ft_filters.xml file in the workspace
        `pNotify` - if `true` notify the observers of the filter list
        `pIndex` - position at which the filters should be moved
      Throws:
        `TaurusCoreException` - if saving the moved filter into cache fails

    - #### indexOf

          public static int indexOf(IFilter pFilter)

      Returns the index of the given filter or `-1` if it is not in the filter list.
      Parameters:
        `pFilter` - the `IFilter`
      Returns:
        the index of the given filter or `-1`

    - #### execFilterRemove

          public static void execFilterRemove(IFilter pFilter)
                                       throws TaurusCoreException

      Remove the given filter from the TAURUS filter list.
      Parameters:
        `pFilter` - filter to be removed
      Throws:
        `TaurusCoreException` - if saving the filter cache fails after the operation

    - #### execFilterRemove

          public static void execFilterRemove(java.util.List<IFilter> pFilters)
                                       throws TaurusCoreException

      Remove the given filters from the TAURUS filter list.
      Parameters:
        `pFilters` - filter to be removed
      Throws:
        `TaurusCoreException` - if saving the filter cache fails after the operation

    - #### setFilter

          public static void setFilter(IFilter pFilter)

      Call the `FilterList.setFilter(IFilter)`.
      Parameters:
        `pFilter` - the updated filter

    - #### getFilterListSize

          public static int getFilterListSize()
                                       throws TaurusCoreException

      Gets the number of existing filters of the currently loaded application.
      Returns:
        the number of existing filters
      Throws:
        `TaurusCoreException` - if an exception occurs while loading the filter cache

    - #### sortFilterList

          public static void sortFilterList(int pDirection)

      Sorts the list of filters alphabetically.
      Parameters:
        `pDirection` - the sort direction. Either `SORT_DIR_ASCENDING` or `SORT_DIR_DESCENDING`.

    - #### getFilter

          public static IFilter getFilter(java.lang.String pFilterID)

      Call `FilterList.getFilter(String)`.
      Parameters:
        `pFilterID` - id of the filter
      Returns:
        the filter with the given filter id

Copyright © 2015 Micro Focus GmbH. All rights reserved.