descriptor.setTargetId(port.getTargetId()); descriptor.setName(port.getName()); descriptor.setComments(port.getComments()); descriptor.setTargetRunning(port.isTargetRunning()); descriptor.setConnected(port.isConnected());
public RemoteProcessGroupPortDTO copy(final RemoteProcessGroupPortDTO original) { final RemoteProcessGroupPortDTO copy = new RemoteProcessGroupPortDTO(); copy.setId(original.getId()); copy.setTargetId(original.getTargetId()); copy.setGroupId(original.getGroupId()); copy.setName(original.getName()); copy.setComments(original.getComments()); copy.setConnected(original.isConnected()); copy.setTargetRunning(original.isTargetRunning()); copy.setTransmitting(original.isTransmitting()); copy.setConcurrentlySchedulableTaskCount(original.getConcurrentlySchedulableTaskCount()); copy.setUseCompression(original.getUseCompression()); copy.setExists(original.getExists()); copy.setVersionedComponentId(original.getVersionedComponentId()); final BatchSettingsDTO batchOrg = original.getBatchSettings(); if (batchOrg != null) { final BatchSettingsDTO batchCopy = new BatchSettingsDTO(); batchCopy.setCount(batchOrg.getCount()); batchCopy.setSize(batchOrg.getSize()); batchCopy.setDuration(batchOrg.getDuration()); copy.setBatchSettings(batchCopy); } return copy; }
@Override public RemotePortSchema apply(RemoteProcessGroupPortDTO remoteProcessGroupPortDTO) { Map<String, Object> map = new HashMap<>(); // If a targetId is specified, it takes precedence over the original id final String targetId = remoteProcessGroupPortDTO.getTargetId(); map.put(ID_KEY, StringUtils.isNotBlank(targetId) ? targetId : remoteProcessGroupPortDTO.getId()); map.put(NAME_KEY, remoteProcessGroupPortDTO.getName()); map.put(CommonPropertyKeys.COMMENT_KEY, remoteProcessGroupPortDTO.getComments()); map.put(CommonPropertyKeys.MAX_CONCURRENT_TASKS_KEY, remoteProcessGroupPortDTO.getConcurrentlySchedulableTaskCount()); map.put(CommonPropertyKeys.USE_COMPRESSION_KEY, remoteProcessGroupPortDTO.getUseCompression()); return new RemotePortSchema(map); } }
@Override public RemotePortSchema apply(RemoteProcessGroupPortDTO remoteProcessGroupPortDTO) { Map<String, Object> map = new HashMap<>(); // If a targetId is specified, it takes precedence over the original id final String targetId = remoteProcessGroupPortDTO.getTargetId(); map.put(ID_KEY, StringUtils.isNotBlank(targetId) ? targetId : remoteProcessGroupPortDTO.getId()); map.put(NAME_KEY, remoteProcessGroupPortDTO.getName()); map.put(CommonPropertyKeys.COMMENT_KEY, remoteProcessGroupPortDTO.getComments()); map.put(CommonPropertyKeys.MAX_CONCURRENT_TASKS_KEY, remoteProcessGroupPortDTO.getConcurrentlySchedulableTaskCount()); map.put(CommonPropertyKeys.USE_COMPRESSION_KEY, remoteProcessGroupPortDTO.getUseCompression()); return new RemotePortSchema(map); } }