Examples of ResourceClass


Examples of org.jboss.resteasy.spi.metadata.ResourceClass

      Method get = MyResource.class.getMethod("get", String.class);
      Method put = MyResource.class.getMethod("put", String.class);
      Method setter = MyResource.class.getMethod("setHeaders", HttpHeaders.class);
      Field uriInfo = MyResource.class.getDeclaredField("uriInfo");

      ResourceClass resourceclass = ResourceBuilder.rootResource(MyResource.class)
              .method(get).get().path("test").produces("text/plain").param(0).queryParam("a").buildMethod()
              .field(uriInfo).context().buildField()
              .setter(setter).context().buildSetter()
              .buildClass();
      MyResource resource = new MyResource();
View Full Code Here

Examples of org.jwall.web.policy.abstraction.ResourceClass

            setText("<html><b>"+type.getName()+"</b><br>Regexp: <code>"+type.getRegexp()+"</code></html>");
            setIcon( Application.getIcon( type ) );
        }
       
        if( arg1.getType() == TreeNode.RESOURCE_CLASS ){
            ResourceClass rc = (ResourceClass) arg1;
            setText("<html>Class <b>" + rc.getName() + "</b></html>");
            setIcon( Application.getIcon( rc ) );
        }

        return this;
    }
View Full Code Here

Examples of org.jwall.web.policy.abstraction.ResourceClass

    Object o = super.getCellEditorValue();
    if (cancelled)
      return o;

    if (node.getType() == TreeNode.RESOURCE_CLASS) {
      ResourceClass rc = (ResourceClass) node;
      rc.setName(name.getText());

      return rc;
    }

    if (node.getType() == TreeNode.PARAMETER_TYPE) {
View Full Code Here

Examples of org.jwall.web.policy.abstraction.ResourceClass

  public void createUIComponents(TreeNode node) {
    log.debug("Creating ui components for {}", node.getClass());

    if (node.getType() == TreeNode.RESOURCE_CLASS) {

      ResourceClass rc = (ResourceClass) node;
      JLabel l1 = new JLabel("Resource Class: ");
      l1.setFont(f);
      l1.setAlignmentY(Component.CENTER_ALIGNMENT);
      p.add(l1);

      String v = rc.getName();
      name = new JTextField(v, v.length() + 2);
      name.setFont(f);
      name.addKeyListener(this);
      name.setAlignmentY(Component.CENTER_ALIGNMENT);
      p.add(name);
View Full Code Here

Examples of org.jwall.web.policy.abstraction.ResourceClass

      if (AbstractTreeAction.TREE_INSERT_RESOURCE_CLASS == e
          .getActionCommand()) {

        log.finest("Inserting new resource-class");
        ResourceClass rc = new ResourceClass("rc-0");
        node.add(rc);
        treeModel.getProfile().add(rc);
        treeModel.notify(node);

        if (node.getParent() != null)
View Full Code Here

Examples of org.restlet.ext.jaxrs.internal.wrappers.ResourceClass

        // 3. Identify the method that will handle the request:
        // (a)
        ResourceObject resObj = resObjAndRemPath.resourceObject;
        RemainingPath u = resObjAndRemPath.u;
        // (a) 1
        ResourceClass resourceClass = resObj.getResourceClass();
        Collection<ResourceMethod> resourceMethods = resourceClass
                .getMethodsForPath(u);
        if (resourceMethods.isEmpty())
            excHandler.resourceMethodNotFound();// NICE (resourceClass, u);
        // (a) 2: remove methods not support the given method
        boolean alsoGet = httpMethod.equals(Method.HEAD);
        removeNotSupportedHttpMethod(resourceMethods, httpMethod, alsoGet);
        if (resourceMethods.isEmpty()) {
            Set<Method> allowedMethods = resourceClass.getAllowedMethods(u);
            if (httpMethod.equals(Method.OPTIONS)) {
                callContext.getResponse().getAllowedMethods()
                        .addAll(allowedMethods);
                throw new RequestHandledException();
            }
View Full Code Here

Examples of org.restlet.ext.jaxrs.internal.wrappers.ResourceClass

    private ResObjAndRemPath obtainObject(
            RroRemPathAndMatchedPath rroRemPathAndMatchedPath)
            throws WebApplicationException, RequestHandledException {
        ResourceObject o = rroRemPathAndMatchedPath.rootResObj;
        RemainingPath u = rroRemPathAndMatchedPath.u;
        ResourceClass resClass = o.getResourceClass();
        CallContext callContext = tlContext.get();
        callContext.addForMatched(o.getJaxRsResourceObject(),
                rroRemPathAndMatchedPath.matchedUriPath);
        // Part 2
        for (;;) // (j)
        {
            // (a) If U is null or '/' go to step 3
            if (u.isEmptyOrSlash()) {
                return new ResObjAndRemPath(o, u);
            }
            // (b) Set C = class ofO,E = {}
            Collection<ResourceMethodOrLocator> eWithMethod = new ArrayList<ResourceMethodOrLocator>();
            // (c) and (d) Filter E: remove members do not match U or final
            // match not empty
            for (ResourceMethodOrLocator methodOrLocator : resClass
                    .getResourceMethodsAndLocators()) {
                PathRegExp pathRegExp = methodOrLocator.getPathRegExp();
                MatchingResult matchingResult = pathRegExp.match(u);
                if (matchingResult == null)
                    continue;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.