Package org.drools.repository

Examples of org.drools.repository.CategoryItem


    }

    @Test
    public void testAttemptDupeRule() throws Exception {
        ServiceImplementation impl = getServiceImplementation();
        CategoryItem cat = impl.getRulesRepository().loadCategory( "/" );
        cat.addCategory( "testAttemptDupeRule",
                         "yeah" );

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


        RepositoryCategoryService repositoryCategoryService = getRepositoryCategoryService();
        TableConfig conf = impl.loadTableConfig( ExplorerNodeConfig.RULE_LIST_TABLE_ID );
        assertNotNull( conf.headers );
        assertNotNull( conf.headerTypes );

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

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

                   launchServer(CXFJAXRSServer.class, true));

        ServiceImplementation impl = restTestingBase.getServiceImplementation();
       

        CategoryItem cat = impl.getRulesRepository().loadCategory( "/" );
        cat.addCategory( "AssetPackageResourceTestCategory",
                         "yeah" );
       
        //Package version 1(Initial version)
        PackageItem pkg = impl.getRulesRepository().createPackage( "restPackage1",
                                                                   "this is package restPackage1" );
View Full Code Here

    @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

    @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

    }

    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

            dataToPersist.put("lastmodifiedby", item.getLastContributor());
            dataToPersist.put("lastmodifieddate", item.getLastModified());
            List<CategoryItem> lstCategoryItem = item.getCategories();
            List<String> lstCategoryName = new ArrayList<String>();
            for(int i=0;i<lstCategoryItem.size();i++){
              CategoryItem ci = lstCategoryItem.get(i);
              lstCategoryName.add(ci.getName());
            }
            //List of Strings
            dataToPersist.put("category", lstCategoryName);
            if (rm.attributes.length > 0) {
        HashMap attributesToPersist = new HashMap();
View Full Code Here

    @Restrict("#{identity.loggedIn}")
    public String[] loadChildCategories(String categoryPath) {
        List<String> resultList = new ArrayList<String>();
        CategoryFilter filter = new CategoryFilter();

        CategoryItem item = repository.loadCategory( categoryPath );
        List children = item.getChildTags();
        for ( int i = 0; i < children.size(); i++ ) {
            String childCategoryName = ((CategoryItem) children.get( i )).getName();
            if ( filter.acceptNavigate( categoryPath,
                                        childCategoryName ) ) {
                resultList.add( childCategoryName );
View Full Code Here

        if ( path == null || "".equals( path ) ) {
            path = "/";
        }
        path = cleanHTML( path );

        CategoryItem item = repository.loadCategory( path );
        item.addCategory( name,
                          description );
        repository.save();
        return Boolean.TRUE;
    }
View Full Code Here

        meta.packageUUID = item.getPackage().getUUID();

        List cats = item.getCategories();
        meta.categories = new String[cats.size()];
        for ( int i = 0; i < meta.categories.length; i++ ) {
            CategoryItem cat = (CategoryItem) cats.get( i );
            meta.categories[i] = cat.getFullPath();
        }
        meta.dateEffective = calendarToDate( item.getDateEffective() );
        meta.dateExpired = calendarToDate( item.getDateExpired() );
        return meta;
View Full Code Here

TOP

Related Classes of org.drools.repository.CategoryItem

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.