class DimensionItemPageHandler {

    void addPaginationToNodeIfEnabled( final RootNode rootNode, final WebOptions webOptions,
        final String dimensionUid, final int totalOfItems )
    {
        final boolean isPaginationEnabled = webOptions.hasPaging( false );

        if ( isPaginationEnabled )
        {
            final String apiRelativeUrl = format( RESOURCE_PATH + "/%s/items", dimensionUid );
            final Pager pager = new Pager( webOptions.getPage(), totalOfItems, webOptions.getPageSize() );

            linkService.generatePagerLinks( pager, apiRelativeUrl );
            rootNode.addChild( createPager( pager ) );
        }
    }

      DimensionItemPageHandler( final LinkService linkService );

}