Exemplo n.º 1
0
 public boolean deletePageVersion(String name, int version)
     throws PageNotFoundException, PageVersionNotFoundException, PermissionDeniedException {
   PageVersion cachedVersion = diskCache.load(server.getId(), name);
   if (cachedVersion != null && cachedVersion.getVersion() == version) {
     diskCache.remove(server.getId(), name);
   }
   return wikiClient.deletePageVersion(name, version);
 }
Exemplo n.º 2
0
 /**
  * @param pageVersion
  * @return
  * @throws ConcurrentEditException
  */
 public PageVersion commit(PageVersion pageVersion, boolean isMinorEdit)
     throws ConcurrentEditException, PageNotModifiedException {
   wikiClient.savePageVersion(
       pageVersion.getName(),
       pageVersion.getContent(),
       pageVersion.getComment(),
       pageVersion.getVersion(),
       isMinorEdit);
   diskCache.remove(pageVersion.getServerId(), pageVersion.getName());
   return wikiClient.getPageVersion(pageVersion.getName());
 }
Exemplo n.º 3
0
 public boolean deletePage(String name) throws PageNotFoundException, PermissionDeniedException {
   diskCache.remove(server.getId(), name);
   return wikiClient.deletePage(name);
 }
Exemplo n.º 4
0
 /**
  * @param pageVersion
  * @return
  */
 public PageVersion forceCommit(PageVersion pageVersion) throws PageNotModifiedException {
   wikiClient.savePageVersion(
       pageVersion.getName(), pageVersion.getContent(), pageVersion.getComment());
   diskCache.remove(pageVersion.getServerId(), pageVersion.getName());
   return wikiClient.getPageVersion(pageVersion.getName());
 }
Exemplo n.º 5
0
 /**
  * @param pageVersion
  * @return
  */
 public PageVersion unedit(PageVersion pageVersion) {
   diskCache.remove(pageVersion.getServerId(), pageVersion.getName());
   return wikiClient.getPageVersion(pageVersion.getName());
 }