Examples of AssetPageRequest


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

        super( PAGE_SIZE,
                feedURL,
                clientFactory );
        setDataProvider( new AsyncDataProvider<AssetPageRow>() {
            protected void onRangeChanged( HasData<AssetPageRow> display ) {
                AssetPageRequest request = new AssetPageRequest( packageUuid,
                        formatInList,
                        formatIsRegistered,
                        pager.getPageStart(),
                        pageSize );
                assetService.findAssetPage( request,
View Full Code Here

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

                clientFactory );
        this.clientFactory = clientFactory;

        setDataProvider( new AsyncDataProvider<AssetPageRow>() {
            protected void onRangeChanged(HasData<AssetPageRow> display) {
                AssetPageRequest request = new AssetPageRequest( packageUuid,
                                                                 formatInList,
                                                                 formatIsRegistered,
                                                                 pager.getPageStart(),
                                                                 pageSize );
                assetService.findAssetPage( request,
View Full Code Here

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

            final List<String> formatsInList = getFormatsInList( formatList );
            final Boolean formatIsRegistered = getFormatIsRegistered( formatList );

            //Check if there are any assets for the group
            AssetPageRequest request = new AssetPageRequest( packageConfigData.getUuid(),
                                                             formatsInList,
                                                             formatIsRegistered );
            clientFactory.getAssetService().getAssetCount( request,
                                                           new GenericCallback<Long>() {
                                                               public void onSuccess(Long count) {
View Full Code Here

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

            //Load drools.package first if it exists
            try {
                jcrModule.setName(migrationPathManager.normalizePackageName(jcrModule.getName()));
                List<String> formats = new ArrayList<String>();
                formats.add("package");
                AssetPageRequest request = new AssetPageRequest(jcrModule.getUuid(),
                        formats,
                        null,
                        0,
                        10);
                PageResponse<AssetPageRow> response = jcrRepositoryAssetService.findAssetPage(request);
                if (response.getTotalRowSize() > 0) {
                    AssetPageRow row = response.getPageRowList().get(0);
                    AssetItem assetItemJCR = rulesRepository.loadAssetByUUID(row.getUuid());

                    header = assetItemJCR.getContent();
                }

            } catch (SerializationException e) {
                Jcr2VfsMigrationApp.hasErrors = true;
                throw new IllegalStateException(e);
            }


            boolean hasMorePages = true;
            int startRowIndex = 0;
            final int pageSize = 100;
            PageResponse<AssetPageRow> response;
            while (hasMorePages) {
                AssetPageRequest request = new AssetPageRequest(jcrModule.getUuid(),
                        null, // get all formats
                        null,
                        startRowIndex,
                        pageSize);
                String assetName="";
View Full Code Here

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

    public void testFindAssetPageFormatInListAndFormatIsRegisteredIsNotSupported()
                                                                                  throws SerializationException {
        RulesRepository rulesRepository = mock( RulesRepository.class );
        RepositoryAssetOperations repositoryAssetOperations = new RepositoryAssetOperations();
        repositoryAssetOperations.setRulesRepository( rulesRepository );
        AssetPageRequest assetPageRequest = new AssetPageRequest( "uuid",
                                                                  Arrays.asList( "formatInList" ),
                                                                  true,
                                                                  0,
                                                                  10 );
        repositoryAssetOperations.findAssetPage( assetPageRequest );
View Full Code Here

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

    @Test
    public void testFindAssetPageFormatInList() throws SerializationException {
        RulesRepository rulesRepository = mock( RulesRepository.class );
        RepositoryAssetOperations repositoryAssetOperations = new RepositoryAssetOperations();
        repositoryAssetOperations.setRulesRepository( rulesRepository );
        AssetPageRequest assetPageRequest = new AssetPageRequest( "uuid",
                                                                  Arrays.asList( "formatInList" ),
                                                                  null,
                                                                  1,
                                                                  2 );
        PackageItem packageItem = mock( PackageItem.class );
        when( rulesRepository.loadPackageByUUID( Mockito.anyString() ) )
                .thenReturn( packageItem );
        AssetItemIterator assetItemIterator = mock( AssetItemIterator.class );

        when( packageItem.listAssetsByFormat( assetPageRequest.getFormatInList() ) )
                .thenReturn( assetItemIterator );
        PageResponse<AssetPageRow> pageResponse = repositoryAssetOperations
                .findAssetPage( assetPageRequest );
        assertNotNull( pageResponse );
        assertEquals( pageResponse.getStartRowIndex(),
                      1 );
        verify( packageItem ).listAssetsByFormat(
                                                  assetPageRequest.getFormatInList() );
    }
View Full Code Here

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

            final List<String> formatsInList = getFormatsInList( formatList );
            final Boolean formatIsRegistered = getFormatIsRegistered( formatList );

            //Check if there are any assets for the group
            AssetPageRequest request = new AssetPageRequest( packageConfigData.getUuid(),
                                                             formatsInList,
                                                             formatIsRegistered );
            clientFactory.getAssetService().getAssetCount( request,
                                                           new GenericCallback<Long>() {
                                                               public void onSuccess(Long count) {
View Full Code Here

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

            //Load drools.package first if it exists
            try {
                List<String> formats = new ArrayList<String>();
                formats.add("package");
                AssetPageRequest request = new AssetPageRequest(jcrModule.getUuid(),
                        formats,
                        null,
                        0,
                        10);
                PageResponse<AssetPageRow> response = jcrRepositoryAssetService.findAssetPage(request);
                if (response.getTotalRowSize() > 0) {
                    AssetPageRow row = response.getPageRowList().get(0);
                    AssetItem assetItemJCR = rulesRepository.loadAssetByUUID(row.getUuid());

                    header = assetItemJCR.getContent();
                }

            } catch (SerializationException e) {
                Jcr2VfsMigrationApp.hasErrors = true;
                throw new IllegalStateException(e);
            }


            boolean hasMorePages = true;
            int startRowIndex = 0;
            final int pageSize = 100;
            PageResponse<AssetPageRow> response;
            while (hasMorePages) {
                AssetPageRequest request = new AssetPageRequest(jcrModule.getUuid(),
                        null, // get all formats
                        null,
                        startRowIndex,
                        pageSize);
View Full Code Here

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

            final List<String> formatsInList = getFormatsInList( formatList );
            final Boolean formatIsRegistered = getFormatIsRegistered( formatList );

            //Check if there are any assets for the group
            AssetPageRequest request = new AssetPageRequest( packageConfigData.getUuid(),
                                                             formatsInList,
                                                             formatIsRegistered );
            clientFactory.getAssetService().getAssetCount( request,
                                                           new GenericCallback<Long>() {
                                                               public void onSuccess(Long count) {
View Full Code Here

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

            final List<String> formatsInList = getFormatsInList( formatList );
            final Boolean formatIsRegistered = getFormatIsRegistered( formatList );

            //Check if there are any assets for the group
            AssetPageRequest request = new AssetPageRequest( packageConfigData.getUuid(),
                                                             formatsInList,
                                                             formatIsRegistered );
            clientFactory.getAssetService().getAssetCount( request,
                                                           new GenericCallback<Long>() {
                                                               public void onSuccess(Long count) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.