Examples of exist()


Examples of jetbrick.template.resource.CompiledClassResource.exist()

    }

    @Override
    public Resource load(String name) {
        CompiledClassResource resource = new CompiledClassResource(name);
        return resource.exist() ? resource : null;
    }

    @Override
    public List<String> loadAll() {
        return Collections.emptyList();
View Full Code Here

Examples of org.apache.cocoon.components.search.components.AnalyzerManager.exist()

            // configure each index
            for (int i = 0; i < confs.length; i++) {
                String id = confs[i].getAttribute(ID_ATTRIBUTE);
                String analyzerid = confs[i].getAttribute(INDEX_DEFAULTANALZER_ATTRIBUTE);
                String directory = confs[i].getAttribute(INDEX_DIRECTORY_ATTRIBUTE);
                if (!analyzerManager.exist(analyzerid)) {
                    throw new ConfigurationException("Analyzer " + analyzerid + " no found");
                }

                Configuration[] fields = confs[i].getChild(STRUCTURE_ELEMENT)
                        .getChildren(FIELD_ELEMENT);
View Full Code Here

Examples of org.apache.cocoon.components.search.components.AnalyzerManager.exist()

            // configure each index
            for (int i = 0; i < confs.length; i++) {
                String id = confs[i].getAttribute(ID_ATTRIBUTE);
                String analyzerid = confs[i].getAttribute(INDEX_DEFAULTANALZER_ATTRIBUTE, null);
                if (analyzerid != null && !analyzerManager.exist(analyzerid)) {
                    throw new ConfigurationException("Analyzer " + analyzerid + " no found");
                }

                String directory = confs[i].getAttribute(INDEX_DIRECTORY_ATTRIBUTE);
View Full Code Here

Examples of org.ff4j.FF4j.exist()

    public void autoCreateFeatureEnableTest() {

        // Default : store = inMemory, load features from ff4j.xml file
        FF4j ff4j = new FF4j("ff4j.xml");
        ff4j.setAutocreate(true);
        assertFalse(ff4j.exist("autoCreatedFeature"));

        // Auto creation by testing its value
        assertFalse(ff4j.check("autoCreatedFeature"));

        // Assertion
View Full Code Here

Examples of org.ff4j.FF4j.exist()

        // Auto creation by testing its value
        assertFalse(ff4j.check("autoCreatedFeature"));

        // Assertion
        assertTrue(ff4j.exist("autoCreatedFeature"));
    }

    @Test
    public void workingWithFeature() {
View Full Code Here

Examples of org.ff4j.FF4j.exist()

        // Dynamically register new features
        ff4j.create("f1").enable("f1");

        // Assertions
        assertTrue(ff4j.exist("f1"));
        assertTrue(ff4j.check("f1"));
    }

    // enabling...
View Full Code Here

Examples of org.ff4j.FF4j.exist()

    @Test
    public void testEnableFeature() {
        FF4j ff4j = new FF4j();
        ff4j.autoCreate(true);
        ff4j.enable("newffff");
        Assert.assertTrue(ff4j.exist("newffff"));
        Assert.assertTrue(ff4j.check("newffff"));
    }

    @Test(expected = FeatureNotFoundException.class)
    public void testEnableFeatureNotExist() {
View Full Code Here

Examples of org.ff4j.FF4j.exist()

    @Test
    public void testDisableFeature() {
        FF4j ff4j = new FF4j();
        ff4j.autoCreate(true);
        ff4j.disable("newffff");
        Assert.assertTrue(ff4j.exist("newffff"));
        Assert.assertFalse(ff4j.check("newffff"));
    }

    @Test(expected = FeatureNotFoundException.class)
    public void testDisableFeatureNotExist() {
View Full Code Here

Examples of org.ff4j.FF4j.exist()

                displayError("Cannot find FF4J bean as attribute (" + getFf4jAttributeName() + ") in any scope.");
                return SKIP_BODY;
            }

            // Handle where feature doe not exist
            if (!ff4j.exist(getFeatureid())) {
                displayError("Cannot find feature (" + getFeatureid() + ") anywhere.");
                return SKIP_BODY;
            }

            // Everything is OK
View Full Code Here

Examples of org.ff4j.cache.FeatureStoreCacheProxy.exist()

    @Test
    public void testExistBis() {
        FeatureStoreCacheProxy fscp = new FeatureStoreCacheProxy();
        fscp.setCacheManager(new InMemoryCacheManager());
        fscp.setTarget(new InMemoryFeatureStore("ff4j.xml"));
        Assert.assertFalse(fscp.exist("toto"));
        Assert.assertFalse(fscp.exist("toto"));
        Assert.assertTrue(fscp.exist("first"));
        Assert.assertTrue(fscp.exist("first"));
    }
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.