RE: [PATCH] new mailets/matcher acting on Mail attributes.

2003-06-26 Thread Vincenzo Gianferrari Pini
Really good!

I would add another matcher:

mailet match=HasMailAttributeValue=hmm=bla class=Null/

and/or

mailet match=HasMailAttributeValueRegex=hmm=aRegularExpression class=Null/

Vincenzo


 -Original Message-
 From: Soeren Hilmer [mailto:[EMAIL PROTECTED]
 Sent: giovedì 26 giugno 2003 13.17
 To: James Developers List
 Subject: [PATCH] new mailets/matcher acting on Mail attributes.
 
 
 This patch supplies a set of mailets and a matcher for 
 manipulating attributes 
 on the Mail instance.
 
 They are:
 SetMailAttribute - sets attribute(s) on the Mail like:
 mailet match=All class=SetMailAttribute
receivedroot/received
hmmbla/hmm
 /mailet
 
 RemoveMailAttribute - removes attribute(s) from the Mail like:
 mailet match=All class=RemoveMailAttribute
namereceived/name
namehmm/name
 /mailet
 
 RemoveAllMailAttributes - removes all attributes (maybe you want 
 to ensure 
 attributes from being persisted) like:
 mailet match=All class=RemoveAllMailAttributes/
 
 HasMailAttribute - returns all recipients if the attribute named in the 
 condition is set on the Mail
 mailet match=HasMailAttribute=hmm class=Null/
 
 --Søren
 
 -- 
 Søren Hilmer, M.Sc.
 RD manager   Phone:  +45 70 27 64 00
 TietoEnator IT+ A/S   Fax:+45 70 27 64 40
 Ved Lunden 12 Direct: +45 87 46 64 57
 DK-8230 ÅbyhøjEmail:  [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [PATCH] new mailets/matcher acting on Mail attributes.

2003-06-26 Thread Vincenzo Gianferrari Pini
 
 Really good!
 
 I would add another matcher:
 
 mailet match=HasMailAttributeValue=hmm=bla class=Null/
 
 and/or
 
 mailet 
 match=HasMailAttributeValueRegex=hmm=aRegularExpression class=.../
 
 Vincenzo
 

I will write someday:

mailet match=HasHeaderValue=aHeaderName=aHeaderValue class=.../

and/or:

mailet match=HasHeaderValueRegex=aHeaderName=aRegularExpression 
class=.../

and already wrote and committed:

mailet match=CompareNumericHeaderValue=aHeaderName comparisonOperator 
aNumericValue class=.../

and both

mailet match=HasHeader=aHeaderName class=.../

mailet match=... class=AddHeader/

already exist.

Together with your mailets and your Mail Attributes support, we would have two 
complementary sets of matchers and mailets, one for attributes that live only inside 
james, and the other that follows the message also outside.

Perhaps for consistency with header related matchers and mailets your classes should 
be named SetAttribute, HasAttribute etc. instead of SetMailAttribute, HasMailAttribute 
etc, as it is clear that a mailet entry deals with Mail objects.

What do you think?

Vincenzo


 
  -Original Message-
  From: Soeren Hilmer [mailto:[EMAIL PROTECTED]
  Sent: giovedì 26 giugno 2003 13.17
  To: James Developers List
  Subject: [PATCH] new mailets/matcher acting on Mail attributes.
  
  
  This patch supplies a set of mailets and a matcher for 
  manipulating attributes 
  on the Mail instance.
  
  They are:
  SetMailAttribute - sets attribute(s) on the Mail like:
  mailet match=All class=SetMailAttribute
 receivedroot/received
 hmmbla/hmm
  /mailet
  
  RemoveMailAttribute - removes attribute(s) from the Mail like:
  mailet match=All class=RemoveMailAttribute
 namereceived/name
 namehmm/name
  /mailet
  
  RemoveAllMailAttributes - removes all attributes (maybe you want 
  to ensure 
  attributes from being persisted) like:
  mailet match=All class=RemoveAllMailAttributes/
  
  HasMailAttribute - returns all recipients if the attribute named in the 
  condition is set on the Mail
  mailet match=HasMailAttribute=hmm class=Null/
  
  --Søren
  
  -- 
  Søren Hilmer, M.Sc.
  RD manager Phone:  +45 70 27 64 00
  TietoEnator IT+ A/S Fax:+45 70 27 64 40
  Ved Lunden 12   Direct: +45 87 46 64 57
  DK-8230 Åbyhøj  Email:  [EMAIL PROTECTED]
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [PATCH] new mailets/matcher acting on Mail attributes.

2003-06-26 Thread Soeren Hilmer
Absolutely usefull. I won't mind doing them as well, but I'am going on a 2 
weeks vacation starting tomorrow, so I probably won't have tiome for it  
until after that.

--Søren

On Thursday 26 June 2003 13:20, Vincenzo Gianferrari Pini wrote:
 Really good!

 I would add another matcher:

 mailet match=HasMailAttributeValue=hmm=bla class=Null/

 and/or

 mailet match=HasMailAttributeValueRegex=hmm=aRegularExpression
 class=Null/

 Vincenzo

  -Original Message-
  From: Soeren Hilmer [mailto:[EMAIL PROTECTED]
  Sent: giovedì 26 giugno 2003 13.17
  To: James Developers List
  Subject: [PATCH] new mailets/matcher acting on Mail attributes.
 
 
  This patch supplies a set of mailets and a matcher for
  manipulating attributes
  on the Mail instance.
 
  They are:
  SetMailAttribute - sets attribute(s) on the Mail like:
  mailet match=All class=SetMailAttribute
 receivedroot/received
 hmmbla/hmm
  /mailet
 
  RemoveMailAttribute - removes attribute(s) from the Mail like:
  mailet match=All class=RemoveMailAttribute
 namereceived/name
 namehmm/name
  /mailet
 
  RemoveAllMailAttributes - removes all attributes (maybe you want
  to ensure
  attributes from being persisted) like:
  mailet match=All class=RemoveAllMailAttributes/
 
  HasMailAttribute - returns all recipients if the attribute named in the
  condition is set on the Mail
  mailet match=HasMailAttribute=hmm class=Null/
 
  --Søren
 
  --
  Søren Hilmer, M.Sc.
  RD manager Phone:  +45 70 27 64 00
  TietoEnator IT+ A/S Fax:+45 70 27 64 40
  Ved Lunden 12   Direct: +45 87 46 64 57
  DK-8230 Åbyhøj  Email:  [EMAIL PROTECTED]

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Søren Hilmer, M.Sc.
RD manager Phone:  +45 70 27 64 00
TietoEnator IT+ A/S Fax:+45 70 27 64 40
Ved Lunden 12   Direct: +45 87 46 64 57
DK-8230 Åbyhøj  Email:  [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [PATCH] new mailets/matcher acting on Mail attributes.

2003-06-26 Thread Soeren Hilmer
On Thursday 26 June 2003 13:38, Vincenzo Gianferrari Pini wrote:
  Really good!
 
  I would add another matcher:
 
  mailet match=HasMailAttributeValue=hmm=bla class=Null/
 
  and/or
 
  mailet
  match=HasMailAttributeValueRegex=hmm=aRegularExpression class=.../
 
  Vincenzo

 I will write someday:

   mailet match=HasHeaderValue=aHeaderName=aHeaderValue class=.../

 and/or:

   mailet match=HasHeaderValueRegex=aHeaderName=aRegularExpression
 class=.../

 and already wrote and committed:

   mailet match=CompareNumericHeaderValue=aHeaderName
 comparisonOperator aNumericValue class=.../

 and both

   mailet match=HasHeader=aHeaderName class=.../

   mailet match=... class=AddHeader/

 already exist.

 Together with your mailets and your Mail Attributes support, we would have
 two complementary sets of matchers and mailets, one for attributes that
 live only inside james, and the other that follows the message also
 outside.

 Perhaps for consistency with header related matchers and mailets your
 classes should be named SetAttribute, HasAttribute etc. instead of
 SetMailAttribute, HasMailAttribute etc, as it is clear that a mailet
 entry deals with Mail objects.

 What do you think?

The reason for this naming convention is, that I was afraid users could think 
that a SetAttribute would set the attribute on the Mailet instance (the 
MailetContext) and not on the Mail instance, mainly because MailetContext has 
had attributes longer.

--Søren
-- 
Søren Hilmer, M.Sc.
RD manager Phone:  +45 70 27 64 00
TietoEnator IT+ A/S Fax:+45 70 27 64 40
Ved Lunden 12   Direct: +45 87 46 64 57
DK-8230 Åbyhøj  Email:  [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [PATCH] new mailets/matcher acting on Mail attributes.

2003-06-26 Thread Vincenzo Gianferrari Pini
  Perhaps for consistency with header related matchers and mailets your
  classes should be named SetAttribute, HasAttribute etc. instead of
  SetMailAttribute, HasMailAttribute etc, as it is clear that a mailet
  entry deals with Mail objects.
 
  What do you think?
 
 The reason for this naming convention is, that I was afraid users 
 could think 
 that a SetAttribute would set the attribute on the Mailet instance (the 
 MailetContext) and not on the Mail instance, mainly because 
 MailetContext has 
 had attributes longer.

You are right.

Vincenzo


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]