Skip to content

Commit 4b627c7

Browse files
committed
fixup! Add GoogleFetcher
Rename to GoogleDriveFetcher. This name is more appropriate as the files.get call is specific to Google Drive
1 parent 0823d12 commit 4b627c7

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

tika-pipes/tika-fetchers/tika-fetcher-google/src/main/java/org/apache/tika/pipes/fetchers/google/GoogleFetcher.java renamed to tika-pipes/tika-fetchers/tika-fetcher-google/src/main/java/org/apache/tika/pipes/fetchers/google/GoogleDriveFetcher.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,19 @@
4848
import org.apache.tika.metadata.Metadata;
4949
import org.apache.tika.parser.ParseContext;
5050
import org.apache.tika.pipes.fetcher.AbstractFetcher;
51-
import org.apache.tika.pipes.fetchers.google.config.GoogleFetcherConfig;
51+
import org.apache.tika.pipes.fetchers.google.config.GoogleDriveFetcherConfig;
5252

5353

5454
/**
55-
* Google Fetcher allows the fetching of files from a Google Drive, using a
55+
* GoogleDrive Fetcher allows the fetching of files from a Google Drive, using a
5656
* service account key.
5757
*
5858
* Fetch Keys are ${fileId},${subjectUser}, where the subject user is the
5959
* organizer of the file. This user is necessary as part of the key as the
6060
* service account must act on behalf of the user when querying for the file.
6161
*/
62-
public class GoogleFetcher extends AbstractFetcher implements Initializable {
63-
private static final Logger LOGGER = LoggerFactory.getLogger(GoogleFetcher.class);
62+
public class GoogleDriveFetcher extends AbstractFetcher implements Initializable {
63+
private static final Logger LOGGER = LoggerFactory.getLogger(GoogleDriveFetcher.class);
6464
private static final JsonFactory JSON_FACTORY = GsonFactory.getDefaultInstance();
6565

6666
private GoogleCredentials baseCredentials;
@@ -69,14 +69,14 @@ public class GoogleFetcher extends AbstractFetcher implements Initializable {
6969
private boolean spoolToTemp;
7070
private List<String> scopes;
7171

72-
private GoogleFetcherConfig config = new GoogleFetcherConfig();
72+
private GoogleDriveFetcherConfig config = new GoogleDriveFetcherConfig();
7373

74-
public GoogleFetcher() {
74+
public GoogleDriveFetcher() {
7575
scopes = new ArrayList<>();
7676
scopes.add(DriveScopes.DRIVE_READONLY);
7777
}
7878

79-
public GoogleFetcher(GoogleFetcherConfig config) {
79+
public GoogleDriveFetcher(GoogleDriveFetcherConfig config) {
8080
this.config = config;
8181
}
8282

tika-pipes/tika-fetchers/tika-fetcher-google/src/main/java/org/apache/tika/pipes/fetchers/google/config/GoogleFetcherConfig.java renamed to tika-pipes/tika-fetchers/tika-fetcher-google/src/main/java/org/apache/tika/pipes/fetchers/google/config/GoogleDriveFetcherConfig.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
import org.apache.tika.pipes.fetcher.config.AbstractConfig;
2323

24-
public class GoogleFetcherConfig extends AbstractConfig {
24+
public class GoogleDriveFetcherConfig extends AbstractConfig {
2525
private long[] throttleSeconds;
2626
private boolean spoolToTemp;
2727
protected String serviceAccountKeyBase64;
@@ -32,7 +32,7 @@ public boolean isSpoolToTemp() {
3232
return spoolToTemp;
3333
}
3434

35-
public GoogleFetcherConfig setSpoolToTemp(boolean spoolToTemp) {
35+
public GoogleDriveFetcherConfig setSpoolToTemp(boolean spoolToTemp) {
3636
this.spoolToTemp = spoolToTemp;
3737
return this;
3838
}
@@ -41,7 +41,7 @@ public long[] getThrottleSeconds() {
4141
return throttleSeconds;
4242
}
4343

44-
public GoogleFetcherConfig setThrottleSeconds(long[] throttleSeconds) {
44+
public GoogleDriveFetcherConfig setThrottleSeconds(long[] throttleSeconds) {
4545
this.throttleSeconds = throttleSeconds;
4646
return this;
4747
}
@@ -50,7 +50,7 @@ public String getServiceAccountKeyBase64() {
5050
return serviceAccountKeyBase64;
5151
}
5252

53-
public GoogleFetcherConfig setServiceAccountKeyBase64(String serviceAccountKeyBase64) {
53+
public GoogleDriveFetcherConfig setServiceAccountKeyBase64(String serviceAccountKeyBase64) {
5454
this.serviceAccountKeyBase64 = serviceAccountKeyBase64;
5555
return this;
5656
}
@@ -59,7 +59,7 @@ public String getSubjectUser() {
5959
return subjectUser;
6060
}
6161

62-
public GoogleFetcherConfig setSubjectUser(String subjectUser) {
62+
public GoogleDriveFetcherConfig setSubjectUser(String subjectUser) {
6363
this.subjectUser = subjectUser;
6464
return this;
6565
}
@@ -68,7 +68,7 @@ public List<String> getScopes() {
6868
return scopes;
6969
}
7070

71-
public GoogleFetcherConfig setScopes(List<String> scopes) {
71+
public GoogleDriveFetcherConfig setScopes(List<String> scopes) {
7272
this.scopes = scopes;
7373
return this;
7474
}

0 commit comments

Comments
 (0)