Examples of loadCategory()


Examples of org.drools.repository.RulesRepository.loadCategory()

    @Test
    public void testBuiltInSelector() throws Exception {
        ServiceImplementation serviceImplementation = getServiceImplementation();
        RulesRepository repo = serviceImplementation.getRulesRepository();

        CategoryItem rootCat = repo.loadCategory( "/" );
        CategoryItem testBuiltInSelectorCategory1 = rootCat.addCategory( "testBuiltInSelectorCategory1",
                         "yeah" );
        testBuiltInSelectorCategory1.addCategory( "testBuiltInSelectorCategory1Child",
        "yeah" );       
        CategoryItem testBuiltInSelectorCategory2 = rootCat.addCategory( "testBuiltInSelectorCategory2",
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadCategory()

    }

    public void testCategoryFeed() throws Exception {
        RulesRepository repo = new RulesRepository( TestEnvironmentSessionHelper.getSession( true ) );
        PackageItem pkg = repo.createPackage("testCategoryFeed", "");
        repo.loadCategory("/").addCategory("testCategoryFeedCat", "");
        AssetItem asset = pkg.addAsset("asset1", "desc");
        asset.updateFormat("drl");
        asset.updateCategoryList(new String[] {"testCategoryFeedCat"});
        asset.checkin("");
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadCategory()

    public void testCreateCateories() throws Exception {
        RulesRepository repo = getRepo();

        //load the root
        CategoryItem root = repo.loadCategory( "/" );

        CategoryItem item = root.addCategory("testCreateCategories", "this is a top level one");
        assertEquals("testCreateCategories", item.getName());
        assertEquals("testCreateCategories", item.getFullPath());
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadCategory()

        CategoryItem item = root.addCategory("testCreateCategories", "this is a top level one");
        assertEquals("testCreateCategories", item.getName());
        assertEquals("testCreateCategories", item.getFullPath());

        item = repo.loadCategory( "testCreateCategories" );
        assertEquals("testCreateCategories", item.getName());

        item.remove();
        repo.save();
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadCategory()

        item.remove();
        repo.save();

        try {
            repo.loadCategory( "testCreateCategories" );
            fail("this should not exist");
        } catch (RulesRepositoryException e) {
            assertNotNull(e.getCause());
        }
    }
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadCategory()

    }

    public void testRemoveCategoryUneeded() {
        RulesRepository repo = getRepo();
        repo.loadCategory( "/" ).addCategory( "testRemoveCat", "a" );
        AssetItem as = repo.loadDefaultPackage().addAsset( "testRemoveCategory", "a", "testRemoveCat", "drl" );
        as.checkin( "a" );
        as.updateCategoryList( new String[] {} );

        as.checkin( "a" );
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadCategory()

        as = repo.loadDefaultPackage().loadAsset( "testRemoveCategory" );
        assertEquals(0, as.getCategories().size());


        repo.loadCategory( "testRemoveCat" ).remove();
        repo.save();

    }

View Full Code Here

Examples of org.drools.repository.RulesRepository.loadCategory()

    }


    public void testRemoveCategoryLinkedWithArchived() {
        RulesRepository repo = getRepo();
        repo.loadCategory( "/" ).addCategory( "testRemoveCategoryWithArchivedCat", "a" );
        AssetItem as = repo.loadDefaultPackage().addAsset( "testRemoveCategoryWithArchivedAsset", "a", "testRemoveCategoryWithArchivedCat", "drl" );
        as.checkin( "a" );

        as.archiveItem(true);
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadCategory()

        AssetItem as = repo.loadDefaultPackage().addAsset( "testRemoveCategoryWithArchivedAsset", "a", "testRemoveCategoryWithArchivedCat", "drl" );
        as.checkin( "a" );

        as.archiveItem(true);

        repo.loadCategory( "testRemoveCategoryWithArchivedCat" ).remove();
        repo.save();

//        as.remove();
    }
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadCategory()

    @Test
    public void testBuiltInSelector() throws Exception {
        RulesRepository repo = rulesRepository;

        CategoryItem rootCat = repo.loadCategory( "/" );
        CategoryItem testBuiltInSelectorCategory1 = rootCat.addCategory( "testBuiltInSelectorCategory1",
                                                                         "yeah" );
        testBuiltInSelectorCategory1.addCategory( "testBuiltInSelectorCategory1Child",
                                                  "yeah" );
        CategoryItem testBuiltInSelectorCategory2 = rootCat.addCategory( "testBuiltInSelectorCategory2",
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.