Package com.zendesk.sdk.storage
Interface SdkStorage
-
public interface SdkStorage
Provides a way of accessing all of theSdkStorage.UserStorage
classes that the SDK uses.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface and Description static interface
SdkStorage.UserStorage
Defines behaviour for SDK storage of user data
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description void
clearUserData()
Clears user data from storage.java.util.Set<SdkStorage.UserStorage>
getUserStorage()
Gets an unmodifiable version of the UserStoragevoid
registerUserStorage(SdkStorage.UserStorage userStorage)
Registers additional user storage providers with SdkStorage.
-
-
-
Method Detail
-
registerUserStorage
void registerUserStorage(SdkStorage.UserStorage userStorage)
Registers additional user storage providers with SdkStorage.Additional storage providers should be registered if they are defined outside the scope of the ZendeskProviders project.
Duplicate storage providers will not be registered. If a duplicate type of storage, as determined by
firstClass.getClass().equals(secondClass.getClass)
, is provided then firstClass' storage will be cleared and it will be replaced in the set of UserStorage by the secondClass.- Parameters:
userStorage
- The storage to register
-
clearUserData
void clearUserData()
Clears user data from storage.This will only clear data that is associated with a user. Settings like
SdkSettings
are an example of something that won't be cleared butRequestStorage
will be cleared because that is from a user.
-
getUserStorage
java.util.Set<SdkStorage.UserStorage> getUserStorage()
Gets an unmodifiable version of the UserStorage- Returns:
- An unmodifiable version of the UserStorage
-
-