Package org.drools.guvnor.client.rpc

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


                            "desc",
                            cat,
                            "testTextSearch",
                            AssetFormats.DRL );

        QueryPageRequest request = new QueryPageRequest( "testTextRule*",
                                                         false,
                                                         0,
                                                         null );
        PageResponse<QueryPageRow> response;
        response = impl.queryFullText( request );
View Full Code Here


                null);
        asset.updateSubject( "testMetaDataSearch" );
        asset.updateExternalSource( "numberwang");
        asset.checkin( "" );
       
        QueryPageRequest request = new QueryPageRequest( "asset*",
                false,
                0,
                PAGE_SIZE );
       
        RepositoryAssetService repositoryAssetService = new RepositoryAssetService();
        repositoryAssetService.setRulesRepository(impl.getRulesRepository());
        PageResponse<QueryPageRow> response = impl.queryFullText( request );

        assertNotNull( response );
        assertNotNull( response.getPageRowList() );
        assertEquals( 0,
                      response.getStartRowIndex() );
        assertEquals( PAGE_SIZE,
                      response.getPageRowList().size() );
        assertEquals( false,
                response.isTotalRowSizeExact());
        assertFalse( response.isLastPage() );

        request.setStartRowIndex( PAGE_SIZE );
        response = repositoryAssetService.quickFindAsset( request );

        assertNotNull( response );
        assertNotNull( response.getPageRowList() );
        assertEquals( PAGE_SIZE,
View Full Code Here

                            "desc",
                            cat,
                            "testTextSearch",
                            AssetFormats.DRL );

        QueryPageRequest request = new QueryPageRequest( "testTextRule*",
                                                         false,
                                                         0,
                                                         PAGE_SIZE );
        PageResponse<QueryPageRow> response;
        RepositoryAssetService repositoryAssetService = getRepositoryAssetService();
        response = repositoryAssetService.quickFindAsset( request );

        assertNotNull( response );
        assertNotNull( response.getPageRowList() );
        assertEquals( 0,
                      response.getStartRowIndex() );
        assertEquals( PAGE_SIZE,
                      response.getPageRowList().size() );
        assertFalse( response.isLastPage() );

        request.setStartRowIndex( PAGE_SIZE );
        response = impl.queryFullText( request );

        assertNotNull( response );
        assertNotNull( response.getPageRowList() );
        assertEquals( PAGE_SIZE,
View Full Code Here

                            "desc",
                            cat,
                            "testTextSearch",
                            AssetFormats.DRL );

        QueryPageRequest request = new QueryPageRequest( "testTextRule*",
                                                         false,
                                                         0,
                                                         null );
        PageResponse<QueryPageRow> response;
        RepositoryAssetService repositoryAssetService = getRepositoryAssetService();
View Full Code Here

                null);
        asset.updateSubject( "testMetaDataSearch" );
        asset.updateExternalSource( "numberwang");
        asset.checkin( "" );
       
        QueryPageRequest request = new QueryPageRequest( "asset*",
                false,
                0,
                PAGE_SIZE );

        RepositoryAssetService repositoryAssetService = new RepositoryAssetService();
        repositoryAssetService.setRulesRepository(impl.getRulesRepository());
        PageResponse<QueryPageRow> response = repositoryAssetService.quickFindAsset( request );

        assertNotNull( response );
        assertNotNull( response.getPageRowList() );
        assertEquals( 0,
                      response.getStartRowIndex() );
        assertEquals( PAGE_SIZE,
                      response.getPageRowList().size() );
        assertEquals( false,
                response.isTotalRowSizeExact());
        assertFalse( response.isLastPage() );

        request.setStartRowIndex( PAGE_SIZE );
        response = repositoryAssetService.quickFindAsset( request );

        assertNotNull( response );
        assertNotNull( response.getPageRowList() );
        assertEquals( PAGE_SIZE,
View Full Code Here

                            "desc",
                            cat,
                            "testTextSearch",
                            AssetFormats.DRL );

        QueryPageRequest request = new QueryPageRequest( "testTextRule",
                                                         false,
                                                         false,
                                                         0,
                                                         null );
        PageResponse<QueryPageRow> response;
View Full Code Here

                           final OpenItemCommand editEvent) {
        super( PAGE_SIZE,
               editEvent );
        setDataProvider( new AsyncDataProvider<QueryPageRow>() {
            protected void onRangeChanged(HasData<QueryPageRow> display) {
                QueryPageRequest request = new QueryPageRequest();
                request.setSearchText( searchText );
                request.setSearchArchived( searchArchived );
                request.setStartRowIndex( pager.getPageStart() );
                request.setPageSize( pageSize );
                assetService.quickFindAsset( request,
                                                  new GenericCallback<PageResponse<QueryPageRow>>() {
                                                      public void onSuccess(PageResponse<QueryPageRow> response) {
                                                          updateRowCount( response.getTotalRowSize(),
                                                                          response.isTotalRowSizeExact() );
View Full Code Here

     */
    protected void loadShortList(String searchText,
                                 Boolean searchArchived,
                                 final Request r,
                                 final Callback cb) {
        final QueryPageRequest queryRequest = new QueryPageRequest( searchText,
                                                                    searchArchived,
                                                                    0,
                                                                    5 );
        RepositoryServiceFactory.getAssetService().quickFindAsset( queryRequest,
                                                              new GenericCallback<PageResponse<QueryPageRow>>() {
View Full Code Here

    @Test
    @Ignore("To be fixed: GUVNOR-296")
    public void testHistoryAfterReImportSampleRepository() throws Exception {

        QueryPageRequest request;
        PageResponse<QueryPageRow> response;
        ServiceImplementation impl = getServiceImplementation();
        RepositoryPackageService repositoryPackageService = getRepositoryPackageService();
        //Import sample, do a sanity check, make sure sample is installed correctly
        repositoryPackageService.installSampleRepository();
        PackageConfigData[] cfgs = repositoryPackageService.listPackages();
        assertEquals( 2,
                      cfgs.length );
        assertTrue( cfgs[0].getName().equals( "mortgages" ) || cfgs[1].getName().equals( "mortgages" ) );

        request = new QueryPageRequest( "Bankruptcy history",
                                        false,
                                        0,
                                        20 );
        RepositoryAssetService repositoryAssetService = getRepositoryAssetService();
        response = repositoryAssetService.quickFindAsset( request );
        assertEquals( 1,
                      response.getPageRowList().size() );
        String uuid = response.getPageRowList().get( 0 ).getUuid();

        // create version 4.
        RuleAsset ai = repositoryAssetService.loadRuleAsset( uuid );
        ai.setCheckinComment( "version 4" );
        repositoryAssetService.checkinVersion( ai );

        // create version 5.
        ai = repositoryAssetService.loadRuleAsset( uuid );
        ai.setCheckinComment( "version 5" );
        repositoryAssetService.checkinVersion( ai );

        System.out.println( "old uuid: " + uuid );

        //NOTE: Have not figured out the reason, but if we dont create a random package here,
        //we will get an InvalidItemStateException during impl.installSampleRepository()
        impl.getRulesRepository().createPackage( "testHistoryAfterReImportSampleRepository",
                                                 "desc" );

        TableDataResult result = repositoryAssetService.loadItemHistory( uuid );
        assertNotNull( result );
        TableDataRow[] rows = result.data;
        assertEquals( 2,
                      rows.length );

        //Import sample again
        repositoryPackageService.installSampleRepository();

        request = new QueryPageRequest( "Bankruptcy history",
                                        false,
                                        0,
                                        20 );
        response = repositoryAssetService.quickFindAsset( request );
        assertEquals( 1,
View Full Code Here

                            "desc",
                            cat,
                            "testTextSearch",
                            AssetFormats.DRL );

        QueryPageRequest request = new QueryPageRequest( "testTextRule*",
                                                         false,
                                                         0,
                                                         PAGE_SIZE );
        PageResponse<QueryPageRow> response;
        response = impl.queryFullText( request );

        assertNotNull( response );
        assertNotNull( response.getPageRowList() );
        assertEquals( 0,
                      response.getStartRowIndex() );
        assertEquals( PAGE_SIZE,
                      response.getPageRowList().size() );
        assertFalse( response.isLastPage() );

        request.setStartRowIndex( PAGE_SIZE );
        response = impl.queryFullText( request );

        assertNotNull( response );
        assertNotNull( response.getPageRowList() );
        assertEquals( PAGE_SIZE,
View Full Code Here

TOP

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

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.