Package org.gatein.management.api

Examples of org.gatein.management.api.PathAddressIterator


   {
      for (final SimpleManagedResource resource : children.values())
      {
         if (resource.pathElement.matches(path.toString()))
         {
            PathAddressIterator pai = new PathAddressIterator(iterator.currentAddress());
            StringBuilder sb = new StringBuilder(path);
            while (pai.hasNext())
            {
               String next = pai.next();
               sb.append("/").append(next);
               if (resource.pathElement.matches(sb.toString()))
               {
                  AbstractManagedResource found = resource.findMatch(pai, new StringBuilder(next));
                  if (found == null)
                  {
                     path.append("/").append(next);
                     iterator.next();
                  }
                  else
                  {
                     break;
                  }
               }
               else
               {
                  break;
               }
            }

            iterator.originalAddress().addPathTemplateResolver(
               new PathTemplateResolverImpl(resource.pathElement, path.toString()));
           
            if (iterator.hasNext())
            {
               pai = new PathAddressIterator(iterator.currentAddress().copy());
               AbstractManagedResource subResource = resource.getSubResource(pai);
               if (subResource != null)
               {
                  PathAddress address = pai.originalAddress();
                  for (PathTemplateResolver resolver : address.getPathTemplateResolvers())
                  {
                     iterator.originalAddress().addPathTemplateResolver(resolver);
                  }
                  while(iterator.hasNext()) iterator.next();
View Full Code Here


   {
      for (final SimpleManagedResource resource : children.values())
      {
         if (resource.pathElement.matches(path.toString()))
         {
            PathAddressIterator pai = new PathAddressIterator(iterator.currentAddress());
            StringBuilder sb = new StringBuilder(path);
            while (pai.hasNext())
            {
               String next = pai.next();
               sb.append("/").append(next);
               if (resource.pathElement.matches(sb.toString()))
               {
                  AbstractManagedResource found = resource.findMatch(pai, new StringBuilder(next));
                  if (found == null)
                  {
                     path.append("/").append(next);
                     iterator.next();
                  }
                  else
                  {
                     break;
                  }
               }
               else
               {
                  break;
               }
            }

            iterator.originalAddress().addPathTemplateResolver(
               new PathTemplateResolverImpl(resource.pathElement, path.toString()));
           
            if (iterator.hasNext())
            {
               pai = new PathAddressIterator(iterator.currentAddress().copy());
               AbstractManagedResource subResource = resource.getSubResource(pai);
               if (subResource != null)
               {
                  PathAddress address = pai.originalAddress();
                  for (PathTemplateResolver resolver : address.getPathTemplateResolvers())
                  {
                     iterator.originalAddress().addPathTemplateResolver(resolver);
                  }
                  while(iterator.hasNext()) iterator.next();
View Full Code Here

TOP

Related Classes of org.gatein.management.api.PathAddressIterator

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.