Subversion Repositories XServices

Rev

Rev 177 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 177 Rev 185
Line 49... Line 49...
49
 
49
 
50
import net.brutex.xservices.security.DirectoryPermission;
50
import net.brutex.xservices.security.DirectoryPermission;
51
import net.brutex.xservices.types.FileInfoType;
51
import net.brutex.xservices.types.FileInfoType;
Line 52... Line 52...
52
import net.brutex.xservices.util.FileWalker;
52
import net.brutex.xservices.util.FileWalker;
-
 
53
 
53
 
54
import org.apache.commons.jcs.JCS;
-
 
55
import org.apache.commons.jcs.access.CacheAccess;
54
import org.apache.jcs.JCS;
56
import org.apache.commons.jcs.access.exception.CacheException;
55
import org.apache.jcs.access.exception.CacheException;
57
import org.apache.logging.log4j.LogManager;
56
import org.apache.log4j.Logger;
58
import org.apache.logging.log4j.Logger;
Line 57... Line 59...
57
import org.apache.shiro.SecurityUtils;
59
import org.apache.shiro.SecurityUtils;
58
import org.apache.shiro.authz.UnauthorizedException;
60
import org.apache.shiro.authz.UnauthorizedException;
Line 63... Line 65...
63
 * @author Brian Rosenberger, bru(at)brutex.de
65
 * @author Brian Rosenberger, bru(at)brutex.de
64
 */
66
 */
65
public class FileInfoImpl  implements FileInfo {
67
public class FileInfoImpl  implements FileInfo {
Line 66... Line 68...
66
	
68
	
Line 67... Line 69...
67
	
69
	
68
	Logger logger = Logger.getLogger(FileInfoImpl.class);
70
	Logger logger = LogManager.getLogger();
69
	
71
	
Line 86... Line 88...
86
 
88
 
87
    if ((!withDir) && (!withFiles)) withFiles = true;
89
    if ((!withDir) && (!withFiles)) withFiles = true;
88
    String cachekey = level + "||" + withFiles + "||" + withDir + "||" + search + "||" + dir;
90
    String cachekey = level + "||" + withFiles + "||" + withDir + "||" + search + "||" + dir;
89
    try {
91
    try {
90
      logger.debug(String.format("Hitting cache with cachekey '%s'", cachekey));
92
      logger.debug(String.format("Hitting cache with cachekey '%s'", cachekey));
Line 91... Line 93...
91
      JCS jcs = JCS.getInstance("FileCache");
93
      CacheAccess<Object, Object> jcs = JCS.getInstance("FileCache");
92
 
94
 
Line 93... Line 95...
93
      /*Try to retrieve the file list from the cache*/
95
      /*Try to retrieve the file list from the cache*/