public void setWorking(final FlowFileRecord flowFile, final String attributeKey, final String attributeValue) { workingFlowFileRecord = flowFile; // In the case that the type is CREATE, we know that all attributes are updated attributes, so no need to store them. if (type == RepositoryRecordType.CREATE) { return; } // If setting attribute to same value as original, don't add to updated attributes final String currentValue = originalAttributes.get(attributeKey); if (currentValue == null || !currentValue.equals(attributeValue)) { initializeUpdatedAttributes().put(attributeKey, attributeValue); } }
public void setWorking(final FlowFileRecord flowFile, final Map<String, String> updatedAttribs) { workingFlowFileRecord = flowFile; // In the case that the type is CREATE, we know that all attributes are updated attributes, so no need to store them. if (type == RepositoryRecordType.CREATE) { return; } for (final Map.Entry<String, String> entry : updatedAttribs.entrySet()) { final String currentValue = originalAttributes.get(entry.getKey()); if (currentValue == null || !currentValue.equals(entry.getValue())) { initializeUpdatedAttributes().put(entry.getKey(), entry.getValue()); } } }
public void setWorking(final FlowFileRecord flowFile, final String attributeKey, final String attributeValue) { workingFlowFileRecord = flowFile; // In the case that the type is CREATE, we know that all attributes are updated attributes, so no need to store them. if (type == RepositoryRecordType.CREATE) { return; } // If setting attribute to same value as original, don't add to updated attributes final String currentValue = originalAttributes.get(attributeKey); if (currentValue == null || !currentValue.equals(attributeValue)) { initializeUpdatedAttributes().put(attributeKey, attributeValue); } }
public void setWorking(final FlowFileRecord flowFile, final Map<String, String> updatedAttribs) { workingFlowFileRecord = flowFile; // In the case that the type is CREATE, we know that all attributes are updated attributes, so no need to store them. if (type == RepositoryRecordType.CREATE) { return; } for (final Map.Entry<String, String> entry : updatedAttribs.entrySet()) { final String currentValue = originalAttributes.get(entry.getKey()); if (currentValue == null || !currentValue.equals(entry.getValue())) { initializeUpdatedAttributes().put(entry.getKey(), entry.getValue()); } } }