Esempio n. 1
0
 PageInfo getPageInfo(ScriptContext context, String path) throws IOException {
   PageInfo info = null;
   if (pageInfoCache != null) info = this.pageInfoCache.get(path);
   if (info == null) {
     String file = prefix + path + suffix;
     String actualPath = FileHelper.findRecursive(file);
     String source = FileHelper.read(actualPath);
     Object object = context.evaluate(source, path);
     info = new PageInfo((BaseFunction) object, actualPath);
     if (pageInfoCache != null) pageInfoCache.put(path, info);
   }
   return info;
 }