Produced by Araxis Merge on 11/14/2017 6:57:19 AM Central Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | cbs.zip\cbs\cbs\src\main\java\gov\va\cpss\job\cbs | CbsQueryNewPSSiteTasklet.java | Thu Nov 9 14:19:54 2017 UTC |
| 2 | cbs.zip\cbs\cbs\src\main\java\gov\va\cpss\job\cbs | CbsQueryNewPSSiteTasklet.java | Tue Nov 14 12:26:18 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 156 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | package go v.va.cpss. job.cbs; | |
| 2 | ||
| 3 | import jav a.util.Lis t; | |
| 4 | ||
| 5 | import org .apache.lo g4j.Logger ; | |
| 6 | import org .springfra mework.bat ch.core.St epContribu tion; | |
| 7 | import org .springfra mework.bat ch.core.sc ope.contex t.ChunkCon text; | |
| 8 | import org .springfra mework.bat ch.core.st ep.tasklet .Tasklet; | |
| 9 | import org .springfra mework.bat ch.repeat. RepeatStat us; | |
| 10 | ||
| 11 | import gov .va.cpss.s ervice.Fps Service; | |
| 12 | ||
| 13 | /** | |
| 14 | * Query f or all PSS ite record s associat ed with PS Received i n the NEW state. | |
| 15 | * | |
| 16 | * @author DN S BROWNL | |
| 17 | */ | |
| 18 | public cla ss CbsQuer yNewPSSite Tasklet im plements T asklet { | |
| 19 | ||
| 20 | pr ivate fina l Logger t askletLogg er; | |
| 21 | ||
| 22 | pr ivate FpsS ervice fps Service; | |
| 23 | ||
| 24 | pr ivate CbsR untimeStat e cbsRunti meState; | |
| 25 | ||
| 26 | pu blic CbsQu eryNewPSSi teTasklet( ) { | |
| 27 | task letLogger = Logger.g etLogger(t his.getCla ss().getCa nonicalNam e()); | |
| 28 | } | |
| 29 | ||
| 30 | pu blic FpsSe rvice getF psService( ) { | |
| 31 | retu rn fpsServ ice; | |
| 32 | } | |
| 33 | ||
| 34 | pu blic void setFpsServ ice(FpsSer vice fpsSe rvice) { | |
| 35 | this .fpsServic e = fpsSer vice; | |
| 36 | } | |
| 37 | ||
| 38 | pu blic CbsRu ntimeState getCbsRun timeState( ) { | |
| 39 | retu rn cbsRunt imeState; | |
| 40 | } | |
| 41 | ||
| 42 | pu blic void setCbsRunt imeState(C bsRuntimeS tate cbsRu ntimeState ) { | |
| 43 | this .cbsRuntim eState = c bsRuntimeS tate; | |
| 44 | } | |
| 45 | ||
| 46 | @O verride | |
| 47 | pu blic Repea tStatus ex ecute(Step Contributi on contrib ution, Chu nkContext chunkConte xt) throws Exception { | |
| 48 | ||
| 49 | task letLogger. info("Begi n execute" ); | |
| 50 | ||
| 51 | // L oop throug h all of N EW PSRecei ved. | |
| 52 | whil e (!cbsRun timeState. isDataErro r() && (cb sRuntimeSt ate.pollCu rrentPSRec eivedID() != null)) { | |
| 53 | ||
| 54 | // Get all PSSit e for this PSReceive d. | |
| 55 | List<L ong> psSit eL = fpsSe rvice.getP SSiteIDLis tForPSRece ivedID(cbs RuntimeSta te.getCurr entPSRecei vedID()); | |
| 56 | ||
| 57 | // Set error fla g if empty . This fla g will be checked by the | |
| 58 | // sub sequent re ader. | |
| 59 | if ((p sSiteL == null) || p sSiteL.isE mpty()) { | |
| 60 | ||
| 61 | taskletL ogger.erro r( | |
| 62 | "E rror obtai ning site list for r eceived ID (" + cbsRu ntimeState .getCurren tPSReceive dID() + ") "); | |
| 63 | cbsRunti meState.se tDataError (true); | |
| 64 | } else { | |
| 65 | ||
| 66 | // Save the recent ly queried data. | |
| 67 | for (Lon g psSite : psSiteL) { | |
| 68 | taskletLog ger.info(" Adding PSS ite ID: " + psSite); | |
| 69 | cbsRuntime State.addP SSiteEntry (psSite); | |
| 70 | } | |
| 71 | } | |
| 72 | } | |
| 73 | ||
| 74 | task letLogger. info("End execute"); | |
| 75 | ||
| 76 | retu rn RepeatS tatus.FINI SHED; | |
| 77 | } | |
| 78 | ||
| 79 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.