Examples of updateStringProperty()


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

    }

    protected void clearAllDiscussionsForAsset(final String assetId) {
        RulesRepository repo = getRulesRepository();
        AssetItem asset = repo.loadAssetByUUID( assetId );
        asset.updateStringProperty( "",
                                    "discussion" );
        repo.save();

        push( "discussion",
                assetId );
View Full Code Here

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

        AssetItem asset = repository.loadAssetByUUID( assetId );
        Discussion dp = new Discussion();
        List<DiscussionRecord> discussion = dp.fromString( asset.getStringProperty( Discussion.DISCUSSION_PROPERTY_KEY ) );
        discussion.add( new DiscussionRecord( repository.getSession().getUserID(),
                                              StringEscapeUtils.escapeXml( comment ) ) );
        asset.updateStringProperty( dp.toString( discussion ),
                                    Discussion.DISCUSSION_PROPERTY_KEY,
                                    false );
        repository.save();

        push( "discussion",
View Full Code Here

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

    }

    protected void clearAllDiscussionsForAsset(final String assetId) {
        RulesRepository repo = rulesRepository;
        AssetItem asset = repo.loadAssetByUUID(assetId);
        asset.updateStringProperty("",
                "discussion");
        repo.save();

        push("discussion",
                assetId);
View Full Code Here

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

        AssetItem asset = rulesRepository.loadAssetByUUID(assetId);
        Discussion dp = new Discussion();
        List<DiscussionRecord> discussion = dp.fromString(asset.getStringProperty(Discussion.DISCUSSION_PROPERTY_KEY));
        discussion.add(new DiscussionRecord(rulesRepository.getSession().getUserID(),
                StringEscapeUtils.escapeXml(comment)));
        asset.updateStringProperty(dp.toString(discussion),
                Discussion.DISCUSSION_PROPERTY_KEY,
                false);
        rulesRepository.save();

        push("discussion",
View Full Code Here

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

        AssetItem asset = repo.loadAssetByUUID(assetId);
       
        //Don't update the Last Modified Date as it means the Asset to which the Discussion relates
        //needs to be re-loaded to prevent an Optimistic Lock Exception in isAssetUpdatedInRepository().
        //Other Asset meta-data does not affect the Last Modified Date. Discussions are now consistent.
        asset.updateStringProperty("",
                                   Discussion.DISCUSSION_PROPERTY_KEY,
                                   false );
        repo.save();

        push("discussion",
View Full Code Here

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

        discussion.add(new DiscussionRecord(rulesRepository.getSession().getUserID(),
                                            StringEscapeUtils.escapeXml(comment)));
       
        //Adding a new Discussion has *never* updated the Last Modified Date.
        //clearAllDiscussionsForAsset has been made consistent with this behaviour.
        asset.updateStringProperty(dp.toString(discussion),
                                   Discussion.DISCUSSION_PROPERTY_KEY,
                                   false);
        rulesRepository.save();

        push("discussion",
View Full Code Here

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

        AssetItem asset = repo.loadAssetByUUID(assetId);
       
        //Don't update the Last Modified Date as it means the Asset to which the Discussion relates
        //needs to be re-loaded to prevent an Optimistic Lock Exception in isAssetUpdatedInRepository().
        //Other Asset meta-data does not affect the Last Modified Date. Discussions are now consistent.
        asset.updateStringProperty("",
                                   Discussion.DISCUSSION_PROPERTY_KEY,
                                   false );
        repo.save();

        push("discussion",
View Full Code Here

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

        discussion.add(new DiscussionRecord(rulesRepository.getSession().getUserID(),
                                            StringEscapeUtils.escapeXml(comment)));
       
        //Adding a new Discussion has *never* updated the Last Modified Date.
        //clearAllDiscussionsForAsset has been made consistent with this behaviour.
        asset.updateStringProperty(dp.toString(discussion),
                                   Discussion.DISCUSSION_PROPERTY_KEY,
                                   false);
        rulesRepository.save();

        push("discussion",
View Full Code Here

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

        AssetItem asset = repo.loadAssetByUUID( assetId );
        Discussion dp = new Discussion();
        List<DiscussionRecord> discussion = dp.fromString( asset.getStringProperty( Discussion.DISCUSSION_PROPERTY_KEY ) );
        discussion.add( new DiscussionRecord( repo.getSession().getUserID(),
                                              comment ) );
        asset.updateStringProperty( dp.toString( discussion ),
                                    Discussion.DISCUSSION_PROPERTY_KEY,
                                    false );
        repo.save();

        push( "discussion",
View Full Code Here

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

    @Restrict("#{identity.loggedIn}")
    public void clearAllDiscussionsForAsset(final String assetId) {
        checkIfADMIN();
        RulesRepository repo = getRulesRepository();
        AssetItem asset = repo.loadAssetByUUID( assetId );
        asset.updateStringProperty( "",
                                    "discussion" );
        repo.save();

        push( "discussion",
              assetId );
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.