Examples of updateCategoryList()


Examples of org.drools.repository.AssetItem.updateCategoryList()

                                                       repoAsset );

        repoAsset.updateDateEffective( dateToCalendar( meta.getDateEffective() ) );
        repoAsset.updateDateExpired( dateToCalendar( meta.getDateExpired() ) );

        repoAsset.updateCategoryList( meta.getCategories() );
        repoAsset.updateDescription( asset.getDescription() );

        ContentHandler handler = ContentManager.getHandler( repoAsset.getFormat() );
        handler.storeAssetContent( asset,
                                   repoAsset );
View Full Code Here

Examples of org.drools.repository.AssetItem.updateCategoryList()

            //REVISIT: What if the client really wants to set content to ""?
            if (assetEntry.getContent() != null && !"".equals(assetEntry.getContent())) {
                ai.updateContent(assetEntry.getContent());
            }
            if (categories != null) {
                ai.updateCategoryList(categories);
            }
            if (state != null) {
                ai.updateState(state);
            }
            ai.checkin("Check-in (summary): " + assetEntry.getSummary());
View Full Code Here

Examples of org.drools.repository.AssetItem.updateCategoryList()

                repoAsset);

        repoAsset.updateDateEffective(dateToCalendar(meta.getDateEffective()));
        repoAsset.updateDateExpired(dateToCalendar(meta.getDateExpired()));

        repoAsset.updateCategoryList(meta.getCategories());
        repoAsset.updateDescription(asset.getDescription());

        ContentHandler handler = ContentManager.getHandler(repoAsset.getFormat());
        handler.storeAssetContent(asset,
                repoAsset);
View Full Code Here

Examples of org.drools.repository.AssetItem.updateCategoryList()

            }

            AssetItem ai = rulesRepository.loadModule(packageName).addAsset(entry.getTitle(), entry.getSummary(), null, format);

            if (categories != null) {
                ai.updateCategoryList(categories);
            }
           
            //The categories are not saved by addAsset(). Need to force it here.
            rulesRepository.save();
View Full Code Here

Examples of org.drools.repository.AssetItem.updateCategoryList()

            //REVISIT: What if the client really wants to set content to ""?
            if (assetEntry.getContent() != null && !"".equals(assetEntry.getContent())) {
                ai.updateContent(assetEntry.getContent());
            }
            if (categories != null) {
                ai.updateCategoryList(categories);
            }
            if (state != null) {
                ai.updateState(state);
            }
            ai.checkin("Check-in (summary): " + assetEntry.getSummary());
View Full Code Here

Examples of org.drools.repository.AssetItem.updateCategoryList()

        DroolsHeader.updateDroolsHeader("import org.drools.Person",
                pkg);
        AssetItem rule1 = pkg.addAsset("rule1",
                "");
        rule1.updateFormat(AssetFormats.DRL);
        rule1.updateCategoryList(new String[]{"testBuiltInSelectorCategory1/testBuiltInSelectorCategory1Child"});

        rule1.updateContent("when \n Person() \n then \n System.out.println(\"yeah\");\n");
        rule1.checkin("");

        AssetItem rule2 = pkg.addAsset("rule2",
View Full Code Here

Examples of org.drools.repository.AssetItem.updateCategoryList()

        rule1.checkin("");

        AssetItem rule2 = pkg.addAsset("rule2",
                "");
        rule2.updateFormat(AssetFormats.DRL);
        rule2.updateCategoryList(new String[]{"testBuiltInSelectorCategory2/testBuiltInSelectorCategory2Child"});
        rule2.updateContent("when \n Person() \n then \n System.out.println(\"yeah\");\n");
        rule2.checkin("");

        SelectorManager sm = SelectorManager.getInstance();
        sm.selectors.put("testSelect",
View Full Code Here

Examples of org.drools.repository.AssetItem.updateCategoryList()

            //REVISIT: What if the client really wants to set content to ""?
            if (assetEntry.getContent() != null && !"".equals(assetEntry.getContent())) {
                ai.updateContent(assetEntry.getContent());
            }
            if (categories != null) {
                ai.updateCategoryList(categories);
            }
            if (state != null) {
                ai.updateState(state);
            }
            ai.checkin("Check-in (summary): " + assetEntry.getSummary());
View Full Code Here

Examples of org.drools.repository.AssetItem.updateCategoryList()

        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("");


        //try again with bad password
        HashMap<String, String> headers = new HashMap<String, String>() {
View Full Code Here

Examples of org.drools.repository.AssetItem.updateCategoryList()

            //REVISIT: What if the client really wants to set content to ""?
            if (assetEntry.getContent() != null && !"".equals(assetEntry.getContent())) {
                ai.updateContent(assetEntry.getContent());
            }
            if (categories != null) {
                ai.updateCategoryList(categories);
            }
            if (state != null) {
                ai.updateState(state);
            }
            ai.checkin("Check-in (summary): " + assetEntry.getSummary());
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.