Produced by Araxis Merge on 2/7/2017 12:14:08 PM Eastern 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 | cpss.zip\cpss\src\main\java\gov\va\cpss\service | SftpService.java | Wed Feb 1 21:07:26 2017 UTC |
2 | cpss.zip\cpss\src\main\java\gov\va\cpss\service | SftpService.java | Mon Feb 6 15:17:58 2017 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 444 |
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. service; | |
2 | ||
3 | import jav a.util.Lis t; | |
4 | ||
5 | /** | |
6 | * Service class for handling activities relating to sftp. | |
7 | * | |
8 | * Convert ed to inte rface to s upport bot h Spring I ntegration and Apach e VFS | |
9 | * impleme ntations. Original S pring Inte gration im plementati on moved t o | |
10 | * gov.va. cpss.servi ce.impl.si .SpringInt egrationSf tpServiceI mpl, which will | |
11 | * eventua lly be rem oved since Spring In tegration is current ly not app roved by | |
12 | * TRM. - Brad Pickl e - 10/3/2 016 | |
13 | * | |
14 | * @author DN S D N S | |
15 | */ | |
16 | public int erface Sft pService { | |
17 | ||
18 | /* * | |
19 | * Transfer the specif ied file p ath to the default d irectory o n the serv er. | |
20 | * If the fi lepath is to a file the file w ill be sen t to the d efault | |
21 | * directory on the se rver. IF t he filepat h is a dir ectory the n all file s | |
22 | * will be s ent to the default d irectory o n the serv er. | |
23 | * | |
24 | * @param fi lepath | |
25 | * The path of the fi le or dire ctory to s end to the server. | |
26 | * | |
27 | * @return B oolean fla g indicati ng success or failur e. | |
28 | * / | |
29 | bo olean ftpF ileToServe r(final St ring filep ath); | |
30 | ||
31 | /* * | |
32 | * Transfer the specif ied file p ath to the specified directory on the | |
33 | * server. I f the file path is to a file th e file wil l be sent to the def ault | |
34 | * directory on the se rver. IF t he filepat h is a dir ectory the n all file s | |
35 | * will be s ent to the default d irectory o n the serv er. | |
36 | * | |
37 | * @param fi lepath | |
38 | * The path of the fi le or dire ctory to s end to the server. | |
39 | * @param ta rgetDirect ory | |
40 | * The rela tive targe t director y on the s erver. | |
41 | * @return B oolean fla g indicati ng success or failur e. | |
42 | * / | |
43 | bo olean ftpF ileToServe r(final St ring filep ath, final String ta rgetDirect ory); | |
44 | ||
45 | /* * | |
46 | * Sent the specified local file path to th e server a s the spec ified targ et | |
47 | * filename in the tar get direct ory on the server. | |
48 | * | |
49 | * @param fi lepath | |
50 | * The loca l filepath to send. | |
51 | * @param ta rgetFilena me | |
52 | * The targ et filenam e on the s erver. | |
53 | * @param ta rgetDirect ory | |
54 | * The targ et directo ry for the target fi lename on the server . | |
55 | * @return B oolean fla g indicati ng if succ essful or not. | |
56 | * / | |
57 | bo olean ftpF ileToServe rWithName( final Stri ng filepat h, final S tring targ etFilename , final St ring targe tDirectory ); | |
58 | ||
59 | /* * | |
60 | * Send an e mpty file to the sft p server i n the spec ified targ et directo ry | |
61 | * with the specified name. | |
62 | * | |
63 | * @param ta rgetFilena me | |
64 | * The name of the re sulting em pty file o n the sftp server. | |
65 | * @param ta rgetDirect ory | |
66 | * The targ et directo ry on the sftp serve r. | |
67 | * @return B oolean fla g indicati ng success ful or not . | |
68 | * / | |
69 | bo olean ftpE mptyFileTo ServerWith Name(final String ta rgetFilena me, final String tar getDirecto ry); | |
70 | ||
71 | /* * | |
72 | * Send the specified string con tent as th e specifie d file con tent to th e | |
73 | * sftp serv er int he specified target dir ectory wit h the spec ified name . | |
74 | * | |
75 | * @param co ntent | |
76 | * The cont ent of the target fi le. | |
77 | * @param ta rgetFilena me | |
78 | * The name of the re sulting fi le on the sftp serve r. | |
79 | * @param ta rgetDirect ory | |
80 | * The targ et directo ry on the sftp serve r. | |
81 | * @return B oolean fla g indicati ng success ful or not . | |
82 | * / | |
83 | bo olean ftpS tringAsFil eToServerW ithName(fi nal String content, final Stri ng targetF ilename, | |
84 | final String tar getDirecto ry); | |
85 | ||
86 | /* * | |
87 | * Remove th e specifie d filename from the specified target dir ectory on the | |
88 | * server. | |
89 | * | |
90 | * @param fi lename | |
91 | * The name of the fi le to remo ve. | |
92 | * @param ta rgetDirect ory | |
93 | * The dire ctory path where the file shou ld reside. | |
94 | * @return B oolean fla g indicati ng success or failur e. | |
95 | * / | |
96 | bo olean ftpR emoveFileF romDirecto ry(final S tring file name, fina l String t argetDirec tory); | |
97 | ||
98 | /* * | |
99 | * Move the specified filename t o the spec ified targ et directo ry. | |
100 | * | |
101 | * @param or iginalFile name | |
102 | * The name of the fi le to move . | |
103 | * @param ta rgetDirect ory | |
104 | * The dire ctory path to move t he file. | |
105 | * @return B oolean fla g indicati ng success or failur e. | |
106 | * / | |
107 | bo olean ftpM oveFileToD irectory(f inal Strin g original Filename, final Stri ng targetD irectory); | |
108 | ||
109 | /* * | |
110 | * Move the specified filename t o the spec ified targ et directo ry. | |
111 | * | |
112 | * @param or iginalFile name | |
113 | * The name of the fi le to move . | |
114 | * @param ta rgetDirect ory | |
115 | * The dire ctory path to move t he file. | |
116 | * @return B oolean fla g indicati ng success or failur e. | |
117 | * / | |
118 | bo olean ftpM oveFileFro mDirectory ToDirector y(final St ring origi nalFilenam e, final S tring orig inalDirect ory, | |
119 | final String tar getDirecto ry); | |
120 | ||
121 | /* * | |
122 | * Rename th e specifie d filename with the new filena me in the specified | |
123 | * target di rectory on the serve r. | |
124 | * | |
125 | * @param or iginalFile name | |
126 | * The orig inal filen ame on the server. | |
127 | * @param ne wFilename | |
128 | * The new filename o n the serv er. | |
129 | * @param ta rgetDirect ory | |
130 | * The targ et directo ry where t he files r eside on t he server. | |
131 | * @return B oolean fla g indicati ng success ful rename or not. | |
132 | * / | |
133 | bo olean ftpR enameFileI nDirectory (final Str ing origin alFilename , final St ring newFi lename, | |
134 | final String tar getDirecto ry); | |
135 | ||
136 | /* * | |
137 | * Get a lis t of files that resi de in the specified directory path. | |
138 | * | |
139 | * @param ta rgetDirect ory | |
140 | * The dire ctory path to get as sociated f ile listin g. | |
141 | * @return B oolean fla g indicati ng success or failur e. | |
142 | * / | |
143 | Li st<String> ftpGetFil eListInDir ectory(fin al String targetDire ctory); | |
144 | ||
145 | /* * | |
146 | * Get a lis t of files that resi de in the specified directory path. | |
147 | * | |
148 | * @param ta rgetDirect ory | |
149 | * The dire ctory path to get as sociated f ile listin g. | |
150 | * @param th rowExcepti ons | |
151 | * If true, any excep tions will be re-thr own after being logg ed. | |
152 | * @return B oolean fla g indicati ng success or failur e. | |
153 | * / | |
154 | Li st<String> ftpGetFil eListInDir ectory(fin al String targetDire ctory, boo lean throw Exceptions ); | |
155 | ||
156 | /* * | |
157 | * Get a lis t of files that resi de in the specified directory path that have | |
158 | * the speci fied exten sion. The extension check will ignore ca se. | |
159 | * | |
160 | * @param ta rgetDirect ory | |
161 | * The dire ctory path to get as sociated f ile listin g. | |
162 | * @return B oolean fla g indicati ng success or failur e. | |
163 | * / | |
164 | Li st<String> ftpGetFil eListWithE xtensionIn Directory( final Stri ng targetD irectory, final Stri ng extensi on); | |
165 | ||
166 | /* * | |
167 | * Get a lis t of files that resi de in the specified directory path that have | |
168 | * the speci fied exten sion. The extension check will ignore ca se. | |
169 | * | |
170 | * @param ta rgetDirect ory | |
171 | * The dire ctory path to get as sociated f ile listin g. | |
172 | * @param th rowExcepti ons | |
173 | * If true, any excep tions will be re-thr own after being logg ed. | |
174 | * @return L ist of fil e names so rted by th eir modifi ed dates | |
175 | * / | |
176 | Li st<String> ftpGetFil eListWithE xtensionIn Directory( final Stri ng targetD irectory, final Stri ng extensi on, | |
177 | boolea n throwExc eptions); | |
178 | ||
179 | /* * | |
180 | * Check if the specif ied filena me exists in the tar get direct ory. | |
181 | * | |
182 | * @param fi lename | |
183 | * The name of the fi le to chec k existenc e. | |
184 | * @param ta rgetDirect ory | |
185 | * The targ et directo ry path to check for the speci fied file. | |
186 | * @return B oolean fla g indicati ng success or failur e. | |
187 | * / | |
188 | bo olean ftpF ileExistsI nDirectory (final Str ing filena me, final String tar getDirecto ry); | |
189 | ||
190 | /* * | |
191 | * Check if the specif ied filena me exists in the tar get direct ory. | |
192 | * | |
193 | * @param fi lename | |
194 | * The name of the fi le to chec k existenc e. | |
195 | * @param ta rgetDirect ory | |
196 | * The targ et directo ry path to check for the speci fied file. | |
197 | * @param th rowExcepti ons | |
198 | * If true, any excep tions will be re-thr own after being logg ed. | |
199 | * @return B oolean fla g indicati ng success or failur e. | |
200 | * / | |
201 | bo olean ftpF ileExistsI nDirectory (final Str ing filena me, final String tar getDirecto ry, boolea n throwExc eptions); | |
202 | ||
203 | /* * | |
204 | * Get the s ize of the specified file or n ull if doe s not exis t. | |
205 | * | |
206 | * @param ta rgetDirect ory | |
207 | * The dire ctory path to get as sociated f ile listin g. | |
208 | * @return L ong Size o f the file or null i f does not exist. | |
209 | * / | |
210 | Lo ng ftpGetF ileSizeInD irectory(f inal Strin g filename , final St ring targe tDirectory ); | |
211 | ||
212 | /* * | |
213 | * Open a st ream for t he specifi ed file. | |
214 | * | |
215 | * @param fi lename | |
216 | * The file to open. | |
217 | * @return S ftpStreamS ession bea n that con tains the session an d input st ream | |
218 | * o r null if error. | |
219 | * @throws E xception | |
220 | * / | |
221 | Sf tpStreamSe ssion open FileStream (final Str ing filena me, final String dir ectory) th rows Excep tion; | |
222 | ||
223 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.