Package org.drools.guvnor.client.rpc

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


    public void testArchiveAndUnarchivePackageAndHeader() throws Exception {
        ServiceImplementation impl = getService();
        String uuid = impl.createPackage( "testArchiveAndUnarchivePackageAndHeader",
                                          "a desc" );
        PackageConfigData data = impl.loadPackageConfig( uuid );
        PackageItem it = impl.repository.loadPackageByUUID( uuid );
        data.archived = true;

        AssetItem rule1 = it.addAsset( "rule_1",
                                       "" );
View Full Code Here


    public void testPackageConfSave() throws Exception {
        RepositoryService impl = getService();
        String uuid = impl.createPackage( "testPackageConfSave",
                                          "a desc" );
        PackageConfigData data = impl.loadPackageConfig( uuid );

        data.description = "new desc";
        data.header = "wa";
        data.externalURI = "new URI";
View Full Code Here

        impl.createState( "testState2" );
        impl.changeState( packagUUID,
                          "testState2",
                          true );

        PackageConfigData pkg = impl.loadPackageConfig( packagUUID );
        assertEquals( "testState2",
                      pkg.state );

        asset = impl.loadRuleAsset( ruleUUID2 );
        assertEquals( "testState2",
View Full Code Here

        assertEquals( "X",
                      snaps[0].name );
        assertEquals( "ya",
                      snaps[0].comment );
        assertNotNull( snaps[0].uuid );
        PackageConfigData confSnap = impl.loadPackageConfig( snaps[0].uuid );
        assertEquals( "testSnapshot",
                      confSnap.name );

        impl.createPackageSnapshot( "testSnapshot",
                                    "Y",
View Full Code Here

                           false );

        assertTrue( pkg.getNode().getProperty( "drools:binaryUpToDate" ).getBoolean() );
        assertFalse( impl.ruleBaseCache.containsKey( pkg.getUUID() ) );

        PackageConfigData config = impl.loadPackageConfig( pkg.getUUID() );
        impl.savePackage( config );

        assertFalse( pkg.getNode().getProperty( "drools:binaryUpToDate" ).getBoolean() );
        assertFalse( pkg.isBinaryUpToDate() );
        impl.buildPackage( pkg.getUUID(),
View Full Code Here

        assertEquals( "cheese",
                      p.getLikes() );
    }

    public void testPackageNameSorting() {
        PackageConfigData c1 = new PackageConfigData( "org.foo" );
        PackageConfigData c2 = new PackageConfigData( "org.foo.bar" );

        List<PackageConfigData> ls = new ArrayList<PackageConfigData>();
        ls.add( c2 );
        ls.add( c1 );
        ServiceImplementation serv = new ServiceImplementation();
View Full Code Here

    }

    private void createPackages(ServiceImplementation serv) throws SerializationException {
        String uuid = serv.createPackage( "com.billasurf.manufacturing", "Rules for manufacturing." );

        PackageConfigData conf = serv.loadPackageConfig( uuid );
        conf.header = "import com.billasurf.manuf.materials.*";
        serv.savePackage( conf );

        serv.createPackage( "com.billasurf.manufacturing.plant", "Rules for manufacturing plants." );
        serv.createPackage( "com.billasurf.finance", "All financial rules." );
View Full Code Here

                parentNode );
        return item.getUUID();
    }

    protected PackageConfigData loadPackageConfig(PackageItem packageItem) {
        PackageConfigData data = PackageConfigDataFactory.createPackageConfigDataWithDependencies( packageItem );
        if ( data.isSnapshot() ) {
            data.setSnapshotName( packageItem.getSnapshotName() );
        }
        return data;
    }
View Full Code Here

                                       PackageIterator pkgs) {
        pkgs.setArchivedIterator( archive );
        while (pkgs.hasNext()) {
            PackageItem packageItem = pkgs.next();

            PackageConfigData data = new PackageConfigData();
            data.setUuid( packageItem.getUUID() );
            data.setName( packageItem.getName() );
            data.setArchived( packageItem.isArchived() );
            data.setWorkspaces( packageItem.getWorkspaces() );
            handleIsPackagesListed( archive,
                    workspace,
                    filter,
                    result,
                    data );
View Full Code Here

    }

    protected PackageConfigData loadGlobalPackage() {
        PackageItem item = getRulesRepository().loadGlobalArea();

        PackageConfigData data = PackageConfigDataFactory.createPackageConfigDataWithOutDependencies( item );

        if ( data.isSnapshot() ) {
            data.setSnapshotName( item.getSnapshotName() );
        }

        return data;
    }
View Full Code Here

TOP

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

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.