use of com.zimbra.soap.type.RssDataSource in project zm-mailbox by Zimbra.
the class ZMailbox method getAllDataSources.
public List<ZDataSource> getAllDataSources() throws ServiceException {
GetDataSourcesResponse res = invokeJaxb(new GetDataSourcesRequest());
List<ZDataSource> result = new ArrayList<ZDataSource>();
for (DataSource ds : res.getDataSources()) {
if (ds instanceof Pop3DataSource) {
result.add(new ZPop3DataSource((Pop3DataSource) ds));
} else if (ds instanceof ImapDataSource) {
result.add(new ZImapDataSource((ImapDataSource) ds));
} else if (ds instanceof CalDataSource) {
result.add(new ZCalDataSource((CalDataSource) ds));
} else if (ds instanceof RssDataSource) {
result.add(new ZRssDataSource((RssDataSource) ds));
} else {
result.add(new ZDataSource(ds));
}
}
return result;
}
Aggregations