Home | History | Annotate | Download | only in mail

Lines Matching refs:store

33  * Store is the access point for an email message store. It's location can be
34 * local or remote and no specific protocol is defined. Store is intended to
35 * loosely model in combination the JavaMail classes javax.mail.Store and
40 public abstract class Store {
43 * String constants for known store schemes.
55 * A global suggestion to Store implementors on how much of the body
59 private static final HashMap<String, Store> sStores = new HashMap<String, Store>();
65 public static Store newInstance(String uri, Context context, PersistentDataCallbacks callbacks)
67 throw new MessagingException("Store.newInstance: Unknown scheme in " + uri);
70 private static Store instantiateStore(String className, String uri, Context context,
76 // and invoke "newInstance" class method and instantiate store object.
85 throw new MessagingException("can not instantiate Store object for " + uri);
87 if (!(o instanceof Store)) {
91 return (Store) o;
95 * Look up descriptive information about a particular type of store.
121 "store".equals(xml.getName())) {
149 * Get an instance of a mail store. The URI is parsed as a standard URI and
165 * @param uri The URI of the store.
166 * @return an initialized store of the appropriate class
169 public synchronized static Store getInstance(String uri, Context context,
172 Store store = sStores.get(uri);
173 if (store == null) {
176 store = instantiateStore(info.mClassName, uri, context, callbacks);
179 if (store != null) {
180 sStores.put(uri, store);
184 store.setPersistentDataCallbacks(callbacks);
187 if (store == null) {
188 throw new MessagingException("Unable to locate an applicable Store for " + uri);
191 return store;
195 * Delete an instance of a mail store.
197 * The store should have been notified already by calling delete(), and the caller should
199 * @param storeUri the store to be removed
206 * Get class of SettingActivity for this Store class.
215 * Get class of sync'er for this Store class
224 * to be preloaded and provided to them. This method allows a remote store to signal this
227 * @return Return true if the remote store requires structure prefetch
236 * allows a given store to indicate which mode(s) it supports.
237 * @return true if the store requires an upload into "sent", false if this happens automatically
251 * Delete Store and its corresponding resources.
258 * If a Store intends to implement callbacks, it should be prepared to update them
261 * @param callbacks The updated provider of store callbacks
267 * Callback interface by which a Store can read and write persistent data.
273 * Provides a small place for Stores to store persistent data.
282 * @param defaultValue The data to return if no data was ever saved for this store
283 * @return the data saved by the Store, or null if never set.