use of com.zimbra.soap.type.DataSource.ConnectionType in project zm-mailbox by Zimbra.
the class CalDavDataImport method getTargetUrl.
protected String getTargetUrl() {
DataSource ds = getDataSource();
ConnectionType ctype = ds.getConnectionType();
StringBuilder url = new StringBuilder();
switch(ctype) {
case ssl:
url.append("https://");
break;
case cleartext:
default:
url.append("http://");
break;
}
url.append(ds.getHost()).append(":").append(ds.getPort());
return url.toString();
}
use of com.zimbra.soap.type.DataSource.ConnectionType in project zm-mailbox by Zimbra.
the class TestImapSync method createDataSource.
private ZDataSource createDataSource() throws Exception {
ConnectionType ctype = config.getSecurity() == MailConfig.Security.SSL ? ConnectionType.ssl : ConnectionType.cleartext;
String id = localMailbox.createDataSource(new ZImapDataSource("TestImapSync", true, config.getHost(), config.getPort(), config.getAuthenticationId(), pass, "1", ctype));
for (ZDataSource ds : localMailbox.getAllDataSources()) {
if (ds.getId().equals(id)) {
return ds;
}
}
Assert.fail("Could not find data source");
return null;
}
Aggregations