Package org.drools.guvnor.server.util

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


        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


        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

        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

        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

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

        push( "discussion", assetId );

        MailboxService.getInstance().recordItemUpdated( asset );
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

    }

    public void migrateAssetDiscussions(Module jcrModule, String assetUUIDthrows SerializationException {
        //avoid using RepositoryAssetService as it calls assets' content handler
        AssetItem assetItemJCR = rulesRepository.loadAssetByUUID(assetUUID);
        List<DiscussionRecord> discussions = new Discussion().fromString( assetItemJCR.getStringProperty( Discussion.DISCUSSION_PROPERTY_KEY ) );
       
        if(discussions.size() == 0) {
            return;
        }
       
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

        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

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.