Qualifiers are callable objects that can be used to ‘match’ a job definition to some set of rules.
A JobQualifier that has qualifies jobs matching any inclusive qualifiers while not matching all of the exclusive qualifiers
Get one of the VOTE_IGNORE, VOTE_INCLUDE, VOTE_EXCLUDE votes that this qualifier associated with the specified job.
Parameters: | job – A IJobDefinition instance that is to be visited |
---|---|
Returns: |
|
A SimpleQualifer that uses matchers to compare particular fields
Interface for objects that perform some kind of comparison on a value
A JobQualifier that designates a single job with a particular id
A JobQualifier that designates only non local jobs
A matcher that applies a binary operator to the value
A matcher that compares values by regular expression pattern
A JobQualifier that designates jobs by matching their id to a regular expression
Abstract base class that implements common features of simple (non composite) qualifiers. This allows two concrete subclasses below to have share some code.
Return a list of primitives that constitute this qualifier.
Returns: | A list of IJobQualifier objects that each is the smallest, indivisible entity. Here it just returns a list of one element, itself. |
---|
Get a simple yes-or-no boolean answer if the given job matches the simple aspect of this qualifier. This method should be overridden by concrete subclasses.
Get one of the VOTE_IGNORE, VOTE_INCLUDE, VOTE_EXCLUDE votes that this qualifier associated with the specified job.
Parameters: | job – A IJobDefinition instance that is to be visited |
---|---|
Returns: |
|
A qualifier that understands checkbox whitelist files.
A whitelist file is a plain text, line oriented file. Each line represents a regular expression pattern that can be matched against the id of a job.
The file can contain simple shell-style comments that begin with the pound or hash key (#). Those are ignored. Comments can span both a fraction of a line as well as the whole line.
For historical reasons each pattern has an implicit ‘^’ and ‘$’ prepended and appended (respectively) to the actual pattern specified in the file.
Load and initialize the WhiteList object from the specified file.
Parameters: |
|
---|---|
Returns: | a fresh WhiteList object |
Load and initialize the WhiteList object from the specified string.
Parameters: |
|
---|---|
Returns: | a fresh WhiteList object |
The optional filename or a pair of name and origin arguments may be provided in order to have additional meta-data. This is typically needed when the from_file() method cannot be used as the caller already has the full text of the intended file available.