当前位置: 首页>>代码示例>>Java>>正文


Java Filter类代码示例

本文整理汇总了Java中org.jboss.shrinkwrap.api.Filter的典型用法代码示例。如果您正苦于以下问题:Java Filter类的具体用法?Java Filter怎么用?Java Filter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Filter类属于org.jboss.shrinkwrap.api包,在下文中一共展示了Filter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createDeployments

import org.jboss.shrinkwrap.api.Filter; //导入依赖的package包/类
@Deployment(testable = false)
public static WebArchive createDeployments() {
   WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxws-jbws2278.war");
      archive
         .addManifest()
         .addPackages(false, new Filter<ArchivePath> () {
            @Override
            public boolean include(ArchivePath path)
            {
               return !path.get().contains("TestCase");
            }}, "org.jboss.test.ws.jaxws.jbws2278")
         .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/jbws2278/WEB-INF/jboss-web.xml"), "jboss-web.xml")
         .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/jbws2278/WEB-INF/wsdl/Test.wsdl"), "wsdl/Test.wsdl")
         .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/jbws2278/WEB-INF/web.xml"));
   return archive;
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:17,代码来源:JBWS2278TestCase.java

示例2: createAuxiliaryArchive

import org.jboss.shrinkwrap.api.Filter; //导入依赖的package包/类
@Override
public Archive<?> createAuxiliaryArchive() {
	Collection<JavaArchive> archives = new ArrayList<>();
	archives.add(ShrinkWrap.createFromZipFile(JavaArchive.class, new File(
			"../lib/bdd/jbehave-core-3.8-SNAPSHOT.jar")));
	archives.add(ShrinkWrap.createFromZipFile(JavaArchive.class, new File("../lib/bdd/xstream-1.4.4.jar")));
	archives.add(ShrinkWrap.createFromZipFile(JavaArchive.class, new File("../lib/bdd/paranamer-2.4.jar")));
	archives.add(ShrinkWrap.createFromZipFile(JavaArchive.class, new File(
			"../lib/javassist/javassist-3.15.0-GA.jar")));
	archives.add(ShrinkWrap.createFromZipFile(JavaArchive.class, new File("../lib/bdd/freemarker-2.3.19.jar")));
	archives.add(ShrinkWrap.createFromZipFile(JavaArchive.class, new File("../lib/bdd/plexus-utils-3.0.10.jar")));
	archives.add(ShrinkWrap.createFromZipFile(JavaArchive.class,
			new File("../lib/bdd/hamcrest-integration-1.1.jar")));
	archives.add(ShrinkWrap.createFromZipFile(JavaArchive.class, new File("../lib/bdd/hamcrest-core-1.1.jar")));
	archives.add(ShrinkWrap.createFromZipFile(JavaArchive.class, new File("../lib/bdd/xpp3_min-1.1.4c.jar")));

	JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "arquillian-jbehave.jar");
	Filter<ArchivePath> filter = Filters.exclude("/META-INF.*");
	for (Archive<JavaArchive> element : archives) {
		archive.merge(element, filter);
	}
	
	return archive;
}
 
开发者ID:andreiserea,项目名称:arquillian-jbehave,代码行数:25,代码来源:JBehaveCoreDeploymentAppender.java

示例3: findResources

import org.jboss.shrinkwrap.api.Filter; //导入依赖的package包/类
private Collection<Resource> findResources(final String path, final String suffix) {
    final ClassLoader loader = Thread.currentThread().getContextClassLoader();
    final Collection<Resource> resources = new ArrayList<Resource>();
    if (SWClassLoader.class.isInstance(loader)) {
        final Collection<Archive<?>> archives = SWClassLoader.class.cast(loader).getArchives();
        final ClassLoader parent = loader.getParent();
        for (final Archive<?> archive : archives) {
            final Map<ArchivePath, Node> content = archive.getContent(new Filter<ArchivePath>() {
                @Override
                public boolean include(final ArchivePath object) {
                    final String currentPath = classloaderPath(object);

                    return !(parent != null && parent.getResource(currentPath) != null)
                            && currentPath.startsWith('/' + path) && currentPath.endsWith(suffix);

                }
            });

            for (final Map.Entry<ArchivePath, Node> entry : content.entrySet()) {
                resources.add(new SWResource(entry.getKey(), entry.getValue()));
            }
        }
    }
    return resources;
}
 
开发者ID:apache,项目名称:tomee,代码行数:26,代码来源:ArchiveResourceIteratorFactory.java

示例4: createDeployment

import org.jboss.shrinkwrap.api.Filter; //导入依赖的package包/类
@Deployment(testable = false)
public static WebArchive createDeployment() {
   WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxws-cxf-jbws3516.war");
   archive.setManifest(new StringAsset("Manifest-Version: 1.0\n"
               + "Dependencies: org.apache.cxf.impl\n"))
         .addPackages(false, new Filter<ArchivePath>() {
            @Override
            public boolean include(ArchivePath object)
            {
               return !object.get().contains("TestCase");
            }}, "org.jboss.test.ws.jaxws.cxf.jbws3516")
         .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/jbws3516/WEB-INF/wsdl/hello_world.wsdl"), "wsdl/hello_world.wsdl")
         .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/jbws3516/WEB-INF/web.xml"));
   return archive;
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:16,代码来源:JBWS3516TestCase.java

示例5: createDeployments

import org.jboss.shrinkwrap.api.Filter; //导入依赖的package包/类
@Deployment(testable = false)
public static WebArchive createDeployments() {
   WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxws-calendar.war");
      archive
         .addManifest()
         .addPackages(false, new Filter<ArchivePath>() {
            @Override
            public boolean include(ArchivePath path)
            {
               return !path.get().contains("TestCase");
            }
         }, "org.jboss.test.ws.jaxws.calendar");
   return archive;
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:15,代码来源:CalendarTestCase.java

示例6: createDeployments

import org.jboss.shrinkwrap.api.Filter; //导入依赖的package包/类
@Deployment(testable = false)
public static WebArchive createDeployments() {
   WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxws-date.war");
      archive
         .addManifest()
         .addPackages(false, new Filter<ArchivePath>() {
            @Override
            public boolean include(ArchivePath path)
            {
               return !path.get().contains("TestCase");
            }
         }, "org.jboss.test.ws.jaxws.date");
   return archive;
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:15,代码来源:DateTestCase.java

示例7: createDeployments

import org.jboss.shrinkwrap.api.Filter; //导入依赖的package包/类
@Deployment(testable = false)
public static WebArchive createDeployments() {
   WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxws-jbws3552.war");
      archive
         .addManifest()
         .addPackages(false, new Filter<ArchivePath>() {
            @Override
            public boolean include(ArchivePath path)
            {
               return !path.get().contains("TestCase");
            }}, "org.jboss.test.ws.jaxws.jbws3552");
   return archive;
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:14,代码来源:JBWS3552TestCase.java

示例8: createDeployments

import org.jboss.shrinkwrap.api.Filter; //导入依赖的package包/类
@Deployment(testable = false)
public static WebArchive createDeployments() {
   WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxws-complex.war");
      archive
         .addManifest()
         .addPackages(false, new Filter<ArchivePath>() {
            @Override
            public boolean include(ArchivePath path)
            {
               return !path.get().contains("TestCase");
            }
         }, "org.jboss.test.ws.jaxws.complex")
         .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/complex/WEB-INF/web.xml"));
   return archive;
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:16,代码来源:ComplexTestCase.java

示例9: applyFilter

import org.jboss.shrinkwrap.api.Filter; //导入依赖的package包/类
private Filter<ArchivePath> applyFilter(
	WarPluginConfiguration warPluginConfiguration) {

	final List<String> filesToIncludes = Arrays.asList(
		includesFiles(
			warPluginConfiguration.getWarSourceDirectory(),
			warPluginConfiguration.getExcludes()));

	return new Filter<ArchivePath>() {

		@Override
		public boolean include(ArchivePath archivePath) {
			final String strFilePath = archivePath.get();

			if (filesToIncludes.contains(strFilePath)) {
				return true;
			}

			for (String fileToInclude : filesToIncludes) {
				if (fileToInclude.startsWith(strFilePath)) {
					return true;
				}
			}

			return false;
		}

	};
}
 
开发者ID:arquillian,项目名称:arquillian-extension-liferay,代码行数:30,代码来源:LiferayWarPackagingProcessor.java

示例10: createFilter

import org.jboss.shrinkwrap.api.Filter; //导入依赖的package包/类
@SuppressWarnings("unchecked")
protected Filter<ArchivePath> createFilter(WebArchive uber, WebArchive archive) throws Exception {
    if (filterClass != null) {
        return (Filter<ArchivePath>) MultiContext.newInstance(ScanStrategy.class.getClassLoader(), filterClass, new Object[]{uber, archive}, new Class[]{WebArchive.class, WebArchive.class});
    } else {
        return new WarningFilter(uber, archive);
    }
}
 
开发者ID:GoogleCloudPlatform,项目名称:appengine-tck,代码行数:9,代码来源:ScanMultiProvider.java

示例11: KnownResourcesFilter

import org.jboss.shrinkwrap.api.Filter; //导入依赖的package包/类
public KnownResourcesFilter(final File base, final String prefix, final Filter<ArchivePath> filter) {
    this.base = base;
    this.delegate = filter;

    if (prefix.startsWith("/")) {
        this.prefix = prefix.substring(1);
    } else {
        this.prefix = prefix;
    }
}
 
开发者ID:apache,项目名称:tomee,代码行数:11,代码来源:Mvn.java

示例12: createTestArchive

import org.jboss.shrinkwrap.api.Filter; //导入依赖的package包/类
@Deployment
public static Archive<?> createTestArchive() throws FileNotFoundException {
    JavaArchive testJar = ShrinkWrap.create(JavaArchive.class, "agorava-empireavenue.jar")
            .addPackages(true, new Filter<ArchivePath>() {
                @Override
                public boolean include(ArchivePath path) {
                    return !((path.get().contains("test") || path.get().contains("servlet") || path.get().contains
                            ("jsf")));
                }
            }, "org.agorava")
            .addAsResource("META-INF/services/javax.enterprise.inject.spi.Extension")
            .addAsResource("META-INF/services/org.apache.deltaspike.core.spi.config.ConfigSourceProvider")
            .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");

    JavaArchive[] libs = Maven.resolver()
            .loadPomFromFile("pom.xml")
            .resolve("org.apache.deltaspike.core:deltaspike-core-impl")
            .withTransitivity().as(JavaArchive.class);


    WebArchive ret = ShrinkWrap
            .create(WebArchive.class, "test.war")
            .addClasses(EmpireAvenueServiceProducer.class)
            .addAsLibraries(libs)
            .addAsLibraries(testJar)
            .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
            .addAsWebInfResource("agorava.properties");
    return ret;
}
 
开发者ID:jugchennai,项目名称:agorava-empireavenue,代码行数:30,代码来源:EmpireAvenueTestDeploy.java

示例13: getAsType

import org.jboss.shrinkwrap.api.Filter; //导入依赖的package包/类
@Override
public <X extends Archive<X>> Collection<X> getAsType(Class<X> type,
    Filter<ArchivePath> filter) {
    throw new UnsupportedOperationException("Operation not supported for Undertow Archive.");
}
 
开发者ID:arquillian,项目名称:arquillian-container-undertow,代码行数:6,代码来源:UndertowWebArchiveImpl.java

示例14: getContent

import org.jboss.shrinkwrap.api.Filter; //导入依赖的package包/类
@Override
public Map<ArchivePath, Node> getContent(Filter<ArchivePath> filter) {
    throw new UnsupportedOperationException("Operation not supported for Undertow Archive.");
}
 
开发者ID:arquillian,项目名称:arquillian-container-undertow,代码行数:5,代码来源:UndertowWebArchiveImpl.java

示例15: merge

import org.jboss.shrinkwrap.api.Filter; //导入依赖的package包/类
@Override
public WebArchive merge(Archive<?> source, Filter<ArchivePath> filter)
    throws IllegalArgumentException {
    throw new UnsupportedOperationException("Operation not supported for Undertow Archive.");
}
 
开发者ID:arquillian,项目名称:arquillian-container-undertow,代码行数:6,代码来源:UndertowWebArchiveImpl.java


注:本文中的org.jboss.shrinkwrap.api.Filter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。