Package org.drools.guvnor.client.rpc

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


        ServiceImplementation impl = getServiceImplementation();
        impl.createUser( "user1" );
        impl.createUser( "user2" );
        impl.createUser( "user3" );

        PageRequest requestPage1 = new PageRequest( 0,
                                                    PAGE_SIZE );
        PageResponse<PermissionsPageRow> responsePage1 = impl.listUserPermissions( requestPage1 );

        assertNotNull( responsePage1 );
        assertNotNull( responsePage1.getPageRowList() );

        System.out.println( "ListUserPermissionsFullResults-page1" );
        for ( PermissionsPageRow row : responsePage1.getPageRowList() ) {
            System.out.println( "--> Username = " + row.getUserName() );
        }

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

        PageRequest requestPage2 = new PageRequest( PAGE_SIZE,
                                                    PAGE_SIZE );
        PageResponse<PermissionsPageRow> responsePage2 = impl.listUserPermissions( requestPage2 );

        assertNotNull( responsePage2 );
        assertNotNull( responsePage2.getPageRowList() );
View Full Code Here


        ServiceImplementation impl = getServiceImplementation();
        impl.createUser( "user1" );
        impl.createUser( "user2" );
        impl.createUser( "user3" );

        PageRequest request = new PageRequest( 0,
                                               null );
        PageResponse<PermissionsPageRow> response;
        response = impl.listUserPermissions( request );

        assertNotNull( response );
View Full Code Here

        impl.cleanLog();
        impl.createUser( "user1" );
        impl.createUser( "user2" );
        impl.createUser( "user3" );

        PageRequest request = new PageRequest( 0,
                                               PAGE_SIZE );
        PageResponse<LogPageRow> response;
        response = impl.showLog( request );

        assertNotNull( response );
        assertNotNull( response.getPageRowList() );
        assertTrue( response.getStartRowIndex() == 0 );
        assertTrue( response.getPageRowList().size() == PAGE_SIZE );
        assertFalse( response.isLastPage() );

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

        assertNotNull( response );
        assertNotNull( response.getPageRowList() );
        assertTrue( response.getStartRowIndex() == PAGE_SIZE );
View Full Code Here

        impl.cleanLog();
        impl.createUser( "user1" );
        impl.createUser( "user2" );
        impl.createUser( "user3" );

        PageRequest request = new PageRequest( 0,
                                               null );
        PageResponse<LogPageRow> response;
        response = impl.showLog( request );

        assertNotNull( response );
View Full Code Here

        ServiceImplementation impl = getServiceImplementation();
        impl.createUser( "user1" );
        impl.createUser( "user2" );
        impl.createUser( "user3" );

        PageRequest requestPage1 = new PageRequest( 0,
                                                    PAGE_SIZE );
        PageResponse<PermissionsPageRow> responsePage1 = impl.listUserPermissions( requestPage1 );

        assertNotNull( responsePage1 );
        assertNotNull( responsePage1.getPageRowList() );

        System.out.println( "ListUserPermissionsFullResults-page1" );
        for ( PermissionsPageRow row : responsePage1.getPageRowList() ) {
            System.out.println( "--> Username = " + row.getUserName() );
        }

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

        PageRequest requestPage2 = new PageRequest( PAGE_SIZE,
                                                    PAGE_SIZE );
        PageResponse<PermissionsPageRow> responsePage2 = impl.listUserPermissions( requestPage2 );

        assertNotNull( responsePage2 );
        assertNotNull( responsePage2.getPageRowList() );
View Full Code Here

        ServiceImplementation impl = getServiceImplementation();
        impl.createUser( "user1" );
        impl.createUser( "user2" );
        impl.createUser( "user3" );

        PageRequest request = new PageRequest( 0,
                                               null );
        PageResponse<PermissionsPageRow> response;
        response = impl.listUserPermissions( request );

        assertNotNull( response );
View Full Code Here

        impl.cleanLog();
        impl.createUser( "user1" );
        impl.createUser( "user2" );
        impl.createUser( "user3" );

        PageRequest request = new PageRequest( 0,
                                               PAGE_SIZE );
        PageResponse<LogPageRow> response;
        response = impl.showLog( request );

        assertNotNull( response );
        assertNotNull( response.getPageRowList() );
        assertTrue( response.getStartRowIndex() == 0 );
        assertTrue( response.getPageRowList().size() == PAGE_SIZE );
        assertFalse( response.isLastPage() );

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

        assertNotNull( response );
        assertNotNull( response.getPageRowList() );
        assertTrue( response.getStartRowIndex() == PAGE_SIZE );
View Full Code Here

        impl.cleanLog();
        impl.createUser( "user1" );
        impl.createUser( "user2" );
        impl.createUser( "user3" );

        PageRequest request = new PageRequest( 0,
                                               null );
        PageResponse<LogPageRow> response;
        response = impl.showLog( request );

        assertNotNull( response );
View Full Code Here

               openSelectedCommand );
        this.restoreSelectedAssetCommand = restoreSelectedAssetCommand;
        this.deleteSelectedAssetCommand = deleteSelectedAssetCommand;
        setDataProvider( new AsyncDataProvider<AdminArchivedPageRow>() {
            protected void onRangeChanged(HasData<AdminArchivedPageRow> display) {
                PageRequest request = new PageRequest( pager.getPageStart(),
                                                                 pageSize );
                assetService.loadArchivedAssets( request,
                                                      new GenericCallback<PageResponse<AdminArchivedPageRow>>() {
                                                          public void onSuccess(PageResponse<AdminArchivedPageRow> response) {
                                                              updateRowCount( response.getTotalRowSize(),
View Full Code Here

    public LogPagedTable(Command cleanCommand) {
        super( PAGE_SIZE );
        this.cleanCommand = cleanCommand;
        setDataProvider( new AsyncDataProvider<LogPageRow>() {
            protected void onRangeChanged(HasData<LogPageRow> display) {
                PageRequest request = new PageRequest();
                request.setStartRowIndex( pager.getPageStart() );
                request.setPageSize( pageSize );
                repositoryService.showLog( request,
                                                             new GenericCallback<PageResponse<LogPageRow>>() {
                                                                 public void onSuccess(PageResponse<LogPageRow> response) {
                                                                     updateRowCount( response.getTotalRowSize(),
                                                                                     response.isTotalRowSizeExact() );
View Full Code Here

TOP

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

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.