Package br.com.caelum.vraptor.vraptor2

Examples of br.com.caelum.vraptor.vraptor2.ConfigException


    this.request = request;
    // ignores if the view should be displayed or not
    if (isAjax()) {
      this.outjecter = new JsonOutjecter();
    } else {
      this.outjecter = new DefaultOutjecter(request);
    }
  }
View Full Code Here


    this.request = request;
    // ignores if the view should be displayed or not
    if (isAjax()) {
      this.outjecter = new JsonOutjecter();
    } else {
      this.outjecter = new DefaultOutjecter(request);
    }
  }
View Full Code Here

    if (!isViewless && info.isAjax()) {
            if (!method.getMethod().isAnnotationPresent(Remotable.class)) {
                throw new InterceptionException("Unable to make an ajax result in a non-remotable method.");
            }
            int depth = method.getMethod().getAnnotation(Remotable.class).depth();
            JsonOutjecter outjecter = (JsonOutjecter) info.getOutjecter();
            CharSequence output = new JSONSerializer(depth).serialize(outjecter.contents());
            response.setCharacterEncoding(UTF8);
            response.setContentType("application/json");

            try {
                PrintWriter writer = response.getWriter();
View Full Code Here

  public DefaultComponentInfoProvider(HttpServletRequest request) {
    this.request = request;
    // ignores if the view should be displayed or not
    if (isAjax()) {
      this.outjecter = new JsonOutjecter();
    } else {
      this.outjecter = new DefaultOutjecter(request);
    }
  }
View Full Code Here

  public DefaultComponentInfoProvider(HttpServletRequest request) {
    this.request = request;
    // ignores if the view should be displayed or not
    if (isAjax()) {
      this.outjecter = new JsonOutjecter();
    } else {
      this.outjecter = new DefaultOutjecter(request);
    }
  }
View Full Code Here

    if (!isViewless && info.isAjax()) {
            if (!method.getMethod().isAnnotationPresent(Remotable.class)) {
                throw new InterceptionException("Unable to make an ajax result in a non-remotable method.");
            }
            int depth = method.getMethod().getAnnotation(Remotable.class).depth();
            JsonOutjecter outjecter = (JsonOutjecter) info.getOutjecter();
            CharSequence output = new JSONSerializer(depth).serialize(outjecter.contents());
            response.setCharacterEncoding(UTF8);
            response.setContentType("application/json");

            try {
                PrintWriter writer = response.getWriter();
View Full Code Here

    this.main = main;
    this.fallback = fallback;
  }

  public Enumeration<String> getKeys() {
    return new FallbackEnumeration(main.getKeys(), fallback.getKeys());
  }
View Full Code Here

     */
    public void setGenBootInfoTable(boolean genBootInfoTable) throws ConfigException {
        if (!genBootInfoTable || this.bootMediaType == ElToritoConfig.BOOT_MEDIA_TYPE_NO_EMU) {
            this.genBootInfoTable = genBootInfoTable;
        } else {
            throw new ConfigException(this, "Boot info table generation requires no-emulation image.");
        }
    }
View Full Code Here

     */
    public void setPlatformID(int platformID) throws ConfigException {
        if (platformID >= 0 && platformID <= 2) {
            this.platformID = platformID;
        } else {
            throw new ConfigException(this, "Invalid Platform ID: " + platformID);
        }
    }
View Full Code Here

     *
     * @throws ConfigException String too long
     */
    public void setIDString(String idString) throws ConfigException {
        if (idString.length() > 24) {
            throw new ConfigException(this, "The ID string may be no longer than 24 characters.");
        }
        this.idString = idString;
    }
View Full Code Here

TOP

Related Classes of br.com.caelum.vraptor.vraptor2.ConfigException

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.