Package org.exoplatform.services.rest.resource

Examples of org.exoplatform.services.rest.resource.SubResourceLocatorMap


         }
      }

      this.resourceMethods = new ResourceMethodMap<ResourceMethodDescriptor>();
      this.subResourceMethods = new SubResourceMethodMap();
      this.subResourceLocators = new SubResourceLocatorMap();
      processMethods();
   }
View Full Code Here


      List<String> parameterValues = context.getParameterValues();
      int len = parameterValues.size();
      // resource method or sub-resource method or sub-resource locator
      ResourceMethodMap<ResourceMethodDescriptor> rmm = resourceFactory.getObjectModel().getResourceMethods();
      SubResourceMethodMap srmm = resourceFactory.getObjectModel().getSubResourceMethods();
      SubResourceLocatorMap srlm = resourceFactory.getObjectModel().getSubResourceLocators();
      if ((parameterValues.get(len - 1) == null || "/".equals(parameterValues.get(len - 1))) && rmm.size() > 0)
      {
         // resource method, then process HTTP method and consume/produce media types
         List<ResourceMethodDescriptor> methods = new ArrayList<ResourceMethodDescriptor>();
         boolean match = processResourceMethod(rmm, request, response, methods);
View Full Code Here

         }
      }

      this.resourceMethods = new ResourceMethodMap<ResourceMethodDescriptor>();
      this.subResourceMethods = new SubResourceMethodMap();
      this.subResourceLocators = new SubResourceLocatorMap();
      processMethods();
   }
View Full Code Here

      // resource method or sub-resource method or sub-resource locator

      ResourceMethodMap<ResourceMethodDescriptor> rmm = resourceFactory.getObjectModel().getResourceMethods();
      SubResourceMethodMap srmm = resourceFactory.getObjectModel().getSubResourceMethods();
      SubResourceLocatorMap srlm = resourceFactory.getObjectModel().getSubResourceLocators();
      if ((parameterValues.get(len - 1) == null || "/".equals(parameterValues.get(len - 1))) && rmm.size() > 0)
      {
         // resource method, then process HTTP method and consume/produce media
         // types
View Full Code Here

      this.invokerFactory = invokerFactory;

      this.resourceMethods = new ResourceMethodMap<ResourceMethodDescriptor>();
      this.subResourceMethods = new SubResourceMethodMap();
      this.subResourceLocators = new SubResourceLocatorMap();
      processMethods();
   }
View Full Code Here

      // resource method or sub-resource method or sub-resource locator

      ResourceMethodMap<ResourceMethodDescriptor> rmm = resourceFactory.getObjectModel().getResourceMethods();
      SubResourceMethodMap srmm = resourceFactory.getObjectModel().getSubResourceMethods();
      SubResourceLocatorMap srlm = resourceFactory.getObjectModel().getSubResourceLocators();
      if ((parameterValues.get(len - 1) == null || "/".equals(parameterValues.get(len - 1))) && rmm.size() > 0)
      {
         // resource method, then process HTTP method and consume/produce media
         // types
View Full Code Here

   }

   public void testSubResourceLocatorSorting()
   {
      AbstractResourceDescriptor resource = new AbstractResourceDescriptorImpl(SampleResource3.class);
      SubResourceLocatorMap locs = resource.getSubResourceLocators();
      Collection<UriPattern> uris = locs.keySet();
      Iterator<UriPattern> i = uris.iterator();
      // NOTE template will be normalized, first slash added
      assertEquals("/b/c/d", i.next().getTemplate());
      assertEquals("/b/c/z", i.next().getTemplate());
      assertEquals("/b/c", i.next().getTemplate());
      assertEquals("/b/{c}", i.next().getTemplate());
      assertEquals("/b", i.next().getTemplate());
      Iterator<SubResourceLocatorDescriptor> i2 = locs.values().iterator();
      assertEquals("m3", i2.next().getMethod().getName());
      assertEquals("m1", i2.next().getMethod().getName());
      assertEquals("m4", i2.next().getMethod().getName());
      assertEquals("m2", i2.next().getMethod().getName());
      assertEquals("m0", i2.next().getMethod().getName());
View Full Code Here

TOP

Related Classes of org.exoplatform.services.rest.resource.SubResourceLocatorMap

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.