Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(168)

Issue 38140043: FSA Refactor FsAdaptor for future MockFileDelegate testability. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 11 months ago by Brett
Modified:
12 years, 10 months ago
Reviewers:
ejona, mifern, pjo
CC:
connector-cr_google.com
Visibility:
Public.

Description

FSA Refactor FsAdaptor for future MockFileDelegate testability. This removes all direct file and directory manipulation from FsAdaptor, moving it into the FileDelegate. All access to files and directories from FsAdaptor are now done via the delegate. A new NioFileDelegate was added, performing most direct file and directory access using NIO Paths and Files classes. WindowsFileDelegate extends NioFileDelegate, adding ACL and Monitor support, I moved the only general purpose function, getDocId(), into NioFileDelegate.

Patch Set 1 #

Total comments: 15

Patch Set 2 : Eric's feedback #

Total comments: 9

Patch Set 3 : Make NioFileDelegate abstract. Drop unused methods. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+183 lines, -49 lines) Patch
M src/com/google/enterprise/adaptor/fs/FileDelegate.java View 1 2 1 chunk +65 lines, -0 lines 0 comments Download
M src/com/google/enterprise/adaptor/fs/FsAdaptor.java View 1 2 9 chunks +21 lines, -39 lines 0 comments Download
A src/com/google/enterprise/adaptor/fs/NioFileDelegate.java View 1 2 1 chunk +92 lines, -0 lines 1 comment Download
M src/com/google/enterprise/adaptor/fs/WindowsFileDelegate.java View 1 2 3 chunks +5 lines, -10 lines 1 comment Download

Messages

Total messages: 10
Brett
12 years, 11 months ago (2013-12-06 01:54:29 UTC) #1
ejona
https://codereview.appspot.com/38140043/diff/1/src/com/google/enterprise/adaptor/fs/FileDelegate.java File src/com/google/enterprise/adaptor/fs/FileDelegate.java (right): https://codereview.appspot.com/38140043/diff/1/src/com/google/enterprise/adaptor/fs/FileDelegate.java#newcode54 src/com/google/enterprise/adaptor/fs/FileDelegate.java:54: boolean isHidden(Path doc) throws IOException; What is this and ...
12 years, 11 months ago (2013-12-06 05:29:37 UTC) #2
ejona
https://codereview.appspot.com/38140043/diff/1/src/com/google/enterprise/adaptor/fs/NioFileDelegate.java File src/com/google/enterprise/adaptor/fs/NioFileDelegate.java (right): https://codereview.appspot.com/38140043/diff/1/src/com/google/enterprise/adaptor/fs/NioFileDelegate.java#newcode102 src/com/google/enterprise/adaptor/fs/NioFileDelegate.java:102: public DocId newDocId(Path doc) throws IOException { newDocId() (and ...
12 years, 11 months ago (2013-12-06 06:59:38 UTC) #3
Brett
https://codereview.appspot.com/38140043/diff/1/src/com/google/enterprise/adaptor/fs/FileDelegate.java File src/com/google/enterprise/adaptor/fs/FileDelegate.java (right): https://codereview.appspot.com/38140043/diff/1/src/com/google/enterprise/adaptor/fs/FileDelegate.java#newcode54 src/com/google/enterprise/adaptor/fs/FileDelegate.java:54: boolean isHidden(Path doc) throws IOException; On 2013/12/06 05:29:37, ejona ...
12 years, 11 months ago (2013-12-06 17:51:45 UTC) #4
Brett
Eric's feedback
12 years, 11 months ago (2013-12-06 18:06:24 UTC) #5
ejona
Sending what responses I have. Normally I'd read over them again and such stuff, but ...
12 years, 11 months ago (2013-12-07 02:07:11 UTC) #6
mifern
I think we should make NioFileDelegate abstract and avoid implementing stubs that throw not implemented ...
12 years, 11 months ago (2013-12-07 02:40:33 UTC) #7
Brett
Make NioFileDelegate abstract. Drop unused methods.
12 years, 10 months ago (2013-12-10 22:29:41 UTC) #8
ejona
LGTM, assuming NioFileDelegate.getDfsUncActiveStorageUnc() is removed. https://codereview.appspot.com/38140043/diff/40001/src/com/google/enterprise/adaptor/fs/NioFileDelegate.java File src/com/google/enterprise/adaptor/fs/NioFileDelegate.java (right): https://codereview.appspot.com/38140043/diff/40001/src/com/google/enterprise/adaptor/fs/NioFileDelegate.java#newcode79 src/com/google/enterprise/adaptor/fs/NioFileDelegate.java:79: public Path getDfsUncActiveStorageUnc(Path doc) ...
12 years, 10 months ago (2013-12-11 01:50:40 UTC) #9
Brett
12 years, 10 months ago (2013-12-18 19:08:21 UTC) #10
Committed 11 December 2013 to File System Adaptor
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b