|
SIP Communicator: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.filehistory.FileHistoryServiceImpl
public class FileHistoryServiceImpl
File History Service stores info for file transfers from various protocols. Uses History Service.
| Constructor Summary | |
|---|---|
FileHistoryServiceImpl()
|
|
| Method Summary | |
|---|---|
void |
fileTransferCreated(FileTransferCreatedEvent event)
New file transfer was created. |
void |
fileTransferRequestCanceled(FileTransferRequestEvent event)
Called when an IncomingFileTransferRequest has been canceled from the contact who sent it. |
void |
fileTransferRequestReceived(FileTransferRequestEvent event)
We ignore filetransfer requests. |
void |
fileTransferRequestRejected(FileTransferRequestEvent event)
Called when a new IncomingFileTransferRequest has been rejected. |
Collection<FileRecord> |
findByEndDate(MetaContact contact,
Date endDate)
Returns all the file transfers made before the given date |
Collection<FileRecord> |
findByKeyword(MetaContact contact,
String keyword)
Returns all the file transfers having the given keyword in the filename |
Collection<FileRecord> |
findByKeyword(MetaContact contact,
String keyword,
boolean caseSensitive)
Returns all the file transfers having the given keyword in the filename |
Collection<FileRecord> |
findByKeywords(MetaContact contact,
String[] keywords)
Returns all the file transfers having the given keywords in the filename |
Collection<FileRecord> |
findByKeywords(MetaContact contact,
String[] keywords,
boolean caseSensitive)
Returns all the file transfershaving the given keywords in the filename |
Collection<FileRecord> |
findByPeriod(MetaContact contact,
Date startDate,
Date endDate)
Returns all the file transfers made between the given dates |
Collection<FileRecord> |
findByPeriod(MetaContact contact,
Date startDate,
Date endDate,
String[] keywords)
Returns all the file transfers made between the given dates and having the given keywords in the filename |
Collection<FileRecord> |
findByPeriod(MetaContact contact,
Date startDate,
Date endDate,
String[] keywords,
boolean caseSensitive)
Returns all the file transfers made between the given dates and having the given keywords in the filename |
Collection<FileRecord> |
findByStartDate(MetaContact contact,
Date startDate)
Returns all the file transfers made after the given date |
Collection<FileRecord> |
findFirstRecordsAfter(MetaContact contact,
Date date,
int count)
Returns the supplied number of recent file transfers after the given date |
Collection<FileRecord> |
findLast(MetaContact contact,
int count)
Returns the supplied number of file transfers |
Collection<FileRecord> |
findLastRecordsBefore(MetaContact contact,
Date date,
int count)
Returns the supplied number of recent file transfers before the given date |
void |
serviceChanged(org.osgi.framework.ServiceEvent serviceEvent)
When new protocol provider is registered we check does it supports FileTransfer and if so add a listener to it |
void |
setHistoryService(HistoryService historyService)
Set the history service. |
void |
start(org.osgi.framework.BundleContext bc)
Starts the service. |
void |
statusChanged(FileTransferStatusChangeEvent event)
Listens for changes in file transfers. |
void |
stop(org.osgi.framework.BundleContext bc)
Stops the service. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileHistoryServiceImpl()
| Method Detail |
|---|
public void start(org.osgi.framework.BundleContext bc)
bc - BundleContextpublic void stop(org.osgi.framework.BundleContext bc)
bc - BundleContextpublic void setHistoryService(HistoryService historyService)
historyService - HistoryService
public Collection<FileRecord> findByStartDate(MetaContact contact,
Date startDate)
throws RuntimeException
findByStartDate in interface FileHistoryServicecontact - MetaContact the receiver or sender of the filestartDate - Date the start date of the transfers
RuntimeException
public Collection<FileRecord> findByEndDate(MetaContact contact,
Date endDate)
throws RuntimeException
findByEndDate in interface FileHistoryServicecontact - MetaContact the receiver or sender of the fileendDate - Date the end date of the transfers
RuntimeException
public Collection<FileRecord> findByPeriod(MetaContact contact,
Date startDate,
Date endDate,
String[] keywords)
throws RuntimeException
findByPeriod in interface FileHistoryServicecontact - MetaContact the receiver or sender of the filestartDate - Date the start date of the transfersendDate - Date the end date of the transferskeywords - array of keywords
RuntimeException
public Collection<FileRecord> findByPeriod(MetaContact contact,
Date startDate,
Date endDate,
String[] keywords,
boolean caseSensitive)
throws RuntimeException
findByPeriod in interface FileHistoryServicecontact - MetaContact the receiver or sender of the filestartDate - Date the start date of the transfersendDate - Date the end date of the transferskeywords - array of keywordscaseSensitive - is keywords search case sensitive
RuntimeException
public Collection<FileRecord> findByPeriod(MetaContact contact,
Date startDate,
Date endDate)
throws RuntimeException
findByPeriod in interface FileHistoryServicecontact - MetaContact the receiver or sender of the filestartDate - Date the start date of the transfersendDate - Date the end date of the transfers
RuntimeException
public Collection<FileRecord> findLast(MetaContact contact,
int count)
throws RuntimeException
findLast in interface FileHistoryServicecontact - MetaContact the receiver or sender of the filecount - filetransfer count
RuntimeException
public Collection<FileRecord> findByKeyword(MetaContact contact,
String keyword)
throws RuntimeException
findByKeyword in interface FileHistoryServicecontact - MetaContact the receiver or sender of the filekeyword - keyword
RuntimeException
public Collection<FileRecord> findByKeyword(MetaContact contact,
String keyword,
boolean caseSensitive)
throws RuntimeException
findByKeyword in interface FileHistoryServicecontact - MetaContact the receiver or sender of the filekeyword - keywordcaseSensitive - is keywords search case sensitive
RuntimeException
public Collection<FileRecord> findByKeywords(MetaContact contact,
String[] keywords)
throws RuntimeException
findByKeywords in interface FileHistoryServicecontact - MetaContact the receiver or sender of the filekeywords - keyword
RuntimeException
public Collection<FileRecord> findByKeywords(MetaContact contact,
String[] keywords,
boolean caseSensitive)
throws RuntimeException
findByKeywords in interface FileHistoryServicecontact - MetaContact the receiver or sender of the filekeywords - keywordcaseSensitive - is keywords search case sensitive
RuntimeException
public Collection<FileRecord> findFirstRecordsAfter(MetaContact contact,
Date date,
int count)
throws RuntimeException
findFirstRecordsAfter in interface FileHistoryServicecontact - MetaContact the receiver or sender of the filedate - transfers after datecount - transfers count
RuntimeException
public Collection<FileRecord> findLastRecordsBefore(MetaContact contact,
Date date,
int count)
throws RuntimeException
findLastRecordsBefore in interface FileHistoryServicecontact - MetaContact the receiver or sender of the filedate - transfers before datecount - transfers count
RuntimeExceptionpublic void serviceChanged(org.osgi.framework.ServiceEvent serviceEvent)
serviceChanged in interface org.osgi.framework.ServiceListenerserviceEvent - ServiceEventpublic void statusChanged(FileTransferStatusChangeEvent event)
statusChanged in interface FileTransferStatusListenerevent - public void fileTransferRequestReceived(FileTransferRequestEvent event)
fileTransferRequestReceived in interface FileTransferListenerevent - public void fileTransferCreated(FileTransferCreatedEvent event)
fileTransferCreated in interface FileTransferListenerevent - fileTransferpublic void fileTransferRequestRejected(FileTransferRequestEvent event)
fileTransferRequestRejected in interface FileTransferListenerevent - the FileTransferRequestEvent containing the
received request which was rejected.public void fileTransferRequestCanceled(FileTransferRequestEvent event)
FileTransferListener
fileTransferRequestCanceled in interface FileTransferListenerevent - the FileTransferRequestEvent containing the
request which was canceled.
|
SIP Communicator: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||