private RemoteProcessGroupPortDescriptor createPortDescriptor(final VersionedRemoteGroupPort proposed, final String componentIdSeed, final String rpgId) { final StandardRemoteProcessGroupPortDescriptor descriptor = new StandardRemoteProcessGroupPortDescriptor(); descriptor.setVersionedComponentId(proposed.getIdentifier()); final BatchSize batchSize = proposed.getBatchSize(); if (batchSize != null) { descriptor.setBatchCount(batchSize.getCount()); descriptor.setBatchDuration(batchSize.getDuration()); descriptor.setBatchSize(batchSize.getSize()); } descriptor.setComments(proposed.getComments()); descriptor.setConcurrentlySchedulableTaskCount(proposed.getConcurrentlySchedulableTaskCount()); descriptor.setGroupId(proposed.getRemoteGroupId()); descriptor.setTargetId(proposed.getTargetId()); descriptor.setId(generateUuid(proposed.getIdentifier(), rpgId, componentIdSeed)); descriptor.setName(proposed.getName()); descriptor.setUseCompression(proposed.isUseCompression()); return descriptor; }
public VersionedRemoteGroupPort mapRemotePort(final RemoteGroupPort remotePort, final ComponentType componentType) { final VersionedRemoteGroupPort port = new InstantiatedVersionedRemoteGroupPort(remotePort.getIdentifier(), remotePort.getRemoteProcessGroup().getIdentifier()); port.setIdentifier(getId(remotePort.getVersionedComponentId(), remotePort.getIdentifier())); port.setGroupIdentifier(getGroupId(remotePort.getRemoteProcessGroup().getIdentifier())); port.setComments(remotePort.getComments()); port.setConcurrentlySchedulableTaskCount(remotePort.getMaxConcurrentTasks()); port.setRemoteGroupId(getGroupId(remotePort.getRemoteProcessGroup().getIdentifier())); port.setName(remotePort.getName()); port.setUseCompression(remotePort.isUseCompression()); port.setBatchSize(mapBatchSettings(remotePort)); port.setTargetId(remotePort.getTargetIdentifier()); port.setComponentType(componentType); return port; }
@Override public RemotePortSchema apply(VersionedRemoteGroupPort versionedRemoteGroupPort) { Map<String, Object> map = new HashMap<>(); // If a targetId is specified, it takes precedence over the original id final String targetId = versionedRemoteGroupPort.getTargetId(); map.put(ID_KEY, StringUtils.isNotBlank(targetId) ? targetId : versionedRemoteGroupPort.getIdentifier()); map.put(NAME_KEY, versionedRemoteGroupPort.getName()); map.put(CommonPropertyKeys.COMMENT_KEY, versionedRemoteGroupPort.getComments()); map.put(CommonPropertyKeys.MAX_CONCURRENT_TASKS_KEY, versionedRemoteGroupPort.getConcurrentlySchedulableTaskCount()); map.put(CommonPropertyKeys.USE_COMPRESSION_KEY, versionedRemoteGroupPort.isUseCompression()); return new RemotePortSchema(map); } }
final String remoteGroupId = ((VersionedRemoteGroupPort) component).getRemoteGroupId(); updatedVersionedComponentIds.add(remoteGroupId);
@Override public RemotePortSchema apply(VersionedRemoteGroupPort versionedRemoteGroupPort) { Map<String, Object> map = new HashMap<>(); // If a targetId is specified, it takes precedence over the original id final String targetId = versionedRemoteGroupPort.getTargetId(); map.put(ID_KEY, StringUtils.isNotBlank(targetId) ? targetId : versionedRemoteGroupPort.getIdentifier()); map.put(NAME_KEY, versionedRemoteGroupPort.getName()); map.put(CommonPropertyKeys.COMMENT_KEY, versionedRemoteGroupPort.getComments()); map.put(CommonPropertyKeys.MAX_CONCURRENT_TASKS_KEY, versionedRemoteGroupPort.getConcurrentlySchedulableTaskCount()); map.put(CommonPropertyKeys.USE_COMPRESSION_KEY, versionedRemoteGroupPort.isUseCompression()); return new RemotePortSchema(map); } }
@Override public int hashCode() { return 923847 + String.valueOf(getName()).hashCode(); }