Package com.dotmarketing.business

Examples of com.dotmarketing.business.DotCacheAdministrator


      }
        return f;
  }

    public Language getLanguageById(String id) {
      DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
      Language f = null;
      try{
        f = (Language) cache.get(getPrimaryGroup() + id,getPrimaryGroup());
      }catch (DotCacheException e) {
      Logger.debug(LanguageCacheImpl.class,"Cache Entry not found", e);
      }
        return f;
    }
View Full Code Here


      }
        return f;
    }

    public Language getLanguageByCode(String languageCode, String countryCode) {
      DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
        String languageKey = languageCode + "-" + countryCode;
        Language l = null;
        try{
          l = (Language) cache.get(getPrimaryGroup() + languageKey,getPrimaryGroup());
        }catch (DotCacheException e) {
      Logger.debug(LanguageCacheImpl.class,"Cache Entry not found", e);
      }
       
        return l;
View Full Code Here

       
        return l;
    }

    public boolean hasLanguage (String id) {
      DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
        Language l = null;
      try{
        l = (Language) cache.get(getPrimaryGroup() + id,getPrimaryGroup());
      }catch (DotCacheException e) {
      Logger.debug(LanguageCacheImpl.class,"Cache Entry not found", e);
      }
        return l != null;
    }
View Full Code Here

      }
        return l != null;
    }
   
    public boolean hasLanguage (long id) {
      DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
        Language l = null;
      try{
        l = (Language) cache.get(getPrimaryGroup() + id,getPrimaryGroup());
      }catch (DotCacheException e) {
      Logger.debug(LanguageCacheImpl.class,"Cache Entry not found", e);
      }
        return l != null;
    }
View Full Code Here

      }
        return l != null;
    }
   
    public boolean hasLanguage (String languageCode, String countryCode) {
      DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
        String languageKey = languageCode + "-" + countryCode;
        Language l = null;
        try{
          l = (Language) cache.get(getPrimaryGroup() + languageKey,getPrimaryGroup());
        }catch (DotCacheException e) {
      Logger.debug(LanguageCacheImpl.class,"Cache Entry not found", e);
      }
        return l != null;
    }
View Full Code Here

      }
        return l != null;
    }
   
    public void removeLanguage(Language l){
      DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
        long id = l.getId();
        String idSt = String.valueOf(l.getId());
        String languageKey = l.getLanguageCode() + "-" + l.getCountryCode();
        cache.remove(getPrimaryGroup() + id,getPrimaryGroup());
        cache.remove(getPrimaryGroup() + idSt,getPrimaryGroup());
        cache.remove(getPrimaryGroup() + languageKey,getPrimaryGroup());
    }
View Full Code Here

        cache.remove(getPrimaryGroup() + idSt,getPrimaryGroup());
        cache.remove(getPrimaryGroup() + languageKey,getPrimaryGroup());
    }

    public void clearCache(){
    DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
      //clear the cache
      cache.flushGroup(getPrimaryGroup());
  }
View Full Code Here

      return "LanguageCacheImpl";
    }

  @Override
  public void setLanguageKeys(String langCode, String countryCode, List<LanguageKey> keys) {
      DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
        String languageKey = getPrimaryGroup() + "_Keys_" + (countryCode != null?langCode + "_" + countryCode:langCode);
        cache.put(languageKey, keys, getPrimaryGroup());
  }   
View Full Code Here

        cache.put(languageKey, keys, getPrimaryGroup());
  }   

  @Override
  public void removeLanguageKeys(String langCode, String countryCode) {
      DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
        String languageKey = getPrimaryGroup() + "_Keys_" + (countryCode != null?langCode + "_" + countryCode:langCode);
        cache.remove(languageKey, getPrimaryGroup());
  }   
View Full Code Here

        cache.remove(languageKey, getPrimaryGroup());
  }   

  @Override
  public List<LanguageKey> getLanguageKeys(String langCode, String countryCode) throws DotCacheException {
      DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
        String languageKey = getPrimaryGroup() + "_Keys_" + (countryCode != null?langCode + "_" + countryCode:langCode);
        return (List<LanguageKey>) cache.get(languageKey, getPrimaryGroup());
  }   
View Full Code Here

TOP

Related Classes of com.dotmarketing.business.DotCacheAdministrator

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.