Examples of GetRevision


Examples of net.sourceforge.jwbf.inyoka.actions.GetRevision

  }


  public SimpleArticle readData(String name, int properties)
      throws ActionException, ProcessException {
    GetRevision ac = new GetRevision(name);
    performAction(ac);
    return ac.getArticle();
  }
View Full Code Here

Examples of net.sourceforge.jwbf.mediawiki.actions.editing.GetRevision

   * {@inheritDoc}
   */
  public synchronized SimpleArticle readData(final String name, final int properties)
  throws ActionException, ProcessException {

    GetRevision ac;
    if (store != null) {
      if (store.containsKey(name)) {
        ac = new GetRevision(getVersion(), name, GetRevision.TIMESTAMP);
        performAction(ac);

        SimpleArticle storeSa = store.get(name);
        if (LOGGER.isDebugEnabled()) {
          LOGGER.debug("stored article (" + storeSa.getTitle() + ") revid: " + storeSa.getRevisionId());
        }
        SimpleArticle liveSa = ac.getArticle();
        if (LOGGER.isDebugEnabled()) {
          LOGGER.debug("live article revid: " + liveSa.getRevisionId());
        }
        if (liveSa.getRevisionId().equals(storeSa.getRevisionId())) {

          return store.get(name);
        }
      }

      ac = new GetRevision(getVersion(), name, properties);

      performAction(ac);
      LOGGER.debug("update cache (put)");
      store.put(ac.getArticle());

    } else {
      ac = new GetRevision(getVersion(), name, properties);

      performAction(ac);
    }
    return ac.getArticle();

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.