Package org.drools.guvnor.client.rpc

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


        return row;
    }

    private TableDataResult createArchivedTable(List<TableDataRow> result,
            AssetItemIterator it) {
        TableDataResult table = new TableDataResult();
        table.data = result.toArray(new TableDataRow[result.size()]);
        table.currentPosition = it.getPosition();
        table.total = it.getSize();
        table.hasNext = it.hasNext();
        return table;
View Full Code Here


                    versionNumber)) {
                result.add(createHistoricalRow(historical));
            }
        }

        TableDataResult table = new TableDataResult();
        table.data = result.toArray(new TableDataRow[result.size()]);

        return table;
    }
View Full Code Here

        return row;
    }

    private TableDataResult createArchivedTable(List<TableDataRow> result,
            AssetItemIterator it) {
        TableDataResult table = new TableDataResult();
        table.data = result.toArray(new TableDataRow[result.size()]);
        table.currentPosition = it.getPosition();
        table.total = it.getSize();
        table.hasNext = it.hasNext();
        return table;
View Full Code Here

        ASSET_LIST = new RowLoader(tableconfig);
    }

    public TableDataResult loadRuleListTable(AssetItemPageResult list) throws SerializationException {
        List<TableDataRow> data = loadRows(list.assets.iterator(), -1);
        TableDataResult result = new TableDataResult();
        result.data = data.toArray(new TableDataRow[data.size()]);
        result.currentPosition = list.currentPosition;
        result.hasNext = list.hasNext;
        return result;
    }
View Full Code Here

    private TableDataResult loadRuleListTable(
            List<AssetItem> assetList, long curPos, boolean hasNext)
            throws SerializationException {
        List<TableDataRow> data = loadRows(assetList.iterator(), -1);
        TableDataResult result = new TableDataResult();
        result.data = data.toArray(new TableDataRow[data.size()]);
        result.currentPosition = curPos;
        result.hasNext = hasNext;
        return result;
    }
View Full Code Here

    public TableDataResult loadRuleListTable(AssetItemIterator it, int skip, int numRows) {
        if (numRows != -1) {
            it.skip(skip);
        }
        List<TableDataRow> data = loadRows(it, numRows);
        TableDataResult result = new TableDataResult();
        result.data = data.toArray(new TableDataRow[data.size()]);
        result.total = it.getSize();
        result.hasNext = it.hasNext();
        result.currentPosition = it.getPosition();
        return result;
View Full Code Here

            AssetItem as = impl.getRulesRepository().loadDefaultPackage().addAsset( "testLoadInbox",
                                                                                    "" );
            as.checkin( "" );
            RuleAsset ras = assetServiceImpl.loadRuleAsset( as.getUUID() );

            TableDataResult res = impl.loadInbox( ExplorerNodeConfig.RECENT_EDITED_ID );
            boolean found = false;
            for ( TableDataRow row : res.data ) {
                if ( row.id.equals( ras.getUuid() ) ) found = true;
            }
            assertTrue( found );
View Full Code Here

                            "ya",
                            "testRuleTableLoad",
                            "testRuleTableLoad",
                            "rule" );

        TableDataResult result = repositoryCategoryService.loadRuleListForCategories( "testRuleTableLoad",
                                                                                      0,
                                                                                      -1,
                                                                                      ExplorerNodeConfig.RULE_LIST_TABLE_ID );
        assertEquals( 2,
                      result.data.length );
View Full Code Here

                                           "x",
                                           cat,
                                           "testListByFormat",
                                           "testListByFormat" );
        RepositoryAssetService repositoryAssetService = getRepositoryAssetService();
        TableDataResult res = repositoryAssetService.listAssets( pkgUUID,
                                                                 arr( "testListByFormat" ),
                                                                 0,
                                                                 -1,
                                                                 ExplorerNodeConfig.RULE_LIST_TABLE_ID );
        assertEquals( 4,
                      res.data.length );
        assertEquals( uuid,
                      res.data[0].id );
        assertEquals( "testListByFormat",
                      res.data[0].values[0] );

        res = repositoryAssetService.listAssets( pkgUUID,
                                                 arr( "testListByFormat" ),
                                                 0,
                                                 4,
                                                 ExplorerNodeConfig.RULE_LIST_TABLE_ID );
        assertEquals( 4,
                      res.data.length );

        res = repositoryAssetService.listAssets( pkgUUID,
                                                 arr( "testListByFormat" ),
                                                 0,
                                                 2,
                                                 ExplorerNodeConfig.RULE_LIST_TABLE_ID );
        assertEquals( 2,
                      res.data.length );
        assertEquals( uuid,
                      res.data[0].id );
        assertEquals( 4,
                      res.total );
        assertTrue( res.hasNext );

        res = repositoryAssetService.listAssets( pkgUUID,
                                                 arr( "testListByFormat" ),
                                                 2,
                                                 2,
                                                 ExplorerNodeConfig.RULE_LIST_TABLE_ID );
        assertEquals( 2,
                      res.data.length );
        assertEquals( uuid3,
                      res.data[0].id );
        assertEquals( 4,
                      res.total );
        assertFalse( res.hasNext );

        uuid = impl.createNewRule( "testListByFormat5",
                                   "x",
                                   cat,
                                   "testListByFormat",
                                   "otherFormat" );

        res = repositoryAssetService.listAssets( pkgUUID,
                                                 arr( "otherFormat" ),
                                                 0,
                                                 40,
                                                 ExplorerNodeConfig.RULE_LIST_TABLE_ID );
        assertEquals( 1,
                      res.data.length );
        assertEquals( uuid,
                      res.data[0].id );

        res = repositoryAssetService.listAssets( pkgUUID,
                                                 new String[]{"otherFormat", "testListByFormat"},
                                                 0,
                                                 40,
                                                 ExplorerNodeConfig.RULE_LIST_TABLE_ID );
        assertEquals( 5,
                      res.data.length );

        TableDataResult result = repositoryAssetService.quickFindAsset( "testListByForma",
                                                                        false,
                                                                        0,
                                                                        5 );
        assertEquals( 5,
                      result.data.length );
View Full Code Here

                                          "desc",
                                          cat,
                                          "testQuickFind",
                                          AssetFormats.DRL );
        RepositoryAssetService repositoryAssetService = getRepositoryAssetService();
        TableDataResult res = repositoryAssetService.quickFindAsset( "testQuickFindmyRule",
                                                                     false,
                                                                     0,
                                                                     20 );
        assertEquals( 1,
                      res.data.length );
View Full Code Here

TOP

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

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.