Examples of CategoryItem


Examples of net.sourceforge.jwbf.mediawiki.contentRep.CategoryItem

  /**
   * {@inheritDoc}
   */
  @Override
  protected void addCatItem(String title, int pageid, int ns) {
    CategoryItem ci = new CategoryItem();
    ci.setTitle(title);
    ci.setPageid(pageid);
    ci.setNamespace(ns);
    titleCollection.add(ci);

  }
View Full Code Here

Examples of org.drools.repository.CategoryItem

    private void fillMetaCategories(MetaData meta,
                                    List<CategoryItem> categories) {
        meta.setCategories( new String[categories.size()] );
        for ( int i = 0; i < meta.getCategories().length; i++ ) {
            CategoryItem cat = (CategoryItem) categories.get( i );
            meta.getCategories()[i] = cat.getFullPath();
        }
    }
View Full Code Here

Examples of org.drools.repository.CategoryItem

    @SuppressWarnings("rawtypes")
    protected String[] loadChildCategories(String categoryPath) {
        List<String> resultList = new ArrayList<String>();
        CategoryFilter filter = new CategoryFilter();

        CategoryItem item = getRulesRepository().loadCategory(categoryPath);
        List children = item.getChildTags();
        for (Object aChildren : children) {
            String childCategoryName = ((CategoryItem) aChildren).getName();
            if (filter.acceptNavigate(categoryPath,
                    childCategoryName)) {
                resultList.add(childCategoryName);
View Full Code Here

Examples of org.drools.repository.CategoryItem

    private void fillMetaCategories(MetaData meta,
            List<CategoryItem> categories) {
        meta.setCategories(new String[categories.size()]);
        for (int i = 0; i < meta.getCategories().length; i++) {
            CategoryItem cat = (CategoryItem) categories.get(i);
            meta.getCategories()[i] = cat.getFullPath();
        }
    }
View Full Code Here

Examples of org.drools.repository.CategoryItem

    }

    @SuppressWarnings({"rawtypes", "unchecked"})
    @Test
    public void testLoadChildCategories() {
        CategoryItem categoryItem = mock( CategoryItem.class );
        when( rulesRepository.loadCategory( "categorypath" ) ).thenReturn( categoryItem );
        List childTags = new ArrayList();
        CategoryItem categoryItemNode = mock( CategoryItem.class );
        childTags.add( categoryItemNode );
        when( categoryItemNode.getName() ).thenReturn( "categoryNodeName" );
        when( categoryItem.getChildTags() ).thenReturn( childTags );
        assertArrayEquals( repositoryCategoryOperations.loadChildCategories( "categorypath" ),
                           new String[]{"categoryNodeName"} );
    }
View Full Code Here

Examples of org.drools.repository.CategoryItem

    }

    public void testAndVerifyCreateCategory(final String createPath,
                                            final String loadPath) {
        initSession();
        CategoryItem categoryItem = mock( CategoryItem.class );
        when( rulesRepository.loadCategory( loadPath ) ).thenReturn( categoryItem );
        repositoryCategoryOperations.createCategory( createPath,
                                                     "name",
                                                     "description" );
        verify( rulesRepository ).loadCategory( loadPath );
View Full Code Here

Examples of org.drools.repository.CategoryItem

    }

    @Test
    public void testRemoveCategory() throws SerializationException {
        initSession();
        CategoryItem categoryItem = mock( CategoryItem.class );
        when( rulesRepository.loadCategory( "/path" ) ).thenReturn( categoryItem );

        repositoryCategoryOperations.removeCategory( "/path" );
        verify( rulesRepository ).loadCategory( "/path" );
        verify( categoryItem ).remove();
View Full Code Here

Examples of org.drools.repository.CategoryItem

        ServiceImplementation impl = restTestingBase.getServiceImplementation();
        //Package version 1(Initial version)
        PackageItem pkg = impl.getRulesRepository().createPackage( "restPackage1",
                                                                   "this is package restPackage1" );
        CategoryItem cat = impl.getRulesRepository().loadCategory( "/" );
        cat.addCategory( "testRESTCat",
                         "testRESTCat" );
       
        //Package version 2 
        DroolsHeader.updateDroolsHeader( "import com.billasurf.Board\n global com.billasurf.Person customer1",
                                         pkg );
View Full Code Here

Examples of org.drools.repository.CategoryItem

    @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",
        "yeah" );
        testBuiltInSelectorCategory2.addCategory( "testBuiltInSelectorCategory2Child",
        "yeah" );    
       
        //create our package
        PackageItem pkg = repo.createPackage("testBuiltInSelector",
                "");
View Full Code Here

Examples of org.drools.repository.CategoryItem

        repo.loadDefaultPackage();
        repo.createPackage( "anotherPackage",
                            "woot" );

        CategoryItem cat = impl.getRulesRepository().loadCategory( "/" );
        cat.addCategory( "testDeleteUnversioned",
                         "yeah" );

        String uuid = impl.createNewRule( "test Delete Unversioned",
                                          "a description",
                                          "testDeleteUnversioned",
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.