Package org.dbwiki.data.resource

Examples of org.dbwiki.data.resource.PageIdentifier


          "FROM " +  _relName + DatabaseConstants.RelationPages + " " +
          "ORDER BY " + DatabaseConstants.RelPagesColName);
      ResultSet rs = pStmtSelectPages.executeQuery();
      while (rs.next()) {
        String title = rs.getString(DatabaseConstants.RelPagesColName);
        content.add(new WikiPageDescription(title, new PageIdentifier(URLEncoder.encode(title, "UTF-8"))));
      }
      rs.close();
      pStmtSelectPages.close();
      con.close();
      return content;
View Full Code Here


   * @throws org.dbwiki.exception.WikiException
   */
  public synchronized DatabaseWikiPage get(ResourceIdentifier identifier) throws org.dbwiki.exception.WikiException {
    DatabaseWikiPage page = null;
   
    PageIdentifier p = (PageIdentifier)identifier;
       
    if (p.isRootIdentifier()) {
      return null;
    }
   
    String name = p.toQueryString();
    long timestamp = p.getTimestamp();
   
    try {
      Connection con = _connector.getConnection();
     
      PreparedStatement pStmtSelectPage = null;
View Full Code Here

          this.updateConfigurationFile(request);
          isGetRequest = !request.isRootRequest();
          isIndexRequest = !isGetRequest;
        } else {
          wiki().update(
              new PageIdentifier(request.parameters()
                  .get(RequestParameter.ActionValuePageID)
                  .value()), request.getWikiPage(),
              request.user());
          isGetRequest = true;
          isIndexRequest = false;
View Full Code Here

  public WikiPageRequest(DatabaseWiki wiki, RequestURL url) throws org.dbwiki.exception.WikiException {
    super(wiki, url);
   
    DatabaseIdentifier wikiIdentifier = new DatabaseIdentifier(wiki.identifier().databaseHomepage() + "/" + RequestURL.WikiPageRequestPrefix);
    if (url.size() == 0) {
      _wri = new WRI(wikiIdentifier, new PageIdentifier());
    } else if (url.size() == 1) {
      long timestamp = -1;
      RequestParameter timestampParameter =
        url.parameters().get(RequestParameter.ParameterVersion);
      if(timestampParameter != null) {
        timestamp = Long.parseLong(timestampParameter.value());
      }
      _wri = new WRI(wikiIdentifier, new PageIdentifier(url.get(0).encodedText(), timestamp));
    } else {
      throw new WikiNodeException(WikiNodeException.InvalidIdentifierFormat, url.toString());
    }
  }
View Full Code Here

TOP

Related Classes of org.dbwiki.data.resource.PageIdentifier

Copyright © 2018 www.massapicom. 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.