Package org.drools.guvnor.server.util

Examples of org.drools.guvnor.server.util.Discussion


    }

    protected List<DiscussionRecord> addToDiscussionForAsset(String assetId,
                                                             String comment) {
        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)));
       
        //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


    }

    protected List<DiscussionRecord> addToDiscussionForAsset(String assetId,
                                                             String comment) {
        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)));
       
        //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

        repositoryAssetOperations.clearAllDiscussionsForAsset( assetId );
    }

    @LoggedIn
    public List<DiscussionRecord> loadDiscussionForAsset(String assetId) {
        return new Discussion().fromString( rulesRepository.loadAssetByUUID( assetId ).getStringProperty( Discussion.DISCUSSION_PROPERTY_KEY ) );
    }
View Full Code Here

        AssetItem asset = getFileManager().getRepository().loadPackage(packageName).loadAsset(assetName);
        checkPackageReadPermission(asset.getPackageName());

        List<AtomFeed.AtomEntry> entries = new ArrayList<AtomFeed.AtomEntry>();
        entries.add(new AtomFeed.AtomEntry(request,  asset));
        List<DiscussionRecord> drs = new Discussion().fromString(asset.getStringProperty(Discussion.DISCUSSION_PROPERTY_KEY));
        for (DiscussionRecord dr : drs) {
            entries.add(new AtomFeed.AtomEntry(request, asset, dr));
        }
        AtomFeed feed = new AtomFeed("Discussion of: " + packageName + "/" + assetName,
                Calendar.getInstance(),
View Full Code Here

        this.rebuildSnapshots();
    }

    @Restrict("#{identity.loggedIn}")
    public List<DiscussionRecord> loadDiscussionForAsset(String assetId) {
        return new Discussion().fromString( getRulesRepository().loadAssetByUUID( assetId ).getStringProperty( Discussion.DISCUSSION_PROPERTY_KEY ) );
    }
View Full Code Here

    @Restrict("#{identity.loggedIn}")
    public List<DiscussionRecord> addToDiscussionForAsset(String assetId,
                                                          String comment) {
        RulesRepository repo = getRulesRepository();
        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

        AssetItem asset = getFileManager().getRepository().loadPackage(packageName).loadAsset(assetName);
        checkPackageReadPermission(asset.getPackageName());

        List<AtomFeed.AtomEntry> entries = new ArrayList<AtomFeed.AtomEntry>();
        entries.add(new AtomFeed.AtomEntry(request,  asset));
        List<DiscussionRecord> drs = new Discussion().fromString(asset.getStringProperty(Discussion.DISCUSSION_PROPERTY_KEY));
        for (DiscussionRecord dr : drs) {
            entries.add(new AtomFeed.AtomEntry(request, asset, dr));
        }
        AtomFeed feed = new AtomFeed("Discussion of: " + packageName + "/" + assetName,
                Calendar.getInstance(),
View Full Code Here

        this.rebuildSnapshots();
    }

    @Restrict("#{identity.loggedIn}")
    public List<DiscussionRecord> loadDiscussionForAsset(String assetId) {
        return new Discussion().fromString( getRulesRepository().loadAssetByUUID( assetId ).getStringProperty( Discussion.DISCUSSION_PROPERTY_KEY ) );
    }
View Full Code Here

    @Restrict("#{identity.loggedIn}")
    public List<DiscussionRecord> addToDiscussionForAsset(String assetId,
                                                          String comment) {
        RulesRepository repo = getRulesRepository();
        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

        checkPackageReadPermission(asset.getPackageName());

        List<AtomFeed.AtomEntry> entries = new ArrayList<AtomFeed.AtomEntry>();
        entries.add(new AtomFeed.AtomEntry(request,
                asset));
        List<DiscussionRecord> drs = new Discussion().fromString(asset.getStringProperty(Discussion.DISCUSSION_PROPERTY_KEY));
        for (DiscussionRecord dr : drs) {
            entries.add(new AtomFeed.AtomEntry(request,
                    asset,
                    dr));
        }
View Full Code Here

TOP

Related Classes of org.drools.guvnor.server.util.Discussion

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.