/** * Issue the given search criterion on all messages in this folder. * Returns array of matching sequence numbers. An empty array * is returned if no matches are found. * * @param term SearchTerm * @return array of matching sequence numbers. * @exception ProtocolException for protocol failures * @exception SearchException for search failures */ public int[] search(SearchTerm term) throws ProtocolException, SearchException { return search("ALL", term); }
/** * Issue the given search criterion on all messages in this folder. * Returns array of matching sequence numbers. An empty array * is returned if no matches are found. * * @param term SearchTerm * @return array of matching sequence numbers. * @exception ProtocolException for protocol failures * @exception SearchException for search failures */ public int[] search(SearchTerm term) throws ProtocolException, SearchException { return search("ALL", term); }
/** * Issue the given search criterion on the specified message sets. * Returns array of matching sequence numbers. An empty array * is returned if no matches are found. * * @param msgsets array of MessageSets * @param term SearchTerm * @return array of matching sequence numbers. * @exception ProtocolException for protocol failures * @exception SearchException for search failures */ public int[] search(MessageSet[] msgsets, SearchTerm term) throws ProtocolException, SearchException { return search(MessageSet.toString(msgsets), term); }
/** * Issue the given search criterion on the specified message sets. * Returns array of matching sequence numbers. An empty array * is returned if no matches are found. * * @param msgsets array of MessageSets * @param term SearchTerm * @return array of matching sequence numbers. * @exception ProtocolException for protocol failures * @exception SearchException for search failures */ public int[] search(MessageSet[] msgsets, SearchTerm term) throws ProtocolException, SearchException { return search(MessageSet.toString(msgsets), term); }
/** * Issue the given search criterion on all messages in this folder. * Returns array of matching sequence numbers. An empty array * is returned if no matches are found. * * @param term SearchTerm * @return array of matching sequence numbers. */ public int[] search(SearchTerm term) throws ProtocolException, SearchException { return search("ALL", term); }
/** * Issue the given search criterion on all messages in this folder. * Returns array of matching sequence numbers. An empty array * is returned if no matches are found. * * @param term SearchTerm * @return array of matching sequence numbers. */ public int[] search(SearchTerm term) throws ProtocolException, SearchException { return search("ALL", term); }
/** * Issue the given search criterion on all messages in this folder. * Returns array of matching sequence numbers. An empty array * is returned if no matches are found. * * @param term SearchTerm * @return array of matching sequence numbers. * @exception ProtocolException for protocol failures * @exception SearchException for search failures */ public int[] search(SearchTerm term) throws ProtocolException, SearchException { return search("ALL", term); }
/** * Issue the given search criterion on all messages in this folder. * Returns array of matching sequence numbers. An empty array * is returned if no matches are found. * * @param term SearchTerm * @return array of matching sequence numbers. * @exception ProtocolException for protocol failures * @exception SearchException for search failures */ public int[] search(SearchTerm term) throws ProtocolException, SearchException { return search("ALL", term); }
/** * Issue the given search criterion on all messages in this folder. * Returns array of matching sequence numbers. An empty array * is returned if no matches are found. * * @param term SearchTerm * @return array of matching sequence numbers. * @exception ProtocolException for protocol failures * @exception SearchException for search failures */ public int[] search(SearchTerm term) throws ProtocolException, SearchException { return search("ALL", term); }
/** * Issue the given search criterion on all messages in this folder. * Returns array of matching sequence numbers. An empty array * is returned if no matches are found. * * @param term SearchTerm * @return array of matching sequence numbers. * @exception ProtocolException for protocol failures * @exception SearchException for search failures */ public int[] search(SearchTerm term) throws ProtocolException, SearchException { return search("ALL", term); }
/** * Get the deleted message count. */ public synchronized int getDeletedMessageCount() throws MessagingException { if (!opened) { checkExists(); // no way to do this on closed folders return -1; } // if opened, issue server-side search for messages that do // have the DELETED flag. Flags f = new Flags(); f.add(Flags.Flag.DELETED); try { synchronized(messageCacheLock) { int[] matches = getProtocol().search(new FlagTerm(f, true)); return matches.length; // NOTE: 'matches' is never null } } catch (ConnectionException cex) { throw new FolderClosedException(this, cex.getMessage()); } catch (ProtocolException pex) { // Shouldn't happen throw new MessagingException(pex.getMessage(), pex); } }
/** * Get the deleted message count. */ @Override public synchronized int getDeletedMessageCount() throws MessagingException { if (!opened) { checkExists(); // no way to do this on closed folders return -1; } // if opened, issue server-side search for messages that do // have the DELETED flag. Flags f = new Flags(); f.add(Flags.Flag.DELETED); try { synchronized(messageCacheLock) { int[] matches = getProtocol().search(new FlagTerm(f, true)); return matches.length; // NOTE: 'matches' is never null } } catch (ConnectionException cex) { throw new FolderClosedException(this, cex.getMessage()); } catch (ProtocolException pex) { // Shouldn't happen throw new MessagingException(pex.getMessage(), pex); } }
int[] matches = getProtocol().search(term); if (matches != null) matchMsgs = getMessagesBySeqNumbers(matches);
int[] matches = getProtocol().search(term); if (matches != null) matchMsgs = getMessagesBySeqNumbers(matches);
throw new MessageRemovedException( "Messages have been removed"); int[] matches = p.search(ms, term); if (matches != null) matchMsgs = getMessagesBySeqNumbers(matches);
throw new MessageRemovedException( "Messages have been removed"); int[] matches = p.search(ms, term); if (matches != null) matchMsgs = getMessagesBySeqNumbers(matches);
/** * Issue the given search criterion on the specified message sets. * Returns array of matching sequence numbers. An empty array * is returned if no matches are found. * * @param msgsets array of MessageSets * @param term SearchTerm * @return array of matching sequence numbers. */ public int[] search(MessageSet[] msgsets, SearchTerm term) throws ProtocolException, SearchException { return search(MessageSet.toString(msgsets), term); }
/** * Issue the given search criterion on the specified message sets. * Returns array of matching sequence numbers. An empty array * is returned if no matches are found. * * @param msgsets array of MessageSets * @param term SearchTerm * @return array of matching sequence numbers. */ public int[] search(MessageSet[] msgsets, SearchTerm term) throws ProtocolException, SearchException { return search(MessageSet.toString(msgsets), term); }
try { synchronized(messageCacheLock) { int[] matches = getProtocol().search(new FlagTerm(f, false)); return matches.length; // NOTE: 'matches' is never null
try { synchronized(messageCacheLock) { int[] matches = getProtocol().search(new FlagTerm(f, false)); return matches.length; // NOTE: 'matches' is never null