ERXFilteredQualifierTraversal Class Reference

Inherits er::extensions::qualifiers::ERXQualifierTraversal.

Collaboration diagram for ERXFilteredQualifierTraversal:

Collaboration graph
[legend]

List of all members.

Static Public Member Functions

static void checkQualifierForEntityWithFilter (EOQualifier qualifier, EOEntity entity, ERXKeyFilter filter) throws SecurityException
static ERXKey.Type typeForKeyInEntity (String key, EOEntity entity)

Protected Member Functions

void checkKey (String key) throws SecurityException
 ERXFilteredQualifierTraversal (EOEntity entity, ERXKeyFilter filter)
boolean traverseKeyComparisonQualifier (EOKeyComparisonQualifier q)
boolean traverseKeyValueQualifier (EOKeyValueQualifier q)
boolean traverseUnknownQualifier (EOQualifierEvaluation q)

Private Attributes

EOEntity _entity
ERXKeyFilter _filter


Detailed Description

ERXFilteredQualifierTraversal performs a security check on a qualifier, throwing a SecurityException if a qualifier is found that attempts to qualify a key that isn't permitted by a given ERXKeyFilter. This prevents people from doing things like "employee.salary > 100000" when employee.salary is an excluded key in your filter.

Author:
mschrag

Constructor & Destructor Documentation

ERXFilteredQualifierTraversal ( EOEntity  entity,
ERXKeyFilter  filter 
) [protected]

Constructs a new ERXFilteredQualifierTraversal.

Parameters:
entity the entity to resolve keypaths on
filter the filter to check against


Member Function Documentation

void checkKey ( String  key  )  throws SecurityException [protected]

Checks the given key and throws an exception if the filter does not match it.

Parameters:
key the key to check
Exceptions:
SecurityException if the key does not match

static void checkQualifierForEntityWithFilter ( EOQualifier  qualifier,
EOEntity  entity,
ERXKeyFilter  filter 
) throws SecurityException [static]

Traverses the given qualifier, checking each keypath against the given filter, evaluated against the given entity.

Parameters:
qualifier the qualifier to check
entity the entity to resolve keypaths against
filter the filter to evaluate with
Exceptions:
SecurityException if a keypath is not matched by the filter

boolean traverseKeyComparisonQualifier ( EOKeyComparisonQualifier  q  )  [protected]

Should traverse key comparison qualifier?

Parameters:
q the qualifier to process
Returns:
should traverse key comparison qualifier

Reimplemented from ERXQualifierTraversal.

boolean traverseKeyValueQualifier ( EOKeyValueQualifier  q  )  [protected]

Should traverse a key value qualifier?

Parameters:
q the qualifier to process
Returns:
should traverse key value qualifier

Reimplemented from ERXQualifierTraversal.

boolean traverseUnknownQualifier ( EOQualifierEvaluation  q  )  [protected]

Should traverse unknown qualifier? Logs an error.

Parameters:
q the qualifier to process
Returns:
should traverse boolean qualifier

Reimplemented from ERXQualifierTraversal.

static ERXKey.Type typeForKeyInEntity ( String  key,
EOEntity  entity 
) [static]

Returns the ERXKey.Type for a keypath on a particular entity. This should probably be in a more generic utility class. I can't put it on ERXKey because it would break JavaClient people when they use eogenerated classes with ERXKey properties.

Parameters:
key the key to lookup
entity the entity to resolve the keypath on
Returns:
the ERXKey.Type for the given keypath, or null if there is no matching key


Member Data Documentation

EOEntity _entity [private]

ERXKeyFilter _filter [private]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:27 2012 for Project Wonder by  doxygen 1.5.8