public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { { String theS3KeyPrefix; theS3KeyPrefix = this.getS3KeyPrefix(); strategy.appendField(locator, this, "s3KeyPrefix", buffer, theS3KeyPrefix, (this.s3KeyPrefix!= null)); } return buffer; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { { String theS3KeyPrefix; theS3KeyPrefix = this.getS3KeyPrefix(); strategy.appendField(locator, this, "s3KeyPrefix", buffer, theS3KeyPrefix, (this.s3KeyPrefix!= null)); } return buffer; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { { String theS3KeyPrefix; theS3KeyPrefix = this.getS3KeyPrefix(); strategy.appendField(locator, this, "s3KeyPrefix", buffer, theS3KeyPrefix, (this.s3KeyPrefix!= null)); } return buffer; }
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final S3KeyPrefixInformation that = ((S3KeyPrefixInformation) object); { String lhsS3KeyPrefix; lhsS3KeyPrefix = this.getS3KeyPrefix(); String rhsS3KeyPrefix; rhsS3KeyPrefix = that.getS3KeyPrefix(); if (!strategy.equals(LocatorUtils.property(thisLocator, "s3KeyPrefix", lhsS3KeyPrefix), LocatorUtils.property(thatLocator, "s3KeyPrefix", rhsS3KeyPrefix), lhsS3KeyPrefix, rhsS3KeyPrefix, (this.s3KeyPrefix!= null), (that.s3KeyPrefix!= null))) { return false; } } return true; }
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final S3KeyPrefixInformation that = ((S3KeyPrefixInformation) object); { String lhsS3KeyPrefix; lhsS3KeyPrefix = this.getS3KeyPrefix(); String rhsS3KeyPrefix; rhsS3KeyPrefix = that.getS3KeyPrefix(); if (!strategy.equals(LocatorUtils.property(thisLocator, "s3KeyPrefix", lhsS3KeyPrefix), LocatorUtils.property(thatLocator, "s3KeyPrefix", rhsS3KeyPrefix), lhsS3KeyPrefix, rhsS3KeyPrefix, (this.s3KeyPrefix!= null), (that.s3KeyPrefix!= null))) { return false; } } return true; }
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } final S3KeyPrefixInformation that = ((S3KeyPrefixInformation) object); { String lhsS3KeyPrefix; lhsS3KeyPrefix = this.getS3KeyPrefix(); String rhsS3KeyPrefix; rhsS3KeyPrefix = that.getS3KeyPrefix(); if (!strategy.equals(LocatorUtils.property(thisLocator, "s3KeyPrefix", lhsS3KeyPrefix), LocatorUtils.property(thatLocator, "s3KeyPrefix", rhsS3KeyPrefix), lhsS3KeyPrefix, rhsS3KeyPrefix, (this.s3KeyPrefix!= null), (that.s3KeyPrefix!= null))) { return false; } } return true; }
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) { int currentHashCode = 1; { String theS3KeyPrefix; theS3KeyPrefix = this.getS3KeyPrefix(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "s3KeyPrefix", theS3KeyPrefix), currentHashCode, theS3KeyPrefix, (this.s3KeyPrefix!= null)); } return currentHashCode; }
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) { int currentHashCode = 1; { String theS3KeyPrefix; theS3KeyPrefix = this.getS3KeyPrefix(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "s3KeyPrefix", theS3KeyPrefix), currentHashCode, theS3KeyPrefix, (this.s3KeyPrefix!= null)); } return currentHashCode; }
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) { int currentHashCode = 1; { String theS3KeyPrefix; theS3KeyPrefix = this.getS3KeyPrefix(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "s3KeyPrefix", theS3KeyPrefix), currentHashCode, theS3KeyPrefix, (this.s3KeyPrefix!= null)); } return currentHashCode; }
LOGGER.info(" S3 key prefix: " + s3KeyPrefixInformation.getS3KeyPrefix());
LOGGER.info(" S3 key prefix: " + s3KeyPrefixInformation.getS3KeyPrefix());
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof S3KeyPrefixInformation) { final S3KeyPrefixInformation copy = ((S3KeyPrefixInformation) draftCopy); { Boolean s3KeyPrefixShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.s3KeyPrefix!= null)); if (s3KeyPrefixShouldBeCopiedAndSet == Boolean.TRUE) { String sourceS3KeyPrefix; sourceS3KeyPrefix = this.getS3KeyPrefix(); String copyS3KeyPrefix = ((String) strategy.copy(LocatorUtils.property(locator, "s3KeyPrefix", sourceS3KeyPrefix), sourceS3KeyPrefix, (this.s3KeyPrefix!= null))); copy.setS3KeyPrefix(copyS3KeyPrefix); } else { if (s3KeyPrefixShouldBeCopiedAndSet == Boolean.FALSE) { copy.s3KeyPrefix = null; } } } } return draftCopy; }
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof S3KeyPrefixInformation) { final S3KeyPrefixInformation copy = ((S3KeyPrefixInformation) draftCopy); { Boolean s3KeyPrefixShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.s3KeyPrefix!= null)); if (s3KeyPrefixShouldBeCopiedAndSet == Boolean.TRUE) { String sourceS3KeyPrefix; sourceS3KeyPrefix = this.getS3KeyPrefix(); String copyS3KeyPrefix = ((String) strategy.copy(LocatorUtils.property(locator, "s3KeyPrefix", sourceS3KeyPrefix), sourceS3KeyPrefix, (this.s3KeyPrefix!= null))); copy.setS3KeyPrefix(copyS3KeyPrefix); } else { if (s3KeyPrefixShouldBeCopiedAndSet == Boolean.FALSE) { copy.s3KeyPrefix = null; } } } } return draftCopy; }
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof S3KeyPrefixInformation) { final S3KeyPrefixInformation copy = ((S3KeyPrefixInformation) draftCopy); { Boolean s3KeyPrefixShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.s3KeyPrefix!= null)); if (s3KeyPrefixShouldBeCopiedAndSet == Boolean.TRUE) { String sourceS3KeyPrefix; sourceS3KeyPrefix = this.getS3KeyPrefix(); String copyS3KeyPrefix = ((String) strategy.copy(LocatorUtils.property(locator, "s3KeyPrefix", sourceS3KeyPrefix), sourceS3KeyPrefix, (this.s3KeyPrefix!= null))); copy.setS3KeyPrefix(copyS3KeyPrefix); } else { if (s3KeyPrefixShouldBeCopiedAndSet == Boolean.FALSE) { copy.s3KeyPrefix = null; } } } } return draftCopy; }
targetLocalDirectory = Paths.get(s3FileTransferRequestParamsDto.getLocalPath(), s3KeyPrefixInformation.getS3KeyPrefix()).toFile(); if (!targetLocalDirectory.isDirectory()) s3FileTransferRequestParamsDto.setS3KeyPrefix(s3KeyPrefixInformation.getS3KeyPrefix() + "/"); storageFileHelper.validateStorageUnitS3Files(storageUnit, actualS3Files, s3KeyPrefixInformation.getS3KeyPrefix()); storageFileHelper.validateDownloadedS3Files(s3FileTransferRequestParamsDto.getLocalPath(), s3KeyPrefixInformation.getS3KeyPrefix(), storageUnit); createDownloaderOutputManifestDto(businessObjectData, storageUnit, s3KeyPrefixInformation.getS3KeyPrefix()); manifestWriter.writeJsonManifest(targetLocalDirectory, OUTPUT_MANIFEST_FILE_NAME, downloaderOutputManifestDto);
new AwsPolicyBuilder().withS3Prefix(bucketName, s3KeyPrefixInformation.getS3KeyPrefix(), s3Actions).withS3(bucketName, null, S3Actions.ListObjects);
new AwsPolicyBuilder().withS3Prefix(bucketName, s3KeyPrefixInformation.getS3KeyPrefix(), s3Actions).withS3(bucketName, null, S3Actions.ListObjects);
@Test public void testGetS3KeyPrefix() throws Exception { // Upload and register business object data parents. uploadAndRegisterTestDataParents(downloaderWebClient); // Upload and register the initial version if of the test business object data. uploadTestDataFilesToS3(S3_TEST_PATH_V0); final UploaderInputManifestDto uploaderInputManifestDto = getTestUploaderInputManifestDto(); executeWithoutLogging(DataBridgeWebClient.class, new Command() { @Override public void execute() throws Exception { BusinessObjectData businessObjectData = downloaderWebClient.preRegisterBusinessObjectData(uploaderInputManifestDto, StorageEntity.MANAGED_STORAGE, false); BusinessObjectDataKey businessObjectDataKey = businessObjectDataHelper.getBusinessObjectDataKey(businessObjectData); downloaderWebClient .addStorageFiles(businessObjectDataKey, uploaderInputManifestDto, getTestS3FileTransferRequestParamsDto(S3_TEST_PATH_V0 + "/"), StorageEntity.MANAGED_STORAGE); downloaderWebClient.updateBusinessObjectDataStatus(businessObjectDataKey, BusinessObjectDataStatusEntity.VALID); } }); // Get S3 key prefix. BusinessObjectData businessObjectData = toBusinessObjectData(uploaderInputManifestDto); S3KeyPrefixInformation resultS3KeyPrefixInformation = downloaderWebClient.getS3KeyPrefix(businessObjectData); // Validate the results. assertNotNull(resultS3KeyPrefixInformation); assertEquals(S3_SIMPLE_TEST_PATH, resultS3KeyPrefixInformation.getS3KeyPrefix()); }
setTaskWorkflowVariable(execution, VARIABLE_S3_KEY_PREFIX, s3KeyPrefixInformation.getS3KeyPrefix());
setTaskWorkflowVariable(execution, VARIABLE_S3_KEY_PREFIX, s3KeyPrefixInformation.getS3KeyPrefix());