Package com.google.code.apis.rest.client.Wadl

Examples of com.google.code.apis.rest.client.Wadl.RequestNode


    if (method.getRequest() != null) {
      treatRequest(method.getRequest());
    }
    else {
      // adding an empty request node is safe
      method.addRequest(new RequestNode(method, application));
      treatRequest(method.getRequest());
    }   
  }
View Full Code Here


    initWidget(containerPanel);
  }
 
  public static void listRequest(final MethodNode method, final TreeItem methodTreeItem) {
    Vector buttonTreeItems = WadlTreeRoot.removeChildrenXKeepButtons(methodTreeItem, WadlXml.requestNode);   
    RequestNode request = method.getRequest();
    if (request == null) {
      Button addRequestButton = new Button(GuiFactory.strings.addRequest());
      addRequestButton.addClickListener(new ClickListener() {
        public void onClick(Widget sender) {             
          method.addRequest(new RequestNode(method, method.getApplication()));         
          listRequest(method, methodTreeItem);         
        }
      });
      TreeItem addRequestTreeItem = new TreeItem(addRequestButton);
      addRequestTreeItem.setUserObject(WadlXml.requestNode);
      methodTreeItem.addItem(addRequestTreeItem);
      return;
    }
    RequestItem requestItem = new RequestItem(method, methodTreeItem);
    TreeItem requestTreeItem = new TreeItem(requestItem);
    requestTreeItem.setUserObject(WadlXml.requestNode);   
    methodTreeItem.addItem(requestTreeItem);
    methodTreeItem.setState(SettingsDialog.treeItemsAlwaysOpen);   
   
    // check whether the request came from an analyzed uri...
    String requestString = "";
    if (request.getApplication() != null) {
      requestString = request.getApplication().getAnalyzer().getRequestString();
    }       
    ParamItem.listParams(
        request,
        requestTreeItem,
        requestString);
View Full Code Here

          Vector allMethods = application.getAllMethods();
          Iterator allMethodsIterator = allMethods.iterator();
          while (allMethodsIterator.hasNext()) {
            MethodNode method = (MethodNode) allMethodsIterator.next();                   
            if (method.getRequest() != null) {             
              RequestNode request = method.getRequest();                       
              if (!request.getAllParams().isEmpty()) {               
                examineParams(request.getAllParams())
                return;
              }
            }
          }
        }
      }
    } 
    // do this every time
    Iterator allResourcesIterator = allResources.iterator();
    while(allResourcesIterator.hasNext()) {
      ResourceNode resource = (ResourceNode) allResourcesIterator.next();     
      if (!resource.getAllMethods().isEmpty()) {
        Vector allMethods = resource.getAllMethods();
        Iterator allMethodsIterator = allMethods.iterator();
        while(allMethodsIterator.hasNext()) {
          MethodNode method = (MethodNode) allMethodsIterator.next();         
          if (method.getRequest() != null) {
            RequestNode request = method.getRequest();                   
            if (!request.getAllParams().isEmpty()) {            
              examineParams(request.getAllParams());
              return;
            }
          }         
        }
      }   
View Full Code Here

TOP

Related Classes of com.google.code.apis.rest.client.Wadl.RequestNode

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.