public boolean isInIndex(File file) { return FileUtils.contains(_contentRoot, file); }
public boolean isInIndex(File file) { return FileUtils.contains(_contentRoot, file); }
@Override public void process(ContentRequest req, XMLWriter xml) throws BerliozException, IOException { // Initialise if (this.ancestor == null) { File root = PSMLConfig.getRoot(); this.ancestor = new File(root, "content"); } // Identify the folder File folder = new File(this.ancestor, req.getBerliozPath()); if (FileUtils.contains(this.ancestor, folder)) { LOGGER.info("Retrieving content folder information for {}", req.getBerliozPath()); toXML(folder, xml); } else { LOGGER.warn("Attempted to access unauthorizes private file {}", req.getBerliozPath()); } }
@Override public void process(ContentRequest req, XMLWriter xml) throws BerliozException, IOException { // Initialise if (this.ancestor == null) { File root = PSMLConfig.getRoot(); this.ancestor = new File(root, "content"); } // Identify the folder String path = req.getParameter("path"); if (path == null) { Errors.noParameter(req, xml, "path"); return; } File folder = new File(this.ancestor, path); if (FileUtils.contains(this.ancestor, folder)) { LOGGER.info("Retrieving content folder information for {}", path); toXML(folder, xml); } else { LOGGER.warn("Attempted to access unauthorizes private file {}", path); } }
@Override public void process(ContentRequest req, XMLWriter xml) throws BerliozException, IOException { // Initialise if (this.ancestor == null) { this.ancestor = PSMLConfig.getRoot(); } // Check that the path has been specified String path = req.getParameter("path"); if (path == null) { Errors.noParameter(req, xml, "path"); return; } // Grab the file PSMLFile folder = PSMLConfig.getFolder(path); LOGGER.debug("Retrieving overview for {}", folder); // If the PSML does not exist if (!folder.exists()) { req.setStatus(ContentStatus.NOT_FOUND); } if (FileUtils.contains(this.ancestor, folder.file())) { LOGGER.info("Retrieving content folder information for {}", req.getBerliozPath()); toXML(folder.file(), xml); } else { LOGGER.warn("Attempted to access unauthorizes private file {}", req.getBerliozPath()); } }