/** * Verifies the specified remote group can be updated, if necessary. */ @SuppressWarnings("unchecked") private void verifyUpdate(RemoteProcessGroup remoteProcessGroup, RemoteProcessGroupDTO remoteProcessGroupDto) { // see if the remote process group can start/stop transmitting if (isNotNull(remoteProcessGroupDto.isTransmitting())) { if (!remoteProcessGroup.isTransmitting() && remoteProcessGroupDto.isTransmitting()) { remoteProcessGroup.verifyCanStartTransmitting(); } else if (remoteProcessGroup.isTransmitting() && !remoteProcessGroupDto.isTransmitting()) { remoteProcessGroup.verifyCanStopTransmitting(); } } // validate the proposed configuration final List<String> requestValidation = validateProposedRemoteProcessGroupConfiguration(remoteProcessGroupDto); // ensure there was no validation errors if (!requestValidation.isEmpty()) { throw new ValidationException(requestValidation); } // if any remote group properties are changing, verify update if (isAnyNotNull(remoteProcessGroupDto.getYieldDuration(), remoteProcessGroupDto.getLocalNetworkInterface(), remoteProcessGroupDto.getCommunicationsTimeout(), remoteProcessGroupDto.getProxyHost(), remoteProcessGroupDto.getProxyPort(), remoteProcessGroupDto.getProxyUser(), remoteProcessGroupDto.getProxyPassword())) { remoteProcessGroup.verifyCanUpdate(); } }
copy.setProxyUser(original.getProxyUser()); copy.setProxyPassword(original.getProxyPassword()); copy.setLocalNetworkInterface(original.getLocalNetworkInterface()); copy.setVersionedComponentId(original.getVersionedComponentId());
final String localNetworkInterface = remoteProcessGroupDTO.getLocalNetworkInterface();
if (StringUtils.isBlank(remoteGroupDto.getLocalNetworkInterface())) { remoteGroup.setNetworkInterface(null); } else { remoteGroup.setNetworkInterface(remoteGroupDto.getLocalNetworkInterface());
map.put(RemoteProcessGroupSchema.PROXY_USER_KEY, remoteProcessGroupDTO.getProxyUser()); map.put(RemoteProcessGroupSchema.PROXY_PASSWORD_KEY, remoteProcessGroupDTO.getProxyPassword()); map.put(RemoteProcessGroupSchema.LOCAL_NETWORK_INTERFACE_KEY, remoteProcessGroupDTO.getLocalNetworkInterface()); return new RemoteProcessGroupSchema(map);
map.put(RemoteProcessGroupSchema.PROXY_USER_KEY, remoteProcessGroupDTO.getProxyUser()); map.put(RemoteProcessGroupSchema.PROXY_PASSWORD_KEY, remoteProcessGroupDTO.getProxyPassword()); map.put(RemoteProcessGroupSchema.LOCAL_NETWORK_INTERFACE_KEY, remoteProcessGroupDTO.getLocalNetworkInterface()); return new RemoteProcessGroupSchema(map);