Examples of CategoryItem


Examples of org.drools.repository.CategoryItem

        impl.repository.loadDefaultPackage();
        impl.repository.createPackage( "anotherPackage",
                                       "woot" );

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

        String uuid = impl.createNewRule( "test Delete Unversioned",
                                          "a description",
                                          "testDeleteUnversioned",
View Full Code Here

Examples of org.drools.repository.CategoryItem

        impl.repository.loadDefaultPackage();
        impl.repository.createPackage( "another",
                                       "woot" );

        CategoryItem cat = impl.repository.loadCategory( "/" );
        cat.addCategory( "testAddRule",
                         "yeah" );

        String result = impl.createNewRule( "test AddRule",
                                            "a description",
                                            "testAddRule",
View Full Code Here

Examples of org.drools.repository.CategoryItem

        assertTrue( dtItem.getBinaryContentAttachmentFileName().endsWith( ".xls" ) );
    }

    public void testAttemptDupeRule() throws Exception {
        ServiceImplementation impl = getService();
        CategoryItem cat = impl.repository.loadCategory( "/" );
        cat.addCategory( "testAttemptDupeRule",
                         "yeah" );

        impl.repository.createPackage( "dupes",
                                       "yeah" );
View Full Code Here

Examples of org.drools.repository.CategoryItem

        ServiceImplementation impl = getService();
        TableConfig conf = impl.loadTableConfig( AssetItemGrid.RULE_LIST_TABLE_ID );
        assertNotNull( conf.headers );
        assertNotNull( conf.headerTypes );

        CategoryItem cat = impl.repository.loadCategory( "/" );
        cat.addCategory( "testRuleTableLoad",
                         "yeah" );

        impl.repository.createPackage( "testRuleTableLoad",
                                       "yeah" );
        impl.createNewRule( "testRuleTableLoad",
View Full Code Here

Examples of org.drools.repository.CategoryItem

    }

    private String findParentCategory(AssetItem asset,
                                      String currentCat) {
        //Start your search at the top
        CategoryItem item = asset.getRulesRepository().loadCategory("/");
        return findCategoryInChild(item,
                currentCat);
    }
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(identity);

        CategoryItem item = rulesRepository.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

    @GET
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Collection<Category> getCategoriesAsJAXB() {
        Collection<Category> ret = new ArrayList<Category>();
        CategoryItem rootItem = rulesRepository.loadCategory("/");
        addChildrenRecursively(ret, rootItem);
        return ret;
    }
View Full Code Here

Examples of org.drools.repository.CategoryItem

    @GET
    @Path("{categoryPath:.+}")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Category getCategoryAsJAXB(@PathParam("categoryPath") String categoryPath) {
        CategoryItem categoryItem = rulesRepository.loadCategory(categoryPath);
        return toCategory(categoryItem, uriInfo);
    }
View Full Code Here

Examples of org.drools.repository.CategoryItem

    @GET
    @Path("{categoryPath:.+}/children")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Collection<Category> getCategoryChildrenAsJAXB(@PathParam("categoryPath") String categoryPath) {
        //get the requested category
        CategoryItem categoryItem = rulesRepository.loadCategory(categoryPath);
       
        //get its children and add them into a List
        Collection<Category> ret = new ArrayList<Category>();
        List<CategoryItem> children = categoryItem.getChildTags();
        for (CategoryItem child : children) {
            ret.add(toCategory(child, uriInfo));
        }
        return ret;
    }
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
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.