com.metamatrix.common.object
Interface PropertyDefinitionFilter

All Known Implementing Classes:
DefaultPropertyDefinitionFilter

public interface PropertyDefinitionFilter


Field Summary
static int DISABLE
          Treat this PropertyDefinition as disabled
static int ENABLE
          Treat this PropertyDefinition as enabled
static int EXPERT
          Treat this PropertyDefinition as expert
static int HIDE
          Treat this PropertyDefinition as hidden
static int NA
          The filter is not applicable to the PropertyDefinition
static int REMOVE
          Remove this PropertyDefinition
 
Method Summary
 boolean canFilter(PropertiedObject obj)
          Determine whether the given PropertiedObject is applicable to this filter.
 int filter(PropertiedObjectEditor editor, PropertiedObject obj, PropertyDefinition defn)
          Return the filter code indicating how this PropertyDefinition associated with the specified PropertiedObject instance should be treated by the calling method.
 

Field Detail

NA

static final int NA
The filter is not applicable to the PropertyDefinition

See Also:
Constant Field Values

HIDE

static final int HIDE
Treat this PropertyDefinition as hidden

See Also:
Constant Field Values

ENABLE

static final int ENABLE
Treat this PropertyDefinition as enabled

See Also:
Constant Field Values

DISABLE

static final int DISABLE
Treat this PropertyDefinition as disabled

See Also:
Constant Field Values

EXPERT

static final int EXPERT
Treat this PropertyDefinition as expert

See Also:
Constant Field Values

REMOVE

static final int REMOVE
Remove this PropertyDefinition

See Also:
Constant Field Values
Method Detail

canFilter

boolean canFilter(PropertiedObject obj)
Determine whether the given PropertiedObject is applicable to this filter. If the filter is not applicable the calling method does not need to check all associated PropertyDefinition instances.

Parameters:
obj - the PropertiedObject instance to check
Returns:
true if filter applies, or false otherwise.

filter

int filter(PropertiedObjectEditor editor,
           PropertiedObject obj,
           PropertyDefinition defn)
Return the filter code indicating how this PropertyDefinition associated with the specified PropertiedObject instance should be treated by the calling method.

Parameters:
editor - PropertiedObjectEditor instance to use in the filter.
obj - the PropertiedObject instance the definition is associated with.
defn - the PropertyDefinition instance to check.
Returns:
int the filter code (one of HIDE, ENABLE, DISABLE); never null.


Copyright © 2009. All Rights Reserved.