Package org.ff4j.store

Examples of org.ff4j.store.FeatureStoreMongoDB.create()


    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
View Full Code Here


    @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 ?
View Full Code Here

        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"));
View Full Code Here

        // 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));
View Full Code Here

        // 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
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.