com.microfocus.awm.model.internal

## Class FilterList

- java.lang.Object
- - java.util.Observable
  - - com.microfocus.awm.model.internal.TaurusDirectory
    - - com.microfocus.awm.model.internal.FilterList

- All Implemented Interfaces:
    IFilterList

      public class FilterList
      extends TaurusDirectory
      implements IFilterList

  Singleton class which contains every defined Filter in TAURUS. It notifies observers on changes.

- - ### Field Summary

    - ### Fields inherited from class com.microfocus.awm.model.internal.TaurusDirectory

      `ATTRIBUTE_CHILD_RESOURCE_ID, ELEMENT_CHILD_RESOURCE`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addFilter(IFilter pFilter, boolean pSaveFilters, boolean pNotify)` Add a the given `IFilter` to the `IFilterList`.
    `void` | `addFilter(IFilter pFilter, boolean pSaveFilters, boolean pNotify, int pIndex)` Add the given `IFilter` to the `IFilterList` at the given position.
    `void` | `addFilter(java.util.List<IFilter> pFilters, boolean pSaveFilters, boolean pNotify)` Add a the given `IFilter` to the `IFilterList`.
    `void` | `addFilter(java.util.List<IFilter> pFilters, boolean pSaveFilters, boolean pNotify, int pIndex)` Add the given `IFilter` to the `IFilterList` at the given position.
    `void` | `deleteFilters()` Remove the ft_filters.xml file from the workspace.
    `IFilter` | `getFilter(java.lang.String pFilterID)` Get the filter with the given `IFilter` id from the `IFilterList`.
    `java.util.List<IFilter>` | `getFilters()` Gets the list of all currently loaded `IFilter`s.
    `static FilterList` | `getInstance()` Creates a new instance of this Class or returns the existing one.
    `int` | `indexOf(IFilter pFilter)` Returns the index of the given `IFilter` or `-1` if it is not in the `IFilterList`.
    `void` | `loadFilters()` load the filters from the filters.xml file under the internal TAURUS project
    `void` | `moveFilter(IFilter pFilter, boolean pSaveFilters, boolean pNotify, int pIndex)` Move the given `IFilter` to the `IFilterList` at the given position.
    `void` | `moveFilter(java.util.List<IFilter> pFilters, boolean pSaveFilters, boolean pNotify, int pIndex)` Move the given `IFilter`s to the `IFilterList` list at the given position.
    `void` | `removeFilter(IFilter pFilter)` Remove the given `IFilter` from the `IFilterList`.
    `void` | `removeFilter(java.util.List<IFilter> pFilters)` Remove the given `IFilter`s from the `IFilterList`.
    `void` | `saveFilters()` save all defined filters in the filters.xml file under the internal TAURUS project
    `void` | `setFilter(IFilter pFilter)` Currently only notifies observers that a filter has been updated.
    `void` | `setFilters(java.util.List<IFilter> pFilters)` Deprecated.
    `void` | `sortList(int pDirection)` Sorts the list of filters alphabetically.

    - ### Methods inherited from class com.microfocus.awm.model.internal.TaurusDirectory

      `addChild, getResourceID, notifyObservers, saveChildren`

    - ### Methods inherited from class java.util.Observable

      `addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers`

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

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

    - ### Methods inherited from interface com.microfocus.awm.model.IFilterList

      `addObserver, deleteObserver`

- - ### Method Detail

    - #### getInstance

          public static FilterList getInstance()

      Creates a new instance of this Class or returns the existing one.
      Returns:
        the instance of FilterList

    - #### addFilter

          public void addFilter(IFilter pFilter,
                                boolean pSaveFilters,
                                boolean pNotify)
                         throws TaurusCoreException

      Description copied from interface: `IFilterList`
      Add a the given `IFilter` to the `IFilterList`.
      Specified by:
        `addFilter` in interface `IFilterList`
      Parameters:
        `pFilter` - filter to be added
        `pSaveFilters` - 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 updating the filter cache fails

    - #### addFilter

          public void addFilter(java.util.List<IFilter> pFilters,
                                boolean pSaveFilters,
                                boolean pNotify)
                         throws TaurusCoreException

      Description copied from interface: `IFilterList`
      Add a the given `IFilter` to the `IFilterList`.
      Specified by:
        `addFilter` in interface `IFilterList`
      Parameters:
        `pFilters` - filters to be added
        `pSaveFilters` - 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 updating the filter cache fails

    - #### addFilter

          public void addFilter(IFilter pFilter,
                                boolean pSaveFilters,
                                boolean pNotify,
                                int pIndex)
                         throws TaurusCoreException

      Description copied from interface: `IFilterList`
      Add the given `IFilter` to the `IFilterList` at the given position.
      Specified by:
        `addFilter` in interface `IFilterList`
      Parameters:
        `pFilter` - filter to be added
        `pSaveFilters` - 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 updating the filter cache fails

    - #### addFilter

          public void addFilter(java.util.List<IFilter> pFilters,
                                boolean pSaveFilters,
                                boolean pNotify,
                                int pIndex)
                         throws TaurusCoreException

      Description copied from interface: `IFilterList`
      Add the given `IFilter` to the `IFilterList` at the given position.
      Specified by:
        `addFilter` in interface `IFilterList`
      Parameters:
        `pFilters` - filters to be added
        `pSaveFilters` - 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 updating the filter cache fails

    - #### moveFilter

          public void moveFilter(IFilter pFilter,
                                 boolean pSaveFilters,
                                 boolean pNotify,
                                 int pIndex)
                          throws TaurusCoreException

      Description copied from interface: `IFilterList`
      Move the given `IFilter` to the `IFilterList` at the given position.
      Specified by:
        `moveFilter` in interface `IFilterList`
      Parameters:
        `pFilter` - filter to be added
        `pSaveFilters` - 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 updating the filter cache fails

    - #### moveFilter

          public void moveFilter(java.util.List<IFilter> pFilters,
                                 boolean pSaveFilters,
                                 boolean pNotify,
                                 int pIndex)
                          throws TaurusCoreException

      Description copied from interface: `IFilterList`
      Move the given `IFilter`s to the `IFilterList` list at the given position.
      Specified by:
        `moveFilter` in interface `IFilterList`
      Parameters:
        `pFilters` - filters to be added
        `pSaveFilters` - 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 updating the filter cache fails

    - #### setFilter

          public void setFilter(IFilter pFilter)

      Currently only notifies observers that a filter has been updated.
      Parameters:
        `pFilter` - the updated filter

    - #### removeFilter

          public void removeFilter(IFilter pFilter)
                            throws TaurusCoreException

      Description copied from interface: `IFilterList`
      Remove the given `IFilter` from the `IFilterList`.
      Specified by:
        `removeFilter` in interface `IFilterList`
      Parameters:
        `pFilter` - filter to be removed
      Throws:
        `TaurusCoreException` - if updating the filter cache fails

    - #### removeFilter

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

      Description copied from interface: `IFilterList`
      Remove the given `IFilter`s from the `IFilterList`.
      Specified by:
        `removeFilter` in interface `IFilterList`
      Parameters:
        `pFilters` - filters to be removed
      Throws:
        `TaurusCoreException` - if updating the filter cache fails

    - #### getFilter

          public IFilter getFilter(java.lang.String pFilterID)

      Description copied from interface: `IFilterList`
      Get the filter with the given `IFilter` id from the `IFilterList`.
      Specified by:
        `getFilter` in interface `IFilterList`
      Parameters:
        `pFilterID` - id of the filter
      Returns:
        the filter with the given filter id

    - #### getFilters

          public java.util.List<IFilter> getFilters()
                                             throws TaurusCoreException

      Description copied from interface: `IFilterList`
      Gets the list of all currently loaded `IFilter`s.
      Specified by:
        `getFilters` in interface `IFilterList`
      Returns:
        a list of all filters
      Throws:
        `TaurusCoreException` - if loading the filter cache fails

    - #### setFilters

          @Deprecated
          public void setFilters(java.util.List<IFilter> pFilters)

      Deprecated.
      Specified by:
        `setFilters` in interface `IFilterList`
      Parameters:
        `pFilters` - the list of filters to set

    - #### loadFilters

          public void loadFilters()
                           throws TaurusCoreException

      load the filters from the filters.xml file under the internal TAURUS project
      Specified by:
        `loadFilters` in interface `IFilterList`
      Throws:
        `TaurusCoreException` - if loading the filter cache fails

    - #### saveFilters

          public void saveFilters()
                           throws TaurusCoreException

      save all defined filters in the filters.xml file under the internal TAURUS project
      Specified by:
        `saveFilters` in interface `IFilterList`
      Throws:
        `TaurusCoreException` - if saving the filter cache fails

    - #### deleteFilters

          public void deleteFilters()
                             throws TaurusCoreException

      Description copied from interface: `IFilterList`
      Remove the ft_filters.xml file from the workspace.
      Specified by:
        `deleteFilters` in interface `IFilterList`
      Throws:
        `TaurusCoreException` - if updating the filter cache fails

    - #### indexOf

          public int indexOf(IFilter pFilter)

      Description copied from interface: `IFilterList`
      Returns the index of the given `IFilter` or `-1` if it is not in the `IFilterList`.
      Specified by:
        `indexOf` in interface `IFilterList`
      Parameters:
        `pFilter` - the `IFilter`
      Returns:
        the index of the given filter or `-1`

    - #### sortList

          public void sortList(int pDirection)

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

Copyright © 2015 Micro Focus GmbH. All rights reserved.