Examples of loadAssetByUUID()


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

        return createdDate.getTime();
    }

    protected void clearAllDiscussionsForAsset(final String assetId) {
        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()

    }

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

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

        return createdDate.getTime();
    }

    protected void clearAllDiscussionsForAsset(final String assetId) {
        RulesRepository repo = rulesRepository;
        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()

        FileManagerUtils fm = new FileManagerUtils();
        fm.setRepository(repo);

        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()

        return createdDate.getTime();
    }

    protected void clearAllDiscussionsForAsset(final String assetId) {
        RulesRepository repo = rulesRepository;
        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("",
View Full Code Here

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

        return createdDate.getTime();
    }

    protected void clearAllDiscussionsForAsset(final String assetId) {
        RulesRepository repo = rulesRepository;
        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("",
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()

    @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
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.