Package org.dykman.dexter

Examples of org.dykman.dexter.DexteritySyntaxException


      }
      return out.toString();
    }
    catch (Exception e)
    {
      throw new DexteritySyntaxException(e);
    }
  }
View Full Code Here


  public void edit(String namespace, String name, String value)
  {
    if (!element.hasAttribute("id"))
    {
      throw new DexteritySyntaxException("ajax target must have an `id' attribute");
    }
    String id = element.getAttribute("id");
   
    String pre = getDexterAttribute(element, "pre");
    String post = getDexterAttribute(element, "post");
    String params = getDexterAttribute(element, "params");
    if(params != null)
    {
      element.setUserData(PARAMS, params,null);
    }

    boolean applyToChildren = false;
    String method;
   
    if(value.startsWith("#"))
    {
      applyToChildren = true;
      value = value.substring(1);
    }
   
    if(value.charAt(0) == '!')
    {
      method="post";
      value = value.substring(1);
    }
    else if(value.charAt(1) == '!')
    {
      switch(value.charAt(0))
      {
        case 'P' :
          method = "put";
        break;
        case 'H' :
          method = "head";
        break;
        case 'D' :
          method = "delete";
        break;
        case 'O' :
          method = "options";
        break;
        default :
            throw new DexteritySyntaxException("illegal method specifier");
      }
      value = value.substring(2);
    }
    else
    {
View Full Code Here

    }
    String dexterity = DexterityConstants.BASE_NAMESPACE;
   
    String[] args = splitArgs(value);
    if(args.length < 1) {
      throw new DexteritySyntaxException("too few arguments in " + name + " attribute");
    }

    if(args[0].startsWith("!")) {
      // make a strict and insert it previously
      args[0] = args[0].substring(1);
View Full Code Here

  public void beforeNode()
  {
    id = element.getAttribute("id");
    if (id == null)
    {
      throw new DexteritySyntaxException("a subdoc element must have an 'id' attribute");
    }

    String altDoc = null;
    if(value.indexOf(':') > -1)
    {
View Full Code Here

TOP

Related Classes of org.dykman.dexter.DexteritySyntaxException

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.