use of com.sequenceiq.environment.proxy.domain.ProxyConfig in project cloudbreak by hortonworks.
the class ProxyController method getByName.
@Override
@CheckPermissionByAccount(action = AuthorizationResourceAction.POWERUSER_ONLY)
public ProxyResponse getByName(String name) {
String accountId = ThreadBasedUserCrnProvider.getAccountId();
ProxyConfig config = proxyConfigService.getByNameForAccountId(name, accountId);
return proxyConfigToProxyResponseConverter.convert(config);
}
use of com.sequenceiq.environment.proxy.domain.ProxyConfig in project cloudbreak by hortonworks.
the class ProxyRequestToProxyConfigConverter method convert.
public ProxyConfig convert(ProxyRequest source) {
ProxyConfig proxyConfig = new ProxyConfig();
proxyConfig.setName(source.getName());
proxyConfig.setDescription(source.getDescription());
proxyConfig.setProtocol(source.getProtocol());
proxyConfig.setServerHost(source.getHost());
proxyConfig.setServerPort(source.getPort());
if (StringUtils.isNoneBlank(source.getUserName(), source.getPassword())) {
proxyConfig.setUserName(source.getUserName());
proxyConfig.setPassword(source.getPassword());
}
proxyConfig.setNoProxyHosts(source.getNoProxyHosts());
return proxyConfig;
}
Aggregations