Examples of loadAssetByUUID()


Examples of org.drools.repository.RulesRepository.loadAssetByUUID()

    @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",
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadAssetByUUID()

    @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 ),
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadAssetByUUID()

    @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",
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadAssetByUUID()

        fm.attachFileToAsset( uuid,
                              file,
                              "billasurf.jar" );

        AssetItem item = repo.loadAssetByUUID( uuid );
        assertNotNull( item.getBinaryContentAsBytes() );
        assertEquals( item.getBinaryContentAttachmentFileName(),
                      "billasurf.jar" );

        PackageItem pkg = repo.loadPackage( "com.billasurf.manufacturing.plant" );
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadAssetByUUID()

        File imageFile = new File( getClass().getResource( "resources/myprocess.png" ).toURI() );
        asset.updateBinaryContentAttachment( new FileInputStream( imageFile ) );
        asset.updateContent( "import org.drools.guvnor.server.files.SampleFact\n global org.drools.guvnor.server.files.SampleFact sf" );
        asset.checkin( "" );

        AssetItem assetnew = repo.loadAssetByUUID( asset.getUUID() );
        assertEquals( "myprocess",
                      assetnew.getName() );

        //check png
        Base64 enc = new Base64();
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadAssetByUUID()

    }

    @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();
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadAssetByUUID()

    @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

Examples of org.drools.repository.RulesRepository.loadAssetByUUID()

        File imageFile = new File( getClass().getResource( "resources/myprocess.png" ).toURI() );
        asset.updateBinaryContentAttachment( new FileInputStream( imageFile ) );
        asset.updateContent( "import org.drools.guvnor.server.files.SampleFact\n global org.drools.guvnor.server.files.SampleFact sf" );
        asset.checkin( "" );

        AssetItem assetnew = repo.loadAssetByUUID( asset.getUUID() );
        assertEquals( "myprocess",
                      assetnew.getName() );

        //check png
        Base64 enc = new Base64();
View Full Code Here

Examples of org.drools.repository.RulesRepository.loadAssetByUUID()

        fm.attachFileToAsset( uuid,
                              file,
                              "billasurf.jar" );

        AssetItem item = repo.loadAssetByUUID( uuid );
        assertNotNull( item.getBinaryContentAsBytes() );
        assertEquals( item.getBinaryContentAttachmentFileName(),
                      "billasurf.jar" );

        PackageItem pkg = repo.loadPackage( "com.billasurf.manufacturing.plant" );
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.