Package org.dbwiki.exception.web

Examples of org.dbwiki.exception.web.WikiRequestException


            return this.get(iWiki);
          }
        }
      }
    }
    throw new WikiRequestException(WikiRequestException.InvalidRequest, request.toString());
  }
View Full Code Here


      } else if (action.actionCancel()) {
        responseHandler = this.getHomepageResponseHandler(request);
      } else if (action.actionUpdate()) {
        responseHandler = this.getUpdateWikiResponseHandler(request);
      } else {
        throw new WikiRequestException(WikiRequestException.InvalidRequest, request.toString());
      }
    } else {
      throw new WikiRequestException(WikiRequestException.InvalidRequest, request.toString());
    }
   
    File template = null;

    //
View Full Code Here

      SchemaNode schema = null;
      if (parameter.hasValue()) {
        try {
          schema = _request.wiki().database().schema().get(Integer.parseInt(parameter.value()));
        } catch (NumberFormatException excpt) {
          throw new WikiRequestException(WikiRequestException.InvalidParameterValue, parameter.toString());
        }
      } else {
        schema = _request.wiki().database().schema().root();
      }
      body.paragraph(_layouter.get(schema).getName(), CSS.CSSHeadline);
View Full Code Here

      _nodeID = -1;
    } else if (url.size() == 1) {
      try {
        _nodeID = Integer.decode("0x" + url.get(0).decodedText());
      } catch (java.lang.NumberFormatException exception) {
        throw new WikiRequestException(WikiRequestException.InvalidUrl, url.toString());
      }
    } else {
      throw new WikiRequestException(WikiRequestException.InvalidUrl, url.toString());
    }
  }
View Full Code Here

      _nodeID = -1;
    } else if (url.size() == 1) {
      try {
        _nodeID = Integer.decode("0x" + url.get(0).decodedText());
      } catch (java.lang.NumberFormatException exception) {
        throw new WikiRequestException(WikiRequestException.InvalidUrl, url.toString());
      }
    } else {
      throw new WikiRequestException(WikiRequestException.InvalidUrl, url.toString());
    }
  }
View Full Code Here

 
  public ResourceIdentifier getIdentifierForParameterString(String parameterValue) throws org.dbwiki.exception.WikiException {
    try {
      return new NodeIdentifier(Integer.parseInt(parameterValue));
    } catch (java.lang.NumberFormatException exception) {
      throw new WikiRequestException(WikiRequestException.InvalidUrl, parameterValue);
    }
  }
View Full Code Here

      /* TODO: The version parameter may be missing in the source URL when copying from
       * an external source.
       */
      this.database().paste(request.wri().resourceIdentifier(), ioHandler.getPasteNode(), url, request.user());
    } else {
      throw new WikiRequestException(WikiRequestException.InvalidUrl, "(null)");
    }
  }
View Full Code Here

                            // used to revert.
        contentGenerator.put(
            DatabaseWikiContentGenerator.ContentContent,
            new SettingsListingPrinter(request));
      } else {
        throw new WikiRequestException(
            WikiRequestException.InvalidRequest, exchange.getRequestURI().toString());
      }
      page = HtmlTemplateDecorator.decorate(_template, contentGenerator);
    }
View Full Code Here

      contentGenerator.put(DatabaseWikiContentGenerator.ContentMenu,
          new PageMenuPrinter(request));
      contentGenerator.put(DatabaseWikiContentGenerator.ContentContent,
          new PageHistoryPrinter(request));
    } else {
      throw new WikiRequestException(WikiRequestException.InvalidRequest,
          exchange.getRequestURI().toASCIIString());
    }
    exchange.send(HtmlTemplateDecorator.decorate(_template, contentGenerator));
  }
View Full Code Here

      } else if (value.equals(RequestParameterAction.ActionInsert)) {
        return new RequestParameterActionInsert();
      } else if (value.equals(RequestParameterAction.ActionUpdate)) {
        return new RequestParameterActionUpdate();
      } else {
        throw new WikiRequestException(WikiRequestException.InvalidParameterValue, parameter.toString());
      }
    } else {
      throw new WikiRequestException(WikiRequestException.MissingParameterValue, parameter.toString());
    }
  }
View Full Code Here

TOP

Related Classes of org.dbwiki.exception.web.WikiRequestException

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.