Package org.ff4j.store

Examples of org.ff4j.store.FeatureStoreMongoDB


    @Rule
    public FongoRule fongoRule = new FongoRule(false);

    @Override
    protected FeatureStore initStore() {
        FeatureStoreMongoDB storeMongoDB = new FeatureStoreMongoDB(fongoRule.getDB().getCollection("ff4j"));
        storeMongoDB.create(new Feature("AwesomeFeature", true, "some desc"));
        // First
        storeMongoDB.create(new Feature("first", true, "description", null, Arrays.asList("USER")));
        // Second
        storeMongoDB.create(new Feature("second", false, "description", "GRP0", Arrays.asList("USER")));
        // Third
        storeMongoDB.create(new Feature("third", false, "ThirdJDBC", "GRP1", Arrays.asList("ADMINISTRATOR", "BETA-TESTER")));
        // Forth ?? Fourth ?
        FlippingStrategy strategy = new org.ff4j.strategy.el.ExpressionFlipStrategy();
        strategy.init("forth", ParameterUtils.toMap("expression=third|second"));
        storeMongoDB.create(new Feature("forth", true, "ForthJDBC", "GRP1", Arrays.asList("ADMINISTRATOR", "BETA-TESTER"),
                strategy));

        return storeMongoDB;
    }
View Full Code Here

TOP

Related Classes of org.ff4j.store.FeatureStoreMongoDB

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.