org.palo.api.subsets
Interface SubsetFilter

All Known Subinterfaces:
EffectiveFilter, RestrictiveFilter, StructuralFilter
All Known Implementing Classes:
AliasFilter, AttributeFilter, DataFilter, HierarchicalFilter, PicklistFilter, SortingFilter, TextFilter

public interface SubsetFilter

SubsetFilter

A subset filter defines certain settings and criteria to determine the elements within a subset. There exists three main filter categories namely EffectiveFilter which influences other filters, RestrictiveFilter which filters out subset elements and finally StructuralFilter which sorts the subset elements.

Version:
$Id: SubsetFilter.html,v 1.5 2009/07/09 11:01:46 ArndHouben Exp $
See Also:
AliasFilter}, {@link AttributeFilter}, {@link DataFilter}, {@link HierarchicalFilter}, {@link PicklistFilter}, {@link SortingFilter}, {@link TextFilter}

Field Summary
static int TYPE_ALIAS
          type constant for alias filter
static int TYPE_ATTRIBUTE
          type constant for attribute filter
static int TYPE_DATA
          type constant for data filter
static int TYPE_HIERARCHICAL
          type constant for hierarchical filter
static int TYPE_PICKLIST
          type constant for picklist filter
static int TYPE_SORTING
          type constant for sorting filter
static int TYPE_TEXT
          type constant for textual filter
 
Method Summary
 void adapt(SubsetFilter from)
          Adapts this subset filter from the given one.
 void add(EffectiveFilter filter)
          Adds the given EffectiveFilter to the list of all affective filters which affect this subset filter
 void bind(Subset2 subset)
          Binds this filter instance to the given Subset2 NOTE: PLEASE DON'T USE!
 SubsetFilter copy()
          Creates a deep copy of this subset filter
 Hierarchy getHierarchy()
          Convenient method to access the subset hierarchy.
 FilterSetting getSettings()
          Returns the internal settings of this filter.
 Subset2 getSubset()
          Returns the Subset2 to which this filter belongs or null if this filter isn't bind to a subset yet.
 int getType()
          Returns the filter type which is one of the defined type constants.
 void initialize()
          Initializes this filter.
 void remove(EffectiveFilter filter)
          Removes the given EffectiveFilter from the list of all affective filters which affect this subset filter
 void reset()
          Resets this filter, i.e. its internal setting is switched back to its default.
 void unbind()
          Releases this filter instance from a previously binded Subset2 NOTE: PLEASE DON'T USE!
 void validateSettings()
          Checks if the internal subset settings are valid.
 

Field Detail

TYPE_TEXT

static final int TYPE_TEXT
type constant for textual filter

See Also:
Constant Field Values

TYPE_HIERARCHICAL

static final int TYPE_HIERARCHICAL
type constant for hierarchical filter

See Also:
Constant Field Values

TYPE_PICKLIST

static final int TYPE_PICKLIST
type constant for picklist filter

See Also:
Constant Field Values

TYPE_DATA

static final int TYPE_DATA
type constant for data filter

See Also:
Constant Field Values

TYPE_SORTING

static final int TYPE_SORTING
type constant for sorting filter

See Also:
Constant Field Values

TYPE_ATTRIBUTE

static final int TYPE_ATTRIBUTE
type constant for attribute filter

See Also:
Constant Field Values

TYPE_ALIAS

static final int TYPE_ALIAS
type constant for alias filter

See Also:
Constant Field Values
Method Detail

getType

int getType()
Returns the filter type which is one of the defined type constants.

Returns:
the filter type

reset

void reset()
Resets this filter, i.e. its internal setting is switched back to its default. Clears all internal used caches too.


getSettings

FilterSetting getSettings()
Returns the internal settings of this filter.

Returns:

initialize

void initialize()
Initializes this filter.


getHierarchy

Hierarchy getHierarchy()
Convenient method to access the subset hierarchy.

Returns:
the subset hierarchy

add

void add(EffectiveFilter filter)
Adds the given EffectiveFilter to the list of all affective filters which affect this subset filter

Parameters:
filter - a filter which affects this subset filter.

remove

void remove(EffectiveFilter filter)
Removes the given EffectiveFilter from the list of all affective filters which affect this subset filter

Parameters:
filter - the affective filter to remove

adapt

void adapt(SubsetFilter from)
Adapts this subset filter from the given one. Both filter must be of same type!

Parameters:
from - the subset filter to adapt from

copy

SubsetFilter copy()
Creates a deep copy of this subset filter

Returns:
a copy of this subset filter

getSubset

Subset2 getSubset()
Returns the Subset2 to which this filter belongs or null if this filter isn't bind to a subset yet.

Returns:
the Subset2 to which this filter belongs or null

bind

void bind(Subset2 subset)

Binds this filter instance to the given Subset2

NOTE: PLEASE DON'T USE! INTERNAL METHOD

Parameters:
subset -

unbind

void unbind()

Releases this filter instance from a previously binded Subset2

NOTE: PLEASE DON'T USE! INTERNAL METHOD


validateSettings

void validateSettings()
                      throws PaloIOException
Checks if the internal subset settings are valid.

Throws:
PaloIOException - if internal subset settings are not valid.