Package org.drools.guvnor.server.util

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


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


        repositoryAssetOperations.clearAllDiscussionsForAsset(assetId);
    }

    @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

        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

    }

    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)));
        asset.updateStringProperty(dp.toString(discussion),
                Discussion.DISCUSSION_PROPERTY_KEY,
                false);
        rulesRepository.save();

        push("discussion",
View Full Code Here

            jcrAssetItem.getName(), jcrAssetItem.getFormat());       */

        //avoid using RepositoryAssetService as it calls assets' content handler
        Metadata metadata = new Metadata();

        List<DiscussionRecord> discussions = new Discussion().fromString(jcrAssetItem.getStringProperty(Discussion.DISCUSSION_PROPERTY_KEY));

        if (discussions.size() != 0) {
            //final org.kie.commons.java.nio.file.Path nioPath = paths.convert( path );
            for (DiscussionRecord discussion : discussions) {
                metadata.addDiscussion(new org.guvnor.common.services.shared.metadata.model.DiscussionRecord(discussion.timestamp, discussion.author, discussion.note));
View Full Code Here

        repositoryAssetOperations.clearAllDiscussionsForAsset(assetId);
    }

    @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

            jcrAssetItem.getName(), jcrAssetItem.getFormat());       */

        //avoid using RepositoryAssetService as it calls assets' content handler
        Metadata metadata = new Metadata();

        List<DiscussionRecord> discussions = new Discussion().fromString(jcrAssetItem.getStringProperty(Discussion.DISCUSSION_PROPERTY_KEY));

        if (discussions.size() != 0) {
            //final org.kie.commons.java.nio.file.Path nioPath = paths.convert( path );
            for (DiscussionRecord discussion : discussions) {
                metadata.addDiscussion(new org.guvnor.common.services.shared.metadata.model.DiscussionRecord(discussion.timestamp, discussion.author, discussion.note));
View Full Code Here

        checkPackageReadPermission(asset.getModuleName());

        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

        checkPackageReadPermission(asset.getModuleName());

        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

        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

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.