diff options
author | Yana Stamcheva <yana@jitsi.org> | 2010-03-11 21:15:19 +0000 |
---|---|---|
committer | Yana Stamcheva <yana@jitsi.org> | 2010-03-11 21:15:19 +0000 |
commit | 85163bb80e0f8466e74c10f8858975988e763ad5 (patch) | |
tree | 0d2d2972463f1ca2faee4693d5b772cd1d048401 /src/net/java/sip/communicator/service/contactsource/ExtendedContactSourceService.java | |
parent | b7fae522adf15fa99157a9f92583146c9938225d (diff) | |
download | jitsi-85163bb80e0f8466e74c10f8858975988e763ad5.zip jitsi-85163bb80e0f8466e74c10f8858975988e763ad5.tar.gz jitsi-85163bb80e0f8466e74c10f8858975988e763ad5.tar.bz2 |
An ExtendedContactSourceService that allows matching contact source results through a Pattern.
Diffstat (limited to 'src/net/java/sip/communicator/service/contactsource/ExtendedContactSourceService.java')
-rw-r--r-- | src/net/java/sip/communicator/service/contactsource/ExtendedContactSourceService.java | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/service/contactsource/ExtendedContactSourceService.java b/src/net/java/sip/communicator/service/contactsource/ExtendedContactSourceService.java new file mode 100644 index 0000000..a5f8cbb --- /dev/null +++ b/src/net/java/sip/communicator/service/contactsource/ExtendedContactSourceService.java @@ -0,0 +1,37 @@ +/* + * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. + * + * Distributable under LGPL license. + * See terms of license at gnu.org. + */ +package net.java.sip.communicator.service.contactsource; + +import java.util.regex.*; + +/** + * The <tt>ExtendedContactSourceService</tt> as its name states it, extends the + * <tt>ContactSourceService</tt> in order to provide the possibility to query + * a contact source by specifying a given <tt>Pattern</tt>. This interface is + * meant to be implemented by contact sources, where it is possible to match + * source results directly through a given <tt>Pattern</tt>, i.e. by using:<br> + * <code>Matcher matcher = pattern.matcher(myString); + * if(matcher.find()) + * .... + * </code> + * The advantages of passing a <tt>Pattern</tt> over a <tt>String</tt> are that + * a <tt>Pattern</tt> can use a predefined regular expression and + * can define certain properties like Pattern.CASE_INSENSITIVE, + * Pattern.UNICODE_CASE, etc., which could be important for the search. + * + * @author Yana Stamcheva + */ +public interface ExtendedContactSourceService + extends ContactSourceService +{ + /** + * Queries this search source for the given <tt>searchPattern</tt>. + * @param queryPattern the pattern to search for + * @return the created query + */ + public ContactQuery queryContactSource(Pattern queryPattern); +} |