public void init() { if (!isInitialized) { if (getFileId() == null) throw new InvalidWikiRequestException("Missing filedId request parameter"); log.debug("initializing document history with file id: " + getFileId()); if (currentFile == null) { log.debug("loading current file: " + getFileId()); currentFile = wikiNodeDAO.findWikiDocument(getFileId()); if (currentFile == null) { throw new org.jboss.seam.framework.EntityNotFoundException( getFileId(), WikiDocument.class); } if (!Identity.instance().hasPermission("Node", "read", currentFile)) { throw new AuthorizationException("You don't have permission for this operation"); } } initializeHistoricalFileList(); } isInitialized = true; }