FileDataStoreFactory
with StoredCredential
instead, optionally using migrateTo(FileDataStoreFactory)
or
migrateTo(DataStore)
to migrating an existing FileCredentialStore
.@Deprecated @Beta public class FileCredentialStore extends Object implements CredentialStore
Beta
Constructor and Description |
---|
FileCredentialStore(File file,
com.google.api.client.json.JsonFactory jsonFactory)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
delete(String userId,
Credential credential)
Deprecated.
|
protected boolean |
isSymbolicLink(File file)
Deprecated.
Returns whether the given file is a symbolic link.
|
boolean |
load(String userId,
Credential credential)
Deprecated.
|
void |
migrateTo(com.google.api.client.util.store.DataStore<StoredCredential> credentialDataStore)
Deprecated.
Migrates to the new format using
DataStore of StoredCredential . |
void |
migrateTo(com.google.api.client.util.store.FileDataStoreFactory dataStoreFactory)
Deprecated.
Migrates to the new
FileDataStoreFactory format. |
void |
store(String userId,
Credential credential)
Deprecated.
|
public FileCredentialStore(File file, com.google.api.client.json.JsonFactory jsonFactory) throws IOException
file
- File to store user credentialsjsonFactory
- JSON factory to serialize user credentialsIOException
protected boolean isSymbolicLink(File file) throws IOException
IOException
public void store(String userId, Credential credential) throws IOException
store
in interface CredentialStore
IOException
public void delete(String userId, Credential credential) throws IOException
delete
in interface CredentialStore
IOException
public boolean load(String userId, Credential credential)
load
in interface CredentialStore
public final void migrateTo(com.google.api.client.util.store.FileDataStoreFactory dataStoreFactory) throws IOException
FileDataStoreFactory
format.
Sample usage:
public static FileDataStore migrate(FileCredentialStore credentialStore, File dataDirectory) throws IOException { FileDataStore dataStore = new FileDataStore(dataDirectory); credentialStore.migrateTo(dataStore); return dataStore; }
dataStoreFactory
- file data store factoryIOException
public final void migrateTo(com.google.api.client.util.store.DataStore<StoredCredential> credentialDataStore) throws IOException
DataStore
of StoredCredential
.credentialDataStore
- credential data storeIOException
Copyright © 2011–2024 Google. All rights reserved.