Package org.drools.repository

Examples of org.drools.repository.RepositoryFilter.accept()


        List<AdminArchivedPageRow> rowList = new ArrayList<AdminArchivedPageRow>();
        while ( iterator.hasNext() && (pageSize == null || rowList.size() < pageSize) ) {
            AssetItem archivedAssetItem = (AssetItem) iterator.next();

            // Filter surplus assets
            if ( filter.accept( archivedAssetItem,
                                "read" ) ) {

                // Cannot use AssetItemIterator.skip() as it skips non-filtered
                // assets whereas startRowIndex is the index of the
                // first displayed asset (i.e. filtered)
View Full Code Here


        int count = 0;
        while ( it.hasNext() ) {

            AssetItem archived = (AssetItem) it.next();

            if ( filter.accept( archived, "read" ) ) {
                result.add( createArchivedRow( archived ) );
                count++;
            }
            if ( count == numRows ) {
                break;
View Full Code Here

        RepositoryFilter filter = new AssetItemFilter();

        while ( it.hasNext() ) {
            AssetItem ai = it.next();
            if ( filter.accept( ai, RoleTypes.PACKAGE_READONLY ) ) {
                resultList.add( ai );
            }
        }

        TableDisplayHandler handler = new TableDisplayHandler( "searchresults" );
View Full Code Here

        List<AdminArchivedPageRow> rowList = new ArrayList<AdminArchivedPageRow>();
        while ( iterator.hasNext() && (pageSize == null || rowList.size() < pageSize) ) {
            AssetItem archivedAssetItem = (AssetItem) iterator.next();

            // Filter surplus assets
            if ( filter.accept( archivedAssetItem,
                                "read" ) ) {

                // Cannot use AssetItemIterator.skip() as it skips non-filtered
                // assets whereas startRowIndex is the index of the
                // first displayed asset (i.e. filtered)
View Full Code Here

        int count = 0;
        while ( it.hasNext() ) {

            AssetItem archived = (AssetItem) it.next();

            if ( filter.accept( archived,
                                "read" ) ) {
                TableDataRow row = new TableDataRow();
                row.id = archived.getUUID();
                row.values = new String[5];
View Full Code Here

        for ( int i = 0; i < max; i++ ) {
            if ( !it.hasNext() ) {
                break;
            }
            AssetItem item = (AssetItem) it.next();
            if ( filter.accept( item,
                                RoleTypes.PACKAGE_READONLY ) ) {
                TableDataRow row = new TableDataRow();
                row.id = item.getUUID();
                String desc = item.getDescription() + "";
                row.values = new String[]{item.getName(), desc.substring( 0,
View Full Code Here

                resultList.add( row );
            }
        }

        while ( it.hasNext() ) {
            if ( filter.accept( (AssetItem) it.next(),
                                RoleTypes.PACKAGE_READONLY ) ) {
                TableDataRow empty = new TableDataRow();
                empty.id = "MORE";
                resultList.add( empty );
                break;
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.