/** * Remove unnecessary fields in remote groups prior to saving. * * @param remoteGroups groups */ private static void scrubRemoteProcessGroups(final Set<RemoteProcessGroupDTO> remoteGroups) { // go through each remote process group for (final RemoteProcessGroupDTO remoteProcessGroupDTO : remoteGroups) { remoteProcessGroupDTO.setFlowRefreshed(null); remoteProcessGroupDTO.setInputPortCount(null); remoteProcessGroupDTO.setOutputPortCount(null); remoteProcessGroupDTO.setTransmitting(null); remoteProcessGroupDTO.setProxyPassword(null); remoteProcessGroupDTO.setActiveRemoteInputPortCount(null); remoteProcessGroupDTO.setInactiveRemoteInputPortCount(null); remoteProcessGroupDTO.setActiveRemoteOutputPortCount(null); remoteProcessGroupDTO.setInactiveRemoteOutputPortCount(null); remoteProcessGroupDTO.setAuthorizationIssues(null); remoteProcessGroupDTO.setFlowRefreshed(null); remoteProcessGroupDTO.setName(null); remoteProcessGroupDTO.setTargetSecure(null); remoteProcessGroupDTO.setTransmitting(null); } } }
dto.setName(group.getName()); dto.setPosition(createPositionDto(group.getPosition())); dto.setComments(group.getComments());
copy.setCommunicationsTimeout(original.getCommunicationsTimeout()); copy.setYieldDuration(original.getYieldDuration()); copy.setName(original.getName()); copy.setInputPortCount(original.getInputPortCount()); copy.setOutputPortCount(original.getOutputPortCount());
public static RemoteProcessGroupDTO getRemoteProcessGroup(final Element element, final StringEncryptor encryptor) { final RemoteProcessGroupDTO dto = new RemoteProcessGroupDTO(); dto.setId(getString(element, "id")); dto.setVersionedComponentId(getString(element, "versionedComponentId")); dto.setName(getString(element, "name")); dto.setTargetUri(getString(element, "url")); dto.setTargetUris(getString(element, "urls")); dto.setTransmitting(getBoolean(element, "transmitting")); dto.setPosition(getPosition(DomUtils.getChild(element, "position"))); dto.setCommunicationsTimeout(getString(element, "timeout")); dto.setComments(getString(element, "comment")); dto.setYieldDuration(getString(element, "yieldPeriod")); dto.setTransportProtocol(getString(element, "transportProtocol")); dto.setProxyHost(getString(element, "proxyHost")); dto.setProxyPort(getOptionalInt(element, "proxyPort")); dto.setProxyUser(getString(element, "proxyUser")); dto.setLocalNetworkInterface(getString(element, "networkInterface")); final String rawPassword = getString(element, "proxyPassword"); final String proxyPassword = encryptor == null ? rawPassword : decrypt(rawPassword, encryptor); dto.setProxyPassword(proxyPassword); return dto; }