Package org.drools.guvnor.server.util

Examples of org.drools.guvnor.server.util.TableDisplayHandler


        if ( formats.length > 0 ) {
            it = pkg.listAssetsByFormat( formats );
        } else {
            it = pkg.listAssetsNotOfFormat( AssetFormatHelper.listRegisteredTypes() );
        }
        TableDisplayHandler handler = new TableDisplayHandler( tableConfig );
        log.debug( "time for asset list load: " + (System.currentTimeMillis() - start) );
        return handler.loadRuleListTable( it, skip, numRows );
    }
View Full Code Here


            if ( filter.accept( ai, RoleTypes.PACKAGE_READONLY ) ) {
                resultList.add( ai );
            }
        }

        TableDisplayHandler handler = new TableDisplayHandler( "searchresults" );
        return handler.loadRuleListTable( resultList, skip, numRows );
    }
View Full Code Here

            if ( checkPackagePermissionHelper( filter, ai, RoleTypes.PACKAGE_READONLY ) ) {
                resultList.add( ai );
            }
        }

        TableDisplayHandler handler = new TableDisplayHandler( "searchresults" );
        return handler.loadRuleListTable( resultList, skip, numRows );
    }
View Full Code Here

            if ( checkPackagePermissionHelper( packageFilter, ai, RoleTypes.PACKAGE_READONLY ) || checkCategoryPermissionHelper( categoryFilter, ai, RoleTypes.ANALYST_READ ) ) {
                resultList.add( ai );
            }
        }

        return new TableDisplayHandler( "searchresults" ).loadRuleListTable( resultList, skip, numRows );
    }
View Full Code Here

    @Test
    @Deprecated
    public void testDateFormatting() throws Exception {
        Calendar cal = Calendar.getInstance();
        TableDisplayHandler handler = new TableDisplayHandler( ExplorerNodeConfig.RULE_LIST_TABLE_ID );
        String fmt = handler.formatDate( cal );
        assertNotNull( fmt );

        assertTrue( fmt.length() > 8 );
    }
View Full Code Here

                                                        int numRows,
                                                        String tableConfig) throws SerializationException {

        // First check the user has permission to access this categoryPath.
        if (!serviceSecurity.hasPermissionAnalystReadWithCategoryPathType(categoryPath)) {
            TableDisplayHandler handler = new TableDisplayHandler(tableConfig);
            return handler.loadRuleListTable(new AssetItemPageResult());

        }

        AssetItemPageResult result = getRulesRepository().findAssetsByCategory(categoryPath,
                false,
                skip,
                numRows);
        TableDisplayHandler handler = new TableDisplayHandler(tableConfig);
        return handler.loadRuleListTable(result);

    }
View Full Code Here

                                               RoleTypes.PACKAGE_READONLY ) ) {
                resultList.add( ai );
            }
        }

        TableDisplayHandler handler = new TableDisplayHandler( "searchresults" );
        return handler.loadRuleListTable( resultList,
                                          skip,
                                          numRows );
    }
View Full Code Here

                                                                                                              RoleTypes.ANALYST_READ ) ) {
                resultList.add( ai );
            }
        }

        TableDisplayHandler handler = new TableDisplayHandler( "searchresults" );
        return handler.loadRuleListTable( resultList,
                                          skip,
                                          numRows );
    }
View Full Code Here

        // First check the user has permission to access this categoryPath.
        if ( Contexts.isSessionContextActive() ) {
            if ( !Identity.instance().hasPermission( new CategoryPathType( categoryPath ),
                                                     RoleTypes.ANALYST_READ ) ) {

                TableDisplayHandler handler = new TableDisplayHandler( tableConfig );
                return handler.loadRuleListTable( new AssetPageList() );
            }
        }

        //use AssetItemFilter to enforce package-based permissions.
        //        RepositoryFilter filter = new AssetItemFilter();
        // Filter is null since the permission is checked on category level.
        RepositoryFilter filter = null;
        AssetPageList list = repository.findAssetsByCategory( categoryPath,
                                                              false,
                                                              skip,
                                                              numRows,
                                                              filter );
        TableDisplayHandler handler = new TableDisplayHandler( tableConfig );
        // log.debug("time for load: " + (System.currentTimeMillis() - time) );
        return handler.loadRuleListTable( list );

    }
View Full Code Here

        AssetPageList list = repository.findAssetsByState( stateName,
                                                           false,
                                                           skip,
                                                           numRows,
                                                           filter );
        TableDisplayHandler handler = new TableDisplayHandler( tableConfig );
        // log.debug("time for load: " + (System.currentTimeMillis() - time) );
        return handler.loadRuleListTable( list );

    }
View Full Code Here

TOP

Related Classes of org.drools.guvnor.server.util.TableDisplayHandler

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.