Package posterity :: Module model :: Class Filter

Class Filter



          object --+    
                   |    
elixir.entity.Entity --+
                       |
                      Filter

Mail filter

A mail filter consists of two parts, condition and action. The filter actions are only applied to a message if all specified filter conditions are met.



Nested Classes

Inherited from elixir.entity.Entity: __metaclass__

Instance Methods
 
matches(self, msg)
Determine if filter conditions match msg
 
apply(self, msg)
Apply filter actions on msg
 
__init__(self, *args, **kwargs)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
expire(self, *args, **kwargs)
 
expunge(self, *args, **kwargs)
 
flush(self, *args, **kwargs)
 
merge(self, *args, **kwargs)
 
refresh(self, *args, **kwargs)
 
save(self, *args, **kwargs)
 
save_or_update(self, *args, **kwargs)
 
update(self, *args, **kwargs)

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

Class Methods
 
count(self, *args, **kwargs)
 
count_by(self, *args, **kwargs)
 
filter(self, *args, **kwargs)
 
filter_by(self, *args, **kwargs)
 
get(self, *args, **kwargs)
 
get_by(self, *args, **kwargs)
 
instances(self, *args, **kwargs)
 
join_to(self, *args, **kwargs)
 
join_via(self, *args, **kwargs)
 
options(self, *args, **kwargs)
 
query(cls)
 
select(self, *args, **kwargs)
 
select_by(self, *args, **kwargs)
 
selectfirst(self, *args, **kwargs)
 
selectfirst_by(self, *args, **kwargs)
 
selectone(self, *args, **kwargs)
 
selectone_by(self, *args, **kwargs)
Class Variables
  __elixir_statements__ = [(<elixir.statements.Statement object ...
  account = <sqlalchemy.orm.unitofwork.UOWProperty object at 0x2...
  account_id = <sqlalchemy.orm.unitofwork.UOWProperty object at ...
  archive = <sqlalchemy.orm.unitofwork.UOWProperty object at 0x2...
  c = <sqlalchemy.orm.mapper.LOrderedProp object at 0x21b4e30>
  contains = <sqlalchemy.orm.unitofwork.UOWProperty object at 0x...
  delete = <sqlalchemy.orm.unitofwork.UOWProperty object at 0x21...
  enabled = <sqlalchemy.orm.unitofwork.UOWProperty object at 0x2...
  forward_to = <sqlalchemy.orm.unitofwork.UOWProperty object at ...
  from_ = <sqlalchemy.orm.unitofwork.UOWProperty object at 0x21c...
  id = <sqlalchemy.orm.unitofwork.UOWProperty object at 0x21bd730>
  mapper = <sqlalchemy.orm.mapper.Mapper object at 0x21b4df0>
  subject = <sqlalchemy.orm.unitofwork.UOWProperty object at 0x2...
  table = Table('filter',MetaData(),Column('id',Integer(),primar...
  tag = <sqlalchemy.orm.unitofwork.UOWProperty object at 0x21c2470>
  tag_id = <sqlalchemy.orm.unitofwork.UOWProperty object at 0x21...
  to = <sqlalchemy.orm.unitofwork.UOWProperty object at 0x21c22d0>
Properties

Inherited from object: __class__

Method Details

matches(self, msg)

 
Determine if filter conditions match msg
Parameters:
  • msg - The message to test

apply(self, msg)

 
Apply filter actions on msg
Parameters:
  • msg - The message the actions should be applied to

__init__(self, *args, **kwargs)
(Constructor)

 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

Class Variable Details

__elixir_statements__

Value:
[(<elixir.statements.Statement object at 0x20dbcf0>,
  ('id', <class 'sqlalchemy.types.Integer'>),
  {'primary_key': True}),
 (<elixir.statements.Statement object at 0x20dbcf0>,
  ('enabled', <class 'sqlalchemy.types.Boolean'>),
  {'default': True, 'required': True}),
 (<elixir.statements.Statement object at 0x20dbcf0>,
  ('to', <class 'sqlalchemy.types.Unicode'>),
...

account

Value:
<sqlalchemy.orm.unitofwork.UOWProperty object at 0x21bdeb0>

account_id

Value:
<sqlalchemy.orm.unitofwork.UOWProperty object at 0x21bde90>

archive

Value:
<sqlalchemy.orm.unitofwork.UOWProperty object at 0x21c2250>

contains

Value:
<sqlalchemy.orm.unitofwork.UOWProperty object at 0x21c20d0>

delete

Value:
<sqlalchemy.orm.unitofwork.UOWProperty object at 0x21c2610>

enabled

Value:
<sqlalchemy.orm.unitofwork.UOWProperty object at 0x21c2150>

forward_to

Value:
<sqlalchemy.orm.unitofwork.UOWProperty object at 0x21c2030>

from_

Value:
<sqlalchemy.orm.unitofwork.UOWProperty object at 0x21c2570>

subject

Value:
<sqlalchemy.orm.unitofwork.UOWProperty object at 0x21c26d0>

table

Value:
Table('filter',MetaData(),Column('id',Integer(),primary_key=True,nulla\
ble=False),Column('enabled',Boolean(),nullable=False,default=ColumnDef\
ault(True)),Column('to',Unicode(length=None)),Column('from_',Unicode(l\
ength=None)),Column('subject',Unicode(length=None)),Column('contains',\
Unicode(length=None)),Column('archive',Boolean(),nullable=False,defaul\
t=ColumnDefault(False)),Column('delete_',Boolean(),key='delete',nullab\
le=False,default=ColumnDefault(False)),Column('forward_to',Unicode(len\
gth=None)),Column('account_id',Integer(),ForeignKey('account.id'),null\
...

tag_id

Value:
<sqlalchemy.orm.unitofwork.UOWProperty object at 0x21c21d0>