Package org.jboss.deployers.spi.deployer.matchers

Examples of org.jboss.deployers.spi.deployer.matchers.NameIgnoreMechanism


    * @param file the file
    * @return true if we should ignore the file, false otherwise
    */
   protected boolean ignoreFile(final VFSDeploymentUnit unit, final VirtualFile file)
   {
      NameIgnoreMechanism mechanism = getNameIgnoreMechanism();
      if (mechanism != null)
      {
         LazyPath path = new LazyPath()
         {
            public String buildPath()
            {
               try
               {
                  VirtualFile root = unit.getRoot();
                  return file.getPathNameRelativeTo(root);
               }
               catch (IllegalArgumentException e)
               {
                  // most probably alt-dd file, let's take its full path
                  return file.getPathName();
               }
            }
         };
         return mechanism.ignorePath(unit, path);
      }
      return false;
   }
View Full Code Here


    * @return delegate NIM or null if not found or cyclic
    */
   protected NameIgnoreMechanism getDelegate(DeploymentUnit unit)
   {
      DeploymentUnit adjustedUnit = adjustDeploymentUnit(unit);
      NameIgnoreMechanism delegate = adjustedUnit.getAttachment(NameIgnoreMechanism.class);
      if (delegate == this && reportCycle)
         throw new IllegalArgumentException("Cyclic invocation: " + this);

      return delegate != this ? delegate : null;
   }
View Full Code Here

      return delegate != this ? delegate : null;
   }

   public boolean ignoreName(DeploymentUnit unit, String name)
   {
      NameIgnoreMechanism delegate = getDelegate(unit);
      return delegate != null && delegate.ignoreName(unit, name);
   }
View Full Code Here

      return delegate != null && delegate.ignoreName(unit, name);
   }

   public boolean ignorePath(DeploymentUnit unit, String path)
   {
      NameIgnoreMechanism delegate = getDelegate(unit);
      return delegate != null && delegate.ignorePath(unit, path);
   }
View Full Code Here

      return delegate != null && delegate.ignorePath(unit, path);
   }

   public boolean ignorePath(DeploymentUnit unit, LazyPath path)
   {
      NameIgnoreMechanism delegate = getDelegate(unit);
      return delegate != null && delegate.ignorePath(unit, path);
   }
View Full Code Here

    * @param name the name
    * @return true if we should ignore the name, false otherwise
    */
   protected boolean ignoreName(DeploymentUnit unit, String name)
   {
      NameIgnoreMechanism mechanism = unit.getAttachment(NameIgnoreMechanism.class);
      return mechanism != null && mechanism.ignore(unit, name);
   }
View Full Code Here

    * @param file the file
    * @return true if we should ignore the file, false otherwise
    */
   protected boolean ignoreFile(final VFSDeploymentUnit unit, final VirtualFile file)
   {
      NameIgnoreMechanism mechanism = getNameIgnoreMechanism();
      if (mechanism != null)
      {
         LazyPath path = new LazyPath()
         {
            public String buildPath()
            {
               VirtualFile root = unit.getRoot();
               return file.getPathNameRelativeTo(root);
            }
         };
         return mechanism.ignorePath(unit, path);
      }
      return false;
   }
View Full Code Here

    * @param file the file
    * @return true if we should ignore the file, false otherwise
    */
   protected boolean ignoreFile(VFSDeploymentUnit unit, VirtualFile file)
   {
      NameIgnoreMechanism mechanism = unit.getAttachment(NameIgnoreMechanism.class);
      if (mechanism != null)
      {
         VirtualFile root = unit.getRoot();
         String path = AbstractStructureDeployer.getRelativePath(root, file);
         return mechanism.ignorePath(unit, path);
      }
      return false;
   }
View Full Code Here

    * @param name the name
    * @return true if we should ignore the name, false otherwise
    */
   protected boolean ignoreName(DeploymentUnit unit, String name)
   {
      NameIgnoreMechanism mechanism = unit.getAttachment(NameIgnoreMechanism.class);
      return mechanism != null && mechanism.ignoreName(unit, name);
   }
View Full Code Here

TOP

Related Classes of org.jboss.deployers.spi.deployer.matchers.NameIgnoreMechanism

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.