/** * Validates the job signal request. This method also trims request parameters. * * @param request the request * * @throws IllegalArgumentException if any validation errors were found */ private void validateJobSignalRequest(JobSignalRequest request) { // Validate required elements Assert.hasText(request.getId(), "A job id must be specified."); Assert.hasText(request.getReceiveTaskId(), "A receive task id must be specified."); // Validate that parameter names are there and not duplicate parameterHelper.validateParameters(request.getParameters()); if (request.getS3PropertiesLocation() != null) { s3PropertiesLocationHelper.validate(request.getS3PropertiesLocation()); } // Remove leading and trailing spaces. request.setId(request.getId().trim()); request.setReceiveTaskId(request.getReceiveTaskId().trim()); } }
/** * Gets the parameters from the given {@link JobSignalRequest} and the S3 location provided. * * @param jobSignalRequest {@link JobSignalRequest} * * @return parameters */ private Map<String, Object> getParameters(JobSignalRequest jobSignalRequest) { Map<String, Object> signalParameters = new HashMap<>(); // Get parameters from S3 S3PropertiesLocation s3PropertiesLocation = jobSignalRequest.getS3PropertiesLocation(); if (s3PropertiesLocation != null) { putParametersFromS3(s3PropertiesLocation.getBucketName(), s3PropertiesLocation.getKey(), signalParameters); } // Get parameters from request signalParameters.putAll(toMap(jobSignalRequest.getParameters())); return signalParameters; }
/** * Validates the job signal request. This method also trims request parameters. * * @param request the request * * @throws IllegalArgumentException if any validation errors were found */ private void validateJobSignalRequest(JobSignalRequest request) { // Validate required elements Assert.hasText(request.getId(), "A job id must be specified."); Assert.hasText(request.getReceiveTaskId(), "A receive task id must be specified."); // Validate that parameter names are there and not duplicate parameterHelper.validateParameters(request.getParameters()); if (request.getS3PropertiesLocation() != null) { s3PropertiesLocationHelper.validate(request.getS3PropertiesLocation()); } // Remove leading and trailing spaces. request.setId(request.getId().trim()); request.setReceiveTaskId(request.getReceiveTaskId().trim()); } }
/** * Gets the parameters from the given {@link JobSignalRequest} and the S3 location provided. * * @param jobSignalRequest {@link JobSignalRequest} * * @return parameters */ private Map<String, Object> getParameters(JobSignalRequest jobSignalRequest) { Map<String, Object> signalParameters = new HashMap<>(); // Get parameters from S3 S3PropertiesLocation s3PropertiesLocation = jobSignalRequest.getS3PropertiesLocation(); if (s3PropertiesLocation != null) { putParametersFromS3(s3PropertiesLocation.getBucketName(), s3PropertiesLocation.getKey(), signalParameters); } // Get parameters from request signalParameters.putAll(toMap(jobSignalRequest.getParameters())); return signalParameters; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { { String theId; theId = this.getId(); strategy.appendField(locator, this, "id", buffer, theId, (this.id!= null)); } { String theReceiveTaskId; theReceiveTaskId = this.getReceiveTaskId(); strategy.appendField(locator, this, "receiveTaskId", buffer, theReceiveTaskId, (this.receiveTaskId!= null)); } { List<Parameter> theParameters; theParameters = ((this.parameters!= null)?this.getParameters():null); strategy.appendField(locator, this, "parameters", buffer, theParameters, (this.parameters!= null)); } { S3PropertiesLocation theS3PropertiesLocation; theS3PropertiesLocation = this.getS3PropertiesLocation(); strategy.appendField(locator, this, "s3PropertiesLocation", buffer, theS3PropertiesLocation, (this.s3PropertiesLocation!= null)); } return buffer; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { { String theId; theId = this.getId(); strategy.appendField(locator, this, "id", buffer, theId, (this.id!= null)); } { String theReceiveTaskId; theReceiveTaskId = this.getReceiveTaskId(); strategy.appendField(locator, this, "receiveTaskId", buffer, theReceiveTaskId, (this.receiveTaskId!= null)); } { List<Parameter> theParameters; theParameters = ((this.parameters!= null)?this.getParameters():null); strategy.appendField(locator, this, "parameters", buffer, theParameters, (this.parameters!= null)); } { S3PropertiesLocation theS3PropertiesLocation; theS3PropertiesLocation = this.getS3PropertiesLocation(); strategy.appendField(locator, this, "s3PropertiesLocation", buffer, theS3PropertiesLocation, (this.s3PropertiesLocation!= null)); } return buffer; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { { String theId; theId = this.getId(); strategy.appendField(locator, this, "id", buffer, theId, (this.id!= null)); } { String theReceiveTaskId; theReceiveTaskId = this.getReceiveTaskId(); strategy.appendField(locator, this, "receiveTaskId", buffer, theReceiveTaskId, (this.receiveTaskId!= null)); } { List<Parameter> theParameters; theParameters = ((this.parameters!= null)?this.getParameters():null); strategy.appendField(locator, this, "parameters", buffer, theParameters, (this.parameters!= null)); } { S3PropertiesLocation theS3PropertiesLocation; theS3PropertiesLocation = this.getS3PropertiesLocation(); strategy.appendField(locator, this, "s3PropertiesLocation", buffer, theS3PropertiesLocation, (this.s3PropertiesLocation!= null)); } return buffer; }
lhsS3PropertiesLocation = this.getS3PropertiesLocation(); S3PropertiesLocation rhsS3PropertiesLocation; rhsS3PropertiesLocation = that.getS3PropertiesLocation(); if (!strategy.equals(LocatorUtils.property(thisLocator, "s3PropertiesLocation", lhsS3PropertiesLocation), LocatorUtils.property(thatLocator, "s3PropertiesLocation", rhsS3PropertiesLocation), lhsS3PropertiesLocation, rhsS3PropertiesLocation, (this.s3PropertiesLocation!= null), (that.s3PropertiesLocation!= null))) { return false;
lhsS3PropertiesLocation = this.getS3PropertiesLocation(); S3PropertiesLocation rhsS3PropertiesLocation; rhsS3PropertiesLocation = that.getS3PropertiesLocation(); if (!strategy.equals(LocatorUtils.property(thisLocator, "s3PropertiesLocation", lhsS3PropertiesLocation), LocatorUtils.property(thatLocator, "s3PropertiesLocation", rhsS3PropertiesLocation), lhsS3PropertiesLocation, rhsS3PropertiesLocation, (this.s3PropertiesLocation!= null), (that.s3PropertiesLocation!= null))) { return false;
lhsS3PropertiesLocation = this.getS3PropertiesLocation(); S3PropertiesLocation rhsS3PropertiesLocation; rhsS3PropertiesLocation = that.getS3PropertiesLocation(); if (!strategy.equals(LocatorUtils.property(thisLocator, "s3PropertiesLocation", lhsS3PropertiesLocation), LocatorUtils.property(thatLocator, "s3PropertiesLocation", rhsS3PropertiesLocation), lhsS3PropertiesLocation, rhsS3PropertiesLocation, (this.s3PropertiesLocation!= null), (that.s3PropertiesLocation!= null))) { return false;
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) { int currentHashCode = 1; { String theId; theId = this.getId(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "id", theId), currentHashCode, theId, (this.id!= null)); } { String theReceiveTaskId; theReceiveTaskId = this.getReceiveTaskId(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "receiveTaskId", theReceiveTaskId), currentHashCode, theReceiveTaskId, (this.receiveTaskId!= null)); } { List<Parameter> theParameters; theParameters = ((this.parameters!= null)?this.getParameters():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "parameters", theParameters), currentHashCode, theParameters, (this.parameters!= null)); } { S3PropertiesLocation theS3PropertiesLocation; theS3PropertiesLocation = this.getS3PropertiesLocation(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "s3PropertiesLocation", theS3PropertiesLocation), currentHashCode, theS3PropertiesLocation, (this.s3PropertiesLocation!= null)); } return currentHashCode; }
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) { int currentHashCode = 1; { String theId; theId = this.getId(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "id", theId), currentHashCode, theId, (this.id!= null)); } { String theReceiveTaskId; theReceiveTaskId = this.getReceiveTaskId(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "receiveTaskId", theReceiveTaskId), currentHashCode, theReceiveTaskId, (this.receiveTaskId!= null)); } { List<Parameter> theParameters; theParameters = ((this.parameters!= null)?this.getParameters():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "parameters", theParameters), currentHashCode, theParameters, (this.parameters!= null)); } { S3PropertiesLocation theS3PropertiesLocation; theS3PropertiesLocation = this.getS3PropertiesLocation(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "s3PropertiesLocation", theS3PropertiesLocation), currentHashCode, theS3PropertiesLocation, (this.s3PropertiesLocation!= null)); } return currentHashCode; }
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) { int currentHashCode = 1; { String theId; theId = this.getId(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "id", theId), currentHashCode, theId, (this.id!= null)); } { String theReceiveTaskId; theReceiveTaskId = this.getReceiveTaskId(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "receiveTaskId", theReceiveTaskId), currentHashCode, theReceiveTaskId, (this.receiveTaskId!= null)); } { List<Parameter> theParameters; theParameters = ((this.parameters!= null)?this.getParameters():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "parameters", theParameters), currentHashCode, theParameters, (this.parameters!= null)); } { S3PropertiesLocation theS3PropertiesLocation; theS3PropertiesLocation = this.getS3PropertiesLocation(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "s3PropertiesLocation", theS3PropertiesLocation), currentHashCode, theS3PropertiesLocation, (this.s3PropertiesLocation!= null)); } return currentHashCode; }
if (s3PropertiesLocationShouldBeCopiedAndSet == Boolean.TRUE) { S3PropertiesLocation sourceS3PropertiesLocation; sourceS3PropertiesLocation = this.getS3PropertiesLocation(); S3PropertiesLocation copyS3PropertiesLocation = ((S3PropertiesLocation) strategy.copy(LocatorUtils.property(locator, "s3PropertiesLocation", sourceS3PropertiesLocation), sourceS3PropertiesLocation, (this.s3PropertiesLocation!= null))); copy.setS3PropertiesLocation(copyS3PropertiesLocation);
if (s3PropertiesLocationShouldBeCopiedAndSet == Boolean.TRUE) { S3PropertiesLocation sourceS3PropertiesLocation; sourceS3PropertiesLocation = this.getS3PropertiesLocation(); S3PropertiesLocation copyS3PropertiesLocation = ((S3PropertiesLocation) strategy.copy(LocatorUtils.property(locator, "s3PropertiesLocation", sourceS3PropertiesLocation), sourceS3PropertiesLocation, (this.s3PropertiesLocation!= null))); copy.setS3PropertiesLocation(copyS3PropertiesLocation);
if (s3PropertiesLocationShouldBeCopiedAndSet == Boolean.TRUE) { S3PropertiesLocation sourceS3PropertiesLocation; sourceS3PropertiesLocation = this.getS3PropertiesLocation(); S3PropertiesLocation copyS3PropertiesLocation = ((S3PropertiesLocation) strategy.copy(LocatorUtils.property(locator, "s3PropertiesLocation", sourceS3PropertiesLocation), sourceS3PropertiesLocation, (this.s3PropertiesLocation!= null))); copy.setS3PropertiesLocation(copyS3PropertiesLocation);