Package com.google.gwt.storage.client

Examples of com.google.gwt.storage.client.StorageMap$StorageEntryIterator


    keys.add(VERSION_KEY);
    keys.add(ACHIEVEMENTS_KEY);
    keys.add(ID_KEY);
    keys.add(TIMESTAMP_KEY);
   
    StorageMap storageMap=new StorageMap(storage);
    for(Map.Entry<String,String> entry:storageMap.entrySet()){
      if(!keys.contains(entry.getKey())){
        storage.removeItem(entry.getKey());
      }
    }
  }
View Full Code Here


            Log.warn("Local storage not supported");
            this.delegate = new HashMap<String,String>();
        }
        else
        {
            this.delegate = new StorageMap(storage);
        }

    }
View Full Code Here

    }
    return result;
  }
 
  private static StorageMap getStorageMap() {
    StorageMap storageMap = null;
    Storage html5Storage = Storage.getLocalStorageIfSupported();
    if (html5Storage != null) {
      storageMap = new StorageMap(html5Storage);
    }
    return storageMap;
  }
View Full Code Here

   *
   * @param key
   * @return
   */
  private static String getFromLocalStorage(String key) {
    StorageMap storageMap = getStorageMap();
    String domain = Helper.getCurrentHost();
    if (storageMap.containsKey(domain + "_" + key)) {
      return storageMap.get(domain + "_" + key);
    } else if (storageMap.containsKey(key)) {
      //for backwards compatability (i.e. the time when we didnt use the basedomain as part of the key)
      String value = storageMap.get(key);
      storeInLocalStorage(key, value); //settings it again stores it under correct key with domain name
      storageMap.remove(key);//remove old key
      return value;
    }
    return null;
  }
View Full Code Here

    public List<BootstrapServer> load()
    {
        List<BootstrapServer> servers = new ArrayList<BootstrapServer>();
        if (storage != null)
        {
            StorageMap storageMap = new StorageMap(storage);
            if (storageMap.containsKey(KEY))
            {
                String json = storageMap.get(KEY);
                if (json != null)
                {
                    JSONValue jsonValue = JSONParser.parseStrict(json);
                    if (jsonValue != null)
                    {
View Full Code Here

    public List<BootstrapServer> load()
    {
        List<BootstrapServer> servers = new ArrayList<BootstrapServer>();
        if (storage != null)
        {
            StorageMap storageMap = new StorageMap(storage);
            if (storageMap.containsKey(KEY))
            {
                String json = storageMap.get(KEY);
                if (json != null)
                {
                    JSONValue jsonValue = JSONParser.parseStrict(json);
                    if (jsonValue != null)
                    {
View Full Code Here

TOP

Related Classes of com.google.gwt.storage.client.StorageMap$StorageEntryIterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.