Package com.dotmarketing.business

Examples of com.dotmarketing.business.DotCacheAdministrator


  /**
   * Add into the cache the XmlTool Doc
   * @param doc XmlToolDoc
   */
  public static void addXmlToolDoc(XmlToolDoc doc){
    DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
    // we use the identifier uri for our mappings.
    String xmlPath = hashPath(doc.getXmlPath());
    cache.put(getPrimaryGroup() + xmlPath, doc, getPrimaryGroup());

  }
View Full Code Here


   * Get the XmlToolDoc by the xml path
   * @param XMLPath XML path
   * @return XmlToolDoc
   */
  public static XmlToolDoc getXmlToolDoc(String XMLPath) {
    DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
    XmlToolDoc doc = null;
    try{
      doc = (XmlToolDoc) cache.get(getPrimaryGroup() + hashPath(XMLPath), getPrimaryGroup());
    }catch (DotCacheException e) {
      Logger.debug(XmlToolCache.class,"Cache Entry not found", e);
    }

    if (doc != null) {
View Full Code Here

  /**
   * Remove from chache the specified XmlToolDoc
   * @param doc XmlToolDoc
   */
  public static void removeXmlToolDoc(XmlToolDoc doc){
    DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
    String xmlPath = hashPath(doc.getXmlPath());
    cache.remove(getPrimaryGroup() + xmlPath, getPrimaryGroup());
  }
View Full Code Here

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

  /**
   * Add into the cache the  XSL transformation Doc
   * @param doc XSLTranformationDoc
   */
  public static void addXSLTranformationDoc(XSLTranformationDoc doc){
    DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
    // we use the identifier uri for our mappings.
    String xmlPath = doc.getXmlPath();
    String xslPath = doc.getXslPath();
    cache.put(getPrimaryGroup() + xmlPath+"_"+xslPath, doc, getPrimaryGroup());

  }
View Full Code Here

   * @param XMLPath XML path
   * @param XSLPath XSL path
   * @return XSLTranformationDoc
   */
  public static XSLTranformationDoc getXSLTranformationDocByXMLPath(String XMLPath,String XSLPath) {
    DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
    XSLTranformationDoc doc = null;
    try{
      doc = (XSLTranformationDoc) cache.get(getPrimaryGroup() + XMLPath+"_"+XSLPath, getPrimaryGroup());
    }catch (DotCacheException e) {
      Logger.debug(XSLTransformationCache.class,"Cache Entry not found", e);
    }

    if (doc != null) {
View Full Code Here

  /**
   * Remove from chache the specified XSLTranformationDoc
   * @param xmlDoc
   */
  public static void removeXSLTranformationDoc(XSLTranformationDoc doc){
    DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
    String xmlPath = doc.getXmlPath();
    String xslPath = doc.getXslPath();
    cache.remove(getPrimaryGroup() + xmlPath+"_"+xslPath, getPrimaryGroup());
  }
View Full Code Here

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

* @author David
*/
public class LanguageCacheImpl extends LanguageCache {

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

        cache.put(getPrimaryGroup() + languageKey, l, getPrimaryGroup());
       
  }
   
    public Language getLanguageById(long 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

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.