Package org.drools.guvnor.client.rpc

Examples of org.drools.guvnor.client.rpc.RuleAsset


            testManager.create();
            Contexts.getSessionContext().set( "roleBasedPermissionManager",
                                              testManager );

            //now lets see if we can access this asset with the permissions
            @SuppressWarnings("unused")
            RuleAsset asset2 = assetRepositoryService.loadRuleAsset( uuid2 );
            try {
                @SuppressWarnings("unused")
                RuleAsset asset1 = assetRepositoryService.loadRuleAsset( uuid1 );
                fail( "Did not catch expected exception" );
            } catch ( AuthorizationException e ) {
            }
        } finally {
View Full Code Here


            Contexts.getSessionContext().set( "roleBasedPermissionManager",
                                              testManager );

            //now lets see if we can access this asset with the permissions
            //RuleAsset asset2 = impl.loadRuleAsset(uuid2);
            @SuppressWarnings("unused")
            RuleAsset asset1 = assetRepositoryService.loadRuleAsset( uuid1 );
        } finally {
            Lifecycle.endApplication();
        }
    }
View Full Code Here

            testManager.create();
            Contexts.getSessionContext().set( "roleBasedPermissionManager",
                                              testManager );

            // now lets see if we can access this asset with the permissions
            @SuppressWarnings("unused")
            RuleAsset asset = null;
            try {
                asset = assetRepositoryService.loadRuleAsset( uuid );
            } catch ( AuthorizationException e ) {
                fail( "User has permissions for the category" );
View Full Code Here

            Contexts.getSessionContext().set( "roleBasedPermissionManager",
                                              testManager );

            //now lets see if we can access this asset with the permissions
            try {
                RuleAsset asset = assetRepositoryService.loadRuleAsset( uuid );
                fail( "Did not catch expected exception" );
            } catch ( AuthorizationException e ) {
            }
        } finally {
            Lifecycle.endApplication();
View Full Code Here

                                          "this is a description",
                                          "testCheckinWithPackageReadonlyCat",
                                          "testCheckinWithPackageReadonlyPack",
                                          AssetFormats.DRL );

        RuleAsset asset = repositoryAssetService.loadRuleAsset( uuid );
        assertNotNull( asset.lastModified );
        asset.metaData.coverage = "boo";
        asset.content = new RuleContentText();
        ((RuleContentText) asset.content).content = "yeah !";
        Thread.sleep( 100 );
View Full Code Here

                                          "this is a description",
                                          "testCheckinPackageDeveloperCat1",
                                          "testCheckinPackageDeveloperPack1",
                                          AssetFormats.DRL );

        RuleAsset asset = repositoryAssetService.loadRuleAsset( uuid );
        assertNotNull( asset.lastModified );
        asset.metaData.coverage = "boo";
        asset.content = new RuleContentText();
        ((RuleContentText) asset.content).content = "yeah !";
        Thread.sleep( 100 );
View Full Code Here

                      repositoryPackageService.listSnapshots( "testSnapshotDiff" ).length );
        assertEquals( 4,
                      repositoryPackageService.listRulesInPackage( "testSnapshotDiff" ).length );

        // Change the rule, archive one, delete one and create a new one
        RuleAsset asset = repositoryAssetService.loadRuleAsset( modifiedRuleUuid );
        String uuid = repositoryAssetService.checkinVersion( asset );
        assertNotNull( uuid );

        repositoryAssetService.removeAsset( deletedRuleUuid );
View Full Code Here

                      repositoryPackageService.listSnapshots( "snapshotDiffTestingPackage" ).length );
        assertEquals( 4,
                      repositoryPackageService.listRulesInPackage( "snapshotDiffTestingPackage" ).length );

        // Change a rule...
        RuleAsset asset = repositoryAssetService.loadRuleAsset( modifiedRuleUuid );
        String uuid = repositoryAssetService.checkinVersion( asset );
        assertNotNull( uuid );

        //...delete one...
        repositoryAssetService.removeAsset( deletedRuleUuid );
View Full Code Here

                      repositoryPackageService.listSnapshots( "snapshotDiffTestingPackage" ).length );
        assertEquals( 4,
                      repositoryPackageService.listRulesInPackage( "snapshotDiffTestingPackage" ).length );

        // Change a rule...
        RuleAsset asset = repositoryAssetService.loadRuleAsset( modifiedRuleUuid );
        String uuid = repositoryAssetService.checkinVersion( asset );
        assertNotNull( uuid );

        //...delete one...
        repositoryAssetService.removeAsset( deletedRuleUuid );
View Full Code Here

        asset2.checkin( "" );

        RuleModel model2 = new RuleModel();
        assertNull( model2.name );
        RepositoryAssetService repositoryAssetService = getRepositoryAssetService();
        RuleAsset asset = repositoryAssetService.loadRuleAsset( asset2.getUUID() );
        asset.content = (PortableObject) model2;

        repositoryAssetService.checkinVersion( asset );

        asset = repositoryAssetService.loadRuleAsset( asset2.getUUID() );
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.rpc.RuleAsset

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.