@@ -0,0 +1,2221 @@
+package com.kohls.hr.ob.batch.itemreader;%0D%0A%0D%0Aimport org.springframework.batch.item.file.FlatFileItemReader;%0D%0Aimport org.springframework.beans.factory.InitializingBean;%0D%0A%0D%0A/**%0D%0A * FlatFileItemReader implementation which reads encrypted GPG files%0D%0A * PGPReader needs to be Step Scoped if isCompressed is true%0D%0A * @author Omkar Marathe%0D%0A * @since 0.0.1%0D%0A */%0D%0Apublic class PGPReader extends FlatFileItemReader%3CObject%3E implements InitializingBean%7B%0D%0A%0D%0A%09private boolean isCompressed;%0D%0A%09private String passphrase1;%0D%0A%09private String secretKeyFilePath;%0D%0A%09private String publicKeyFilePath; //Can be null if isCompressed is false%0D%0A%09private String passphrase2;       //Can be null if isCompressed is false%0D%0A%09%0D%0A%09public PGPReader() %7B%0D%0A%09%09// TODO Check if isCompressed is true, then generate intermediate file & change/override the input resource%0D%0A%09%7D%0D%0A%09%0D%0A%09/**%0D%0A%09 * @return the isCompressed%0D%0A%09 */%0D%0A%09public boolean isCompressed() %7B%0D%0A%09%09return isCompressed;%0D%0A%09%7D%0D%0A%09/**%0D%0A%09 * @param isCompressed the isCompressed to set%0D%0A%09 */%0D%0A%09public void setCompressed(boolean isCompressed) %7B%0D%0A%09%09this.isCompressed = isCompressed;%0D%0A%09%7D%0D%0A%09/**%0D%0A%09 * @return the passphrase1%0D%0A%09 */%0D%0A%09public String getPassphrase1() %7B%0D%0A%09%09return passphrase1;%0D%0A%09%7D%0D%0A%09/**%0D%0A%09 * @param passphrase1 the passphrase1 to set%0D%0A%09 */%0D%0A%09public void setPassphrase1(String passphrase1) %7B%0D%0A%09%09this.passphrase1 = passphrase1;%0D%0A%09%7D%0D%0A%09/**%0D%0A%09 * @return the secretKeyFilePath%0D%0A%09 */%0D%0A%09public String getSecretKeyFilePath() %7B%0D%0A%09%09return secretKeyFilePath;%0D%0A%09%7D%0D%0A%09/**%0D%0A%09 * @param secretKeyFilePath the secretKeyFilePath to set%0D%0A%09 */%0D%0A%09public void setSecretKeyFilePath(String secretKeyFilePath) %7B%0D%0A%09%09this.secretKeyFilePath = secretKeyFilePath;%0D%0A%09%7D%0D%0A%09/**%0D%0A%09 * @return the publicKeyFilePath%0D%0A%09 */%0D%0A%09public String getPublicKeyFilePath() %7B%0D%0A%09%09return publicKeyFilePath;%0D%0A%09%7D%0D%0A%09/**%0D%0A%09 * @param publicKeyFilePath the publicKeyFilePath to set%0D%0A%09 */%0D%0A%09public void setPublicKeyFilePath(String publicKeyFilePath) %7B%0D%0A%09%09this.publicKeyFilePath = publicKeyFilePath;%0D%0A%09%7D%0D%0A%09/**%0D%0A%09 * @return the passphrase2%0D%0A%09 */%0D%0A%09public String getPassphrase2() %7B%0D%0A%09%09return passphrase2;%0D%0A%09%7D%0D%0A%09/**%0D%0A%09 * @param passphrase2 the passphrase2 to set%0D%0A%09 */%0D%0A%09public void setPassphrase2(String passphrase2) %7B%0D%0A%09%09this.passphrase2 = passphrase2;%0D%0A%09%7D%0D%0A%09%0D%0A%09%0D%0A%7D%0D%0A

Structure Ready PGPReader