Examples of loadDefaultPackage()


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

        FactModelContentHandler ch = new FactModelContentHandler();

        ServiceImplementation impl = getServiceImplementation();
        RulesRepository repo = impl.getRulesRepository();

        PackageItem pkg = repo.loadDefaultPackage();
        AssetItem asset = pkg.addAsset( "testDeclaredTypeStore",
                                        "" );
        asset.updateFormat( "model.drl" );
        asset.updateContent( "declare Foo\n name: String\n end" );
        asset.checkin( "" );
View Full Code Here

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

            }
            assertFalse( found );

            //Now, another user comes along, makes a change...
            RulesRepository repo2 = new RulesRepository( TestEnvironmentSessionHelper.getSessionFor( "thirdpartyuser" ) );
            AssetItem as2 = repo2.loadDefaultPackage().loadAsset( "testLoadInbox" );
            as2.updateContent( "hey" );
            as2.checkin( "here we go again !" );

            Thread.sleep( 200 );
View Full Code Here

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

            assertEquals( 1,
                          ib.loadRecentEdited().size() );

            //ok lets create another user...
            RulesRepository repo3 = new RulesRepository( TestEnvironmentSessionHelper.getSessionFor( "fourthuser" ) );
            AssetItem as3 = repo3.loadDefaultPackage().loadAsset( "testLoadInbox" );
            as3.updateContent( "hey22" );
            as3.checkin( "here we go again 22!" );

            Thread.sleep( 250 );
View Full Code Here

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

    public void testDeleteUnversionedRule() throws Exception {

        ServiceImplementation impl = getServiceImplementation();
        RulesRepository repo = impl.getRulesRepository();

        repo.loadDefaultPackage();
        repo.createPackage( "anotherPackage",
                            "woot" );

        CategoryItem cat = impl.getRulesRepository().loadCategory( "/" );
        cat.addCategory( "testDeleteUnversioned",
View Full Code Here

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

        FileManagerUtils uploadHelper = getFileManagerUtils();

        ServiceImplementation impl = getServiceImplementation();
        RulesRepository repo = impl.getRulesRepository();

        AssetItem item = repo.loadDefaultPackage().addAsset( "testUploadFile",
                                                             "description" );
        item.updateFormat( "drl" );
        FormData upload = new FormData();

        upload.setFile( new MockFile() );
View Full Code Here

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

        upload.setFile( new MockFile() );
        upload.setUuid( item.getUUID() );

        uploadHelper.attachFile( upload );

        AssetItem item2 = repo.loadDefaultPackage().loadAsset( "testUploadFile" );
        byte[] data = item2.getBinaryContentAsBytes();

        assertNotNull( data );
        assertEquals( "foo bar",
                      new String( data ) );
View Full Code Here

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

        FileManagerUtils uploadHelper = getFileManagerUtils();

        ServiceImplementation impl = getServiceImplementation();
        RulesRepository repo = impl.getRulesRepository();

        AssetItem item = repo.loadDefaultPackage().addAsset( "testGetFilebyUUID",
                                                             "description" );
        item.updateFormat( "drl" );
        FormData upload = new FormData();

        upload.setFile( new MockFile() );
View Full Code Here

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

        DroolsRepositoryACLManager droolssercurity = new DroolsRepositoryACLManager( IdentityFactory.createIdentity( "group1" ) );

        RulesRepository repo = RepositorySessionUtil.getRepository();

        repo.loadDefaultPackage().addAsset( "testsecurityASSET1",
                                            "X" );
        repo.loadDefaultPackage().addAsset( "testsecurityASSET2",
                                            "X" );
        AssetItem item = RepositorySessionUtil.getRepository().loadDefaultPackage().loadAsset( "testsecurityASSET1" );
View Full Code Here

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

        RulesRepository repo = RepositorySessionUtil.getRepository();

        repo.loadDefaultPackage().addAsset( "testsecurityASSET1",
                                            "X" );
        repo.loadDefaultPackage().addAsset( "testsecurityASSET2",
                                            "X" );
        AssetItem item = RepositorySessionUtil.getRepository().loadDefaultPackage().loadAsset( "testsecurityASSET1" );

        droolssercurity.setPermission( item.getUUID(),
                                       AccessManager.READ );
View Full Code Here

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

        DroolsRepositoryACLManager droolssercurity1 = new DroolsRepositoryACLManager( IdentityFactory.createIdentity( "group1" ) );
        DroolsRepositoryACLManager droolssercurity2 = new DroolsRepositoryACLManager( IdentityFactory.createIdentity( "group2" ) );

        RulesRepository repo = RepositorySessionUtil.getRepository();

        repo.loadDefaultPackage().addAsset( "testsecurityASSET3",
                                            "X" );

        AssetItem item = RepositorySessionUtil.getRepository().loadDefaultPackage().loadAsset( "testsecurityASSET3" );

        droolssercurity2.setPermission( item.getUUID(),
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.