/** * Set filter on subject. * @param subject messages will be filtered on subject * @param notTerm negate condition */ public void setSubjectTerm(String subject, boolean notTerm) { if (!Const.isEmpty(subject)) { if(notTerm) addSearchTerm(new NotTerm(new SubjectTerm(subject))); else addSearchTerm(new SubjectTerm(subject)); } }
/** * Search all messages with body containing the word bodyfilter * @param bodyfilter * @param notTerm negate condition */ public void setBodyTerm(String bodyfilter, boolean notTerm) { if (!Const.isEmpty(bodyfilter)) { if(notTerm) addSearchTerm(new NotTerm(new BodyTerm(bodyfilter))); else addSearchTerm(new BodyTerm(bodyfilter)); } }
/** * Set filter on message sender. * @param sender messages will be filtered on sender * @param notTerm negate condition */ public void setSenderTerm(String sender, boolean notTerm) { if (!Const.isEmpty(sender)) { if(notTerm) addSearchTerm(new NotTerm(new FromStringTerm(sender))); else addSearchTerm(new FromStringTerm(sender)); } }
/** * Set filter on subject. * * @param subject * messages will be filtered on subject * @param notTerm * negate condition */ public void setSubjectTerm( String subject, boolean notTerm ) { if ( !Utils.isEmpty( subject ) ) { if ( notTerm ) { addSearchTerm( new NotTerm( new SubjectTerm( subject ) ) ); } else { addSearchTerm( new SubjectTerm( subject ) ); } } }
/** * Search all messages with body containing the word bodyfilter * * @param bodyfilter * @param notTerm * negate condition */ public void setBodyTerm( String bodyfilter, boolean notTerm ) { if ( !Utils.isEmpty( bodyfilter ) ) { if ( notTerm ) { addSearchTerm( new NotTerm( new BodyTerm( bodyfilter ) ) ); } else { addSearchTerm( new BodyTerm( bodyfilter ) ); } } }
/** * Set filter on message sender. * * @param sender * messages will be filtered on sender * @param notTerm * negate condition */ public void setSenderTerm( String sender, boolean notTerm ) { if ( !Utils.isEmpty( sender ) ) { if ( notTerm ) { addSearchTerm( new NotTerm( new FromStringTerm( sender ) ) ); } else { addSearchTerm( new FromStringTerm( sender ) ); } } }