Package Products :: Package Zuul :: Package routers :: Module zep :: Class _FilterParser
[hide private]
[frames] | no frames]

Class _FilterParser

source code

object --+
         |
        _FilterParser

Parses the filter related params received from the ui to search for "or clauses", "NULLs" and "NOTs"

Instance Methods [hide private]
 
__init__(self, zep_facade)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
findExclusionParams(self, params)
Look for filter params that contain the NOT_SEPARATOR
source code
 
_cleanText(self, clause) source code
 
_addWildcardsToFilter(self, field, value) source code
 
_getOrClauses(self, field, value)
Given a filter field value, check if it contains the OR_SEPARATOR.
source code
 
parseParams(self, params)
Parses the filter params passed from the UI looking for OR clauses or NULL values
source code
 
parseDetails(self, details)
Parses the filter details passed from the UI looking for OR clauses or NULL values
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  NOT_SEPARATOR = "!!"
  OR_SEPARATOR = "||"
  NULL_CHAR = '""'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, zep_facade)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__

findExclusionParams(self, params)

source code 

Look for filter params that contain the NOT_SEPARATOR

Parameters:
  • params (dictionary) - dictionary containing filter parameters from the ui
Returns:
dictionary with the params that must be NOT filtered

_getOrClauses(self, field, value)

source code 

Given a filter field value, check if it contains the OR_SEPARATOR.

Parameters:
  • field (string) - name of the field
  • value (string) - field value received from the UI
Returns:
list of OR clauses

parseParams(self, params)

source code 

Parses the filter params passed from the UI looking for OR clauses or NULL values

Parameters:
  • params (dictionary) - dict of filter params passed from the UI @return

parseDetails(self, details)

source code 

Parses the filter details passed from the UI looking for OR clauses or NULL values

Parameters:
  • details (dictionary) - dict of filter details passed from the UI @return