Examples of updateBinaryContentAttachment()


Examples of org.drools.repository.AssetItem.updateBinaryContentAttachment()

        PackageItem pkg = repo.createPackage("testRuleAndDSLAndFunction",
                "");
        AssetItem model = pkg.addAsset("model",
                "qed");
        model.updateFormat(AssetFormats.MODEL);
        model.updateBinaryContentAttachment(this.getClass().getResourceAsStream("/billasurf.jar"));
        model.checkin("");
        DroolsHeader.updateDroolsHeader("import com.billasurf.Board\n global com.billasurf.Person customer",
                pkg);
        repo.save();
View Full Code Here

Examples of org.drools.repository.AssetItem.updateBinaryContentAttachment()

        assertNotNull(xls);

        AssetItem asset = pkg.addAsset("MyDT",
                "");
        asset.updateFormat(AssetFormats.DECISION_SPREADSHEET_XLS);
        asset.updateBinaryContentAttachment(xls);
        asset.checkin("");

        PackageAssembler asm = new PackageAssembler(pkg);
        asm.compile();
        if (asm.hasErrors()) {
View Full Code Here

Examples of org.drools.repository.AssetItem.updateBinaryContentAttachment()

        wm.fireAllRules();

        assertEquals(120,
                policy.getBasePrice());

        asset.updateBinaryContentAttachment(this.getClass().getResourceAsStream("/SampleDecisionTable_WithError.xls"));
        asset.checkin("");
        asm = new PackageAssembler(pkg);
        asm.compile();
        assertTrue(asm.hasErrors());
        assertEquals(asset.getName(),
View Full Code Here

Examples of org.drools.repository.AssetItem.updateBinaryContentAttachment()

                                                  "for test" );
        AssetItem asset = pacakge.addAsset( "testModelAttachedAsset",
                                            "description" );

        InputStream is = this.getClass().getResourceAsStream( "domain.objects-1.1.8.jar" );
        asset.updateBinaryContentAttachment( is );

        ModelContentHandler modelContentHandler = new ModelContentHandler();
        modelContentHandler.onAttachmentAdded( asset );

        String header = DroolsHeader.getDroolsHeader( pacakge );
View Full Code Here

Examples of org.drools.repository.AssetItem.updateBinaryContentAttachment()

                                        "description" );
        DroolsHeader.updateDroolsHeader( "import something.Else\n",
                                                  pkg );

        InputStream is = this.getClass().getResourceAsStream( "domain.objects-1.1.8.jar" );
        asset.updateBinaryContentAttachment( is );

        ModelContentHandler modelContentHandler = new ModelContentHandler();
        modelContentHandler.onAttachmentAdded( asset );

        String header = DroolsHeader.getDroolsHeader( pkg );
View Full Code Here

Examples of org.drools.repository.AssetItem.updateBinaryContentAttachment()

        PackageItem pkg = repo.createPackage( "testAvailableTypes",
                                              "" );
        AssetItem model = pkg.addAsset( "MyModel",
                                        "" );
        model.updateFormat( AssetFormats.MODEL );
        model.updateBinaryContentAttachment( this.getClass().getResourceAsStream( "/billasurf.jar" ) );
        model.checkin( "" );
        repo.save();

        String[] s = repositoryPackageService.listTypesInPackage( pkg.getUUID() );
        assertNotNull( s );
View Full Code Here

Examples of org.drools.repository.AssetItem.updateBinaryContentAttachment()

    asset2.updateFormat("xml");
    asset2.checkin("");

    AssetItem asset3 = pkg.addAsset("asset3", "");
    ByteArrayInputStream in = new ByteArrayInputStream("abc".getBytes());
    asset3.updateBinaryContentAttachment(in);
    asset3.updateFormat("xls");
    asset3.checkin("");

    assertTrue(asset3.isBinary());
    assertFalse(asset1.isBinary());
View Full Code Here

Examples of org.drools.repository.AssetItem.updateBinaryContentAttachment()

    Calendar cd = asset1.getLastModified();

    AssetItem asset2 = pkg.addAsset("asset2", "");
    ByteArrayInputStream in = new ByteArrayInputStream("abc".getBytes());
    asset2.updateBinaryContentAttachment(in);
    asset2.updateFormat("xls");
    asset2.checkin("");

    RestAPI api = new RestAPI(repo);
    Thread.sleep(42);
View Full Code Here

Examples of org.drools.repository.AssetItem.updateBinaryContentAttachment()

        PackageItem pkg = repo.createPackage( "testRuleAndDSLAndFunction",
                                              "" );
        AssetItem model = pkg.addAsset( "model",
                                        "qed" );
        model.updateFormat( AssetFormats.MODEL );
        model.updateBinaryContentAttachment( this.getClass().getResourceAsStream( "/billasurf.jar" ) );
        model.checkin( "" );
        ServiceImplementation.updateDroolsHeader( "import com.billasurf.Board\n global com.billasurf.Person customer",
                                                  pkg );
        repo.save();
View Full Code Here

Examples of org.drools.repository.AssetItem.updateBinaryContentAttachment()

        assertNotNull( xls );

        AssetItem asset = pkg.addAsset( "MyDT",
                                        "" );
        asset.updateFormat( AssetFormats.DECISION_SPREADSHEET_XLS );
        asset.updateBinaryContentAttachment( xls );
        asset.checkin( "" );

        ContentPackageAssembler asm = new ContentPackageAssembler( pkg );
        if ( asm.hasErrors() ) {
            System.err.println( asm.getErrors().get( 0 ).errorReport );
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.