Package com.dotmarketing.cache

Source Code of com.dotmarketing.cache.FolderCache

package com.dotmarketing.cache;

import com.dotmarketing.beans.Host;
import com.dotmarketing.beans.Identifier;
import com.dotmarketing.business.Cachable;
import com.dotmarketing.business.CacheLocator;
import com.dotmarketing.business.DotCacheAdministrator;
import com.dotmarketing.portlets.folders.model.Folder;

/**
* @author David
*/
public abstract class FolderCache implements Cachable {
   
    public abstract void addFolder(Folder f, Identifier id);
   

    public abstract Folder getFolder(String inode);
   

    public abstract Folder getFolderByPathAndHost(String path, Host host);

    public abstract void removeFolder(Folder f, Identifier id);

    public  void clearCache(){
    DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
      //clear the cache
      cache.flushGroup(getPrimaryGroup());
  }
  public  String[] getGroups() {
      String[] groups = {getPrimaryGroup()};
      return groups;
    }
   
    public  String getPrimaryGroup() {
      return "FolderCache";
    }
}
TOP

Related Classes of com.dotmarketing.cache.FolderCache

TOP
Copyright © 2018 www.massapi.com. 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.