Examples of UriPattern


Examples of org.exoplatform.services.rest.uri.UriPattern

    *         because resource with the sane {@link UriPattern} already
    *         registered
    */
   public void addResource(final ObjectFactory<AbstractResourceDescriptor> resourceFactory)
   {
      UriPattern pattern = resourceFactory.getObjectModel().getUriPattern();
      synchronized (rootResources)
      {
         for (ObjectFactory<AbstractResourceDescriptor> resource : rootResources)
         {
            if (resource.getObjectModel().getUriPattern().equals(resourceFactory.getObjectModel().getUriPattern()))
View Full Code Here

Examples of org.exoplatform.services.rest.uri.UriPattern

    *         template not found
    */
   public ObjectFactory<AbstractResourceDescriptor> removeResource(String path)
   {
      ObjectFactory<AbstractResourceDescriptor> resource = null;
      UriPattern pattern = new UriPattern(path);
      synchronized (rootResources)
      {
         for (Iterator<ObjectFactory<AbstractResourceDescriptor>> iter = rootResources.iterator(); iter.hasNext()
            && resource == null;)
         {
            ObjectFactory<AbstractResourceDescriptor> next = iter.next();
            UriPattern resourcePattern = next.getObjectModel().getUriPattern();
            if (pattern.equals(resourcePattern))
            {
               iter.remove();
               resource = next;
            }
View Full Code Here

Examples of org.exoplatform.services.rest.uri.UriPattern

   {
      super(resourceClass, scope);
      if (path != null)
      {
         this.path = new PathValue(path.value());
         uriPattern = new UriPattern(path.value());
      }
      else
      {
         this.path = null;
         uriPattern = null;
View Full Code Here

Examples of org.exoplatform.services.rest.uri.UriPattern

   private AbstractResourceDescriptorImpl(Path path, Class<?> resourceClass, ComponentLifecycleScope scope)
   {
      if (path != null)
      {
         this.path = new PathValue(path.value());
         uriPattern = new UriPattern(path.value());
      }
      else
      {
         this.path = null;
         uriPattern = null;
View Full Code Here

Examples of org.exoplatform.services.rest.uri.UriPattern

      List<ObjectFactory<FilterDescriptor>> l = new ArrayList<ObjectFactory<FilterDescriptor>>();

      List<String> capturingValues = new ArrayList<String>();
      for (Map.Entry<UriPattern, List<ObjectFactory<FilterDescriptor>>> e : m.entrySet())
      {
         UriPattern uriPattern = e.getKey();

         if (uriPattern != null)
         {
            if (e.getKey().match(path, capturingValues))
            {
View Full Code Here

Examples of org.exoplatform.services.rest.uri.UriPattern

   {
      String path = resources.get(resourceId);
      if (path == null)
         return null;

      UriPattern pattern = new UriPattern(path);
      List<ObjectFactory<AbstractResourceDescriptor>> rootResources = binder.getResources();
      synchronized (rootResources)
      {
         for (ObjectFactory<AbstractResourceDescriptor> res : rootResources)
         {
View Full Code Here

Examples of org.exoplatform.services.rest.uri.UriPattern

      List<ObjectFactory<FilterDescriptor>> l = new ArrayList<ObjectFactory<FilterDescriptor>>();

      List<String> capturingValues = new ArrayList<String>();
      for (Map.Entry<UriPattern, List<ObjectFactory<FilterDescriptor>>> e : m.entrySet())
      {
         UriPattern uriPattern = e.getKey();

         if (uriPattern != null)
         {
            if (e.getKey().match(path, capturingValues))
            {
View Full Code Here

Examples of org.exoplatform.services.rest.uri.UriPattern

   {
      final Path p = filterClass.getAnnotation(Path.class);
      if (p != null)
      {
         this.path = new PathValue(p.value());
         this.uriPattern = new UriPattern(p.value());
      }
      else
      {
         this.path = null;
         this.uriPattern = null;
View Full Code Here

Examples of org.exoplatform.services.rest.uri.UriPattern

   {
      String path = resources.get(resourceId);
      if (path == null)
         return null;

      UriPattern pattern = new UriPattern(path);
      List<ObjectFactory<AbstractResourceDescriptor>> rootResources = binder.getResources();
      synchronized (rootResources)
      {
         for (ObjectFactory<AbstractResourceDescriptor> res : rootResources)
         {
View Full Code Here

Examples of org.exoplatform.services.rest.uri.UriPattern

    */
   SubResourceLocatorDescriptorImpl(PathValue path, Method method, List<MethodParameter> parameters,
      AbstractResourceDescriptor parentResource, MethodInvoker invoker)
   {
      this.path = path;
      this.uriPattern = new UriPattern(path.getPath());
      this.method = method;
      this.parameters = parameters;
      this.parentResource = parentResource;
      this.invoker = invoker;
   }
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.