Coverage Report - org.apache.maven.report.projectinfo.TeamListReport
 
Classes in this File Line Coverage Branch Coverage Complexity
TeamListReport
100%
8/8
N/A
4.846
TeamListReport$TeamListRenderer
63%
152/243
39%
43/110
4.846
 
 1  
 package org.apache.maven.report.projectinfo;
 2  
 
 3  
 /*
 4  
  * Licensed to the Apache Software Foundation (ASF) under one
 5  
  * or more contributor license agreements.  See the NOTICE file
 6  
  * distributed with this work for additional information
 7  
  * regarding copyright ownership.  The ASF licenses this file
 8  
  * to you under the Apache License, Version 2.0 (the
 9  
  * "License"); you may not use this file except in compliance
 10  
  * with the License.  You may obtain a copy of the License at
 11  
  *
 12  
  *   http://www.apache.org/licenses/LICENSE-2.0
 13  
  *
 14  
  * Unless required by applicable law or agreed to in writing,
 15  
  * software distributed under the License is distributed on an
 16  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 17  
  * KIND, either express or implied.  See the License for the
 18  
  * specific language governing permissions and limitations
 19  
  * under the License.
 20  
  */
 21  
 
 22  
 import org.apache.commons.lang.SystemUtils;
 23  
 import org.apache.maven.doxia.sink.Sink;
 24  
 import org.apache.maven.model.Contributor;
 25  
 import org.apache.maven.model.Developer;
 26  
 import org.apache.maven.model.Model;
 27  
 import org.codehaus.plexus.i18n.I18N;
 28  
 import org.codehaus.plexus.util.StringUtils;
 29  
 
 30  
 import java.util.ArrayList;
 31  
 import java.util.HashMap;
 32  
 import java.util.Iterator;
 33  
 import java.util.List;
 34  
 import java.util.Locale;
 35  
 import java.util.Map;
 36  
 import java.util.Properties;
 37  
 
 38  
 /**
 39  
  * Generates the Project Team report.
 40  
  *
 41  
  * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton </a>
 42  
  * @version $Id: TeamListReport.java 940663 2010-05-03 22:58:15Z hboutemy $
 43  
  * @since 2.0
 44  
  * @goal project-team
 45  
  */
 46  1
 public class TeamListReport
 47  
     extends AbstractProjectInfoReport
 48  
 {
 49  
     // ----------------------------------------------------------------------
 50  
     // Public methods
 51  
     // ----------------------------------------------------------------------
 52  
 
 53  
     /** {@inheritDoc} */
 54  
     public void executeReport( Locale locale )
 55  
     {
 56  1
         TeamListRenderer r = new TeamListRenderer( getSink(), project.getModel(), i18n, locale );
 57  
 
 58  1
         r.render();
 59  1
     }
 60  
 
 61  
     /** {@inheritDoc} */
 62  
     public String getOutputName()
 63  
     {
 64  2
         return "team-list";
 65  
     }
 66  
 
 67  
     protected String getI18Nsection()
 68  
     {
 69  1
         return "team-list";
 70  
     }
 71  
 
 72  
     // ----------------------------------------------------------------------
 73  
     // Private
 74  
     // ----------------------------------------------------------------------
 75  
 
 76  
     /**
 77  
      * Internal renderer class
 78  
      */
 79  1
     private static class TeamListRenderer
 80  
         extends AbstractProjectInfoRenderer
 81  
     {
 82  
         private static final String PROPERTIES = "properties";
 83  
 
 84  
         private static final String TIME_ZONE = "timeZone";
 85  
 
 86  
         private static final String ROLES = "roles";
 87  
 
 88  
         private static final String ORGANIZATION_URL = "organizationUrl";
 89  
 
 90  
         private static final String ORGANIZATION = "organization";
 91  
 
 92  
         private static final String URL = "url";
 93  
 
 94  
         private static final String EMAIL = "email";
 95  
 
 96  
         private static final String NAME = "name";
 97  
 
 98  
         private static final String ID = "id";
 99  
 
 100  
         private Model model;
 101  
 
 102  1
         private static final String[] EMPTY_STRING_ARRAY = new String[0];
 103  
 
 104  
         TeamListRenderer( Sink sink, Model model, I18N i18n, Locale locale )
 105  
         {
 106  1
             super( sink, i18n, locale );
 107  
 
 108  1
             this.model = model;
 109  1
         }
 110  
 
 111  
         protected String getI18Nsection()
 112  
         {
 113  18
             return "team-list";
 114  
         }
 115  
 
 116  
         /** {@inheritDoc} */
 117  
         public void renderBody()
 118  
         {
 119  1
             startSection( getI18nString( "intro.title" ) );
 120  
 
 121  
             // To handle JS
 122  1
             StringBuffer javascript = new StringBuffer( "function offsetDate(id, offset) {" ).append( SystemUtils.LINE_SEPARATOR );
 123  1
             javascript.append( "    var now = new Date();" ).append( SystemUtils.LINE_SEPARATOR );
 124  1
             javascript.append( "    var nowTime = now.getTime();" ).append( SystemUtils.LINE_SEPARATOR );
 125  1
             javascript.append( "    var localOffset = now.getTimezoneOffset();" ).append( SystemUtils.LINE_SEPARATOR );
 126  1
             javascript.append( "    var developerTime = nowTime + ( offset * 60 * 60 * 1000 )"
 127  
                                + "+ ( localOffset * 60 * 1000 );" ).append( SystemUtils.LINE_SEPARATOR );
 128  1
             javascript.append( "    var developerDate = new Date(developerTime);" ).append( SystemUtils.LINE_SEPARATOR );
 129  1
             javascript.append( SystemUtils.LINE_SEPARATOR );
 130  1
             javascript.append( "    document.getElementById(id).innerHTML = developerDate;" ).append( SystemUtils.LINE_SEPARATOR );
 131  1
             javascript.append( "}" ).append( SystemUtils.LINE_SEPARATOR );
 132  1
             javascript.append( SystemUtils.LINE_SEPARATOR);
 133  1
             javascript.append( "function init(){" ).append( SystemUtils.LINE_SEPARATOR );
 134  
 
 135  
             // Introduction
 136  1
             paragraph( getI18nString( "intro.description1" ) );
 137  1
             paragraph( getI18nString( "intro.description2" ) );
 138  
 
 139  
             // Developer section
 140  1
             List developers = model.getDevelopers();
 141  
 
 142  1
             startSection( getI18nString( "developers.title" ) );
 143  
 
 144  1
             if ( developers == null || developers.isEmpty() )
 145  
             {
 146  0
                 paragraph( getI18nString( "nodeveloper" ) );
 147  
             }
 148  
             else
 149  
             {
 150  1
                 paragraph( getI18nString( "developers.intro" ) );
 151  
 
 152  1
                 startTable();
 153  
 
 154  
                 // By default we think that all headers not required
 155  1
                 Map headersMap = new HashMap();
 156  
                 // set true for headers that are required
 157  1
                 checkRequiredHeaders( headersMap, developers );
 158  1
                 String[] requiredHeaders = getRequiredDevHeaderArray( headersMap );
 159  
 
 160  1
                 tableHeader( requiredHeaders );
 161  
 
 162  
                 // To handle JS
 163  1
                 int developersRows = 0;
 164  1
                 for ( Iterator i = developers.iterator(); i.hasNext(); )
 165  
                 {
 166  1
                     Developer developer = (Developer) i.next();
 167  
 
 168  1
                     renderDeveloper( developer, developersRows, headersMap, javascript );
 169  
 
 170  1
                     developersRows++;
 171  1
                 }
 172  
 
 173  1
                 endTable();
 174  
             }
 175  
 
 176  1
             endSection();
 177  
 
 178  
             // contributors section
 179  1
             List contributors = model.getContributors();
 180  
 
 181  1
             startSection( getI18nString( "contributors.title" ) );
 182  
 
 183  1
             if ( contributors == null || contributors.isEmpty() )
 184  
             {
 185  1
                 paragraph( getI18nString( "nocontributor" ) );
 186  
             }
 187  
             else
 188  
             {
 189  0
                 paragraph( getI18nString( "contributors.intro" ) );
 190  
 
 191  0
                 startTable();
 192  
 
 193  0
                 Map headersMap = new HashMap();
 194  0
                 checkRequiredHeaders( headersMap, contributors );
 195  0
                 String[] requiredHeaders = getRequiredContrHeaderArray( headersMap );
 196  
 
 197  0
                 tableHeader( requiredHeaders );
 198  
 
 199  
                 // To handle JS
 200  0
                 int contributorsRows = 0;
 201  0
                 for ( Iterator i = contributors.iterator(); i.hasNext(); )
 202  
                 {
 203  0
                     Contributor contributor = (Contributor) i.next();
 204  
 
 205  0
                     renderContributor( contributor, contributorsRows, headersMap, javascript );
 206  
 
 207  0
                     contributorsRows++;
 208  0
                 }
 209  
 
 210  0
                 endTable();
 211  
             }
 212  
 
 213  
             // To handle JS
 214  1
             javascript.append( "}" ).append( SystemUtils.LINE_SEPARATOR ).append( SystemUtils.LINE_SEPARATOR )
 215  
                 .append( "window.onLoad = init();" ).append( SystemUtils.LINE_SEPARATOR );
 216  1
             javaScript( javascript.toString() );
 217  
 
 218  1
             endSection();
 219  
 
 220  1
             endSection();
 221  1
         }
 222  
 
 223  
         private void renderDeveloper( Developer developer, int developerRow, Map headersMap, StringBuffer javascript )
 224  
         {
 225  
             // To handle JS
 226  1
             sink.tableRow();
 227  
 
 228  1
             if ( headersMap.get( ID ) == Boolean.TRUE )
 229  
             {
 230  1
                 tableCell( "<a name=\"" + developer.getId() + "\"></a>" + developer.getId(), true );
 231  
             }
 232  1
             if ( headersMap.get( NAME ) == Boolean.TRUE )
 233  
             {
 234  1
                 tableCell( developer.getName() );
 235  
             }
 236  1
             if ( headersMap.get( EMAIL ) == Boolean.TRUE )
 237  
             {
 238  1
                 tableCell( createLinkPatternedText( developer.getEmail(), developer.getEmail() ) );
 239  
             }
 240  1
             if ( headersMap.get( URL ) == Boolean.TRUE )
 241  
             {
 242  0
                 tableCellForUrl( developer.getUrl() );
 243  
             }
 244  1
             if ( headersMap.get( ORGANIZATION ) == Boolean.TRUE )
 245  
             {
 246  1
                 tableCell( developer.getOrganization() );
 247  
             }
 248  1
             if ( headersMap.get( ORGANIZATION_URL ) == Boolean.TRUE )
 249  
             {
 250  0
                 tableCellForUrl( developer.getOrganizationUrl() );
 251  
             }
 252  1
             if ( headersMap.get( ROLES ) == Boolean.TRUE )
 253  
             {
 254  1
                 if ( developer.getRoles() != null )
 255  
                 {
 256  
                     // Comma separated roles
 257  1
                     tableCell( StringUtils.join( developer.getRoles().toArray( EMPTY_STRING_ARRAY ), ", " ) );
 258  
                 }
 259  
                 else
 260  
                 {
 261  0
                     tableCell( null );
 262  
                 }
 263  
             }
 264  1
             if ( headersMap.get( TIME_ZONE ) == Boolean.TRUE )
 265  
             {
 266  1
                 tableCell( developer.getTimezone() );
 267  
 
 268  
                 // To handle JS
 269  1
                 sink.tableCell();
 270  1
                 sink.rawText( "<span id=\"developer-" + developerRow + "\">" );
 271  1
                 text( developer.getTimezone() );
 272  1
                 if ( !StringUtils.isEmpty( developer.getTimezone() ) )
 273  
                 {
 274  1
                     javascript.append( "    offsetDate('developer-" ).append( developerRow ).append( "', '" );
 275  1
                     javascript.append( developer.getTimezone() );
 276  1
                     javascript.append( "');" ).append( SystemUtils.LINE_SEPARATOR );
 277  
                 }
 278  1
                 sink.rawText( "</span>" );
 279  1
                 sink.tableCell_();
 280  
             }
 281  
 
 282  1
             if ( headersMap.get( PROPERTIES ) == Boolean.TRUE )
 283  
             {
 284  0
                 Properties props = developer.getProperties();
 285  0
                 if ( props != null )
 286  
                 {
 287  0
                     tableCell( propertiesToString( props ) );
 288  
                 }
 289  
                 else
 290  
                 {
 291  0
                     tableCell( null );
 292  
                 }
 293  
             }
 294  
 
 295  1
             sink.tableRow_();
 296  1
         }
 297  
 
 298  
         private void renderContributor( Contributor contributor, int contributorRow, Map headersMap,
 299  
                                         StringBuffer javascript )
 300  
         {
 301  0
             sink.tableRow();
 302  0
             if ( headersMap.get( NAME ) == Boolean.TRUE )
 303  
             {
 304  0
                 tableCell( contributor.getName() );
 305  
             }
 306  0
             if ( headersMap.get( EMAIL ) == Boolean.TRUE )
 307  
             {
 308  0
                 tableCell( createLinkPatternedText( contributor.getEmail(), contributor.getEmail() ) );
 309  
             }
 310  0
             if ( headersMap.get( URL ) == Boolean.TRUE )
 311  
             {
 312  0
                 tableCellForUrl( contributor.getUrl() );
 313  
             }
 314  0
             if ( headersMap.get( ORGANIZATION ) == Boolean.TRUE )
 315  
             {
 316  0
                 tableCell( contributor.getOrganization() );
 317  
             }
 318  0
             if ( headersMap.get( ORGANIZATION_URL ) == Boolean.TRUE )
 319  
             {
 320  0
                 tableCellForUrl( contributor.getOrganizationUrl() );
 321  
             }
 322  0
             if ( headersMap.get( ROLES ) == Boolean.TRUE )
 323  
             {
 324  0
                 if ( contributor.getRoles() != null )
 325  
                 {
 326  
                     // Comma separated roles
 327  0
                     tableCell( StringUtils.join( contributor.getRoles().toArray( EMPTY_STRING_ARRAY ), ", " ) );
 328  
                 }
 329  
                 else
 330  
                 {
 331  0
                     tableCell( null );
 332  
                 }
 333  
 
 334  
             }
 335  0
             if ( headersMap.get( TIME_ZONE ) == Boolean.TRUE )
 336  
             {
 337  0
                 tableCell( contributor.getTimezone() );
 338  
 
 339  
                 // To handle JS
 340  0
                 sink.tableCell();
 341  0
                 sink.rawText( "<span id=\"contributor-" + contributorRow + "\">" );
 342  0
                 text( contributor.getTimezone() );
 343  0
                 if ( !StringUtils.isEmpty( contributor.getTimezone() ) )
 344  
                 {
 345  0
                     javascript.append( "    offsetDate('contributor-" ).append( contributorRow )
 346  
                         .append( "', '" );
 347  0
                     javascript.append( contributor.getTimezone() );
 348  0
                     javascript.append( "');" ).append( SystemUtils.LINE_SEPARATOR );
 349  
                 }
 350  0
                 sink.rawText( "</span>" );
 351  0
                 sink.tableCell_();
 352  
             }
 353  
 
 354  0
             if ( headersMap.get( PROPERTIES ) == Boolean.TRUE )
 355  
             {
 356  0
                 Properties props = contributor.getProperties();
 357  0
                 if ( props != null )
 358  
                 {
 359  0
                     tableCell( propertiesToString( props ) );
 360  
                 }
 361  
                 else
 362  
                 {
 363  0
                     tableCell( null );
 364  
                 }
 365  
             }
 366  
 
 367  0
             sink.tableRow_();
 368  0
         }
 369  
 
 370  
         /**
 371  
          * @param requiredHeaders
 372  
          * @return
 373  
          */
 374  
         private String[] getRequiredContrHeaderArray( Map requiredHeaders )
 375  
         {
 376  0
             List requiredArray = new ArrayList();
 377  0
             String name = getI18nString( "contributors.name" );
 378  0
             String email = getI18nString( "contributors.email" );
 379  0
             String url = getI18nString( "contributors.url" );
 380  0
             String organization = getI18nString( "contributors.organization" );
 381  0
             String organizationUrl = getI18nString( "contributors.organizationurl" );
 382  0
             String roles = getI18nString( "contributors.roles" );
 383  0
             String timeZone = getI18nString( "contributors.timezone" );
 384  0
             String actualTime = getI18nString( "contributors.actualtime" );
 385  0
             String properties = getI18nString( "contributors.properties" );
 386  
 
 387  0
             setRequiredArray( requiredHeaders, requiredArray, name, email, url, organization, organizationUrl, roles,
 388  
                               timeZone, actualTime, properties );
 389  
 
 390  0
             String[] array = new String[requiredArray.size()];
 391  0
             for ( int i = 0; i < array.length; i++ )
 392  
             {
 393  0
                 array[i] = (String) requiredArray.get( i );
 394  
             }
 395  
 
 396  0
             return array;
 397  
         }
 398  
 
 399  
         /**
 400  
          * @param requiredHeaders
 401  
          * @return
 402  
          */
 403  
         private String[] getRequiredDevHeaderArray( Map requiredHeaders )
 404  
         {
 405  1
             List requiredArray = new ArrayList();
 406  
 
 407  1
             String id = getI18nString( "developers.id" );
 408  1
             String name = getI18nString( "developers.name" );
 409  1
             String email = getI18nString( "developers.email" );
 410  1
             String url = getI18nString( "developers.url" );
 411  1
             String organization = getI18nString( "developers.organization" );
 412  1
             String organizationUrl = getI18nString( "developers.organizationurl" );
 413  1
             String roles = getI18nString( "developers.roles" );
 414  1
             String timeZone = getI18nString( "developers.timezone" );
 415  1
             String actualTime = getI18nString( "developers.actualtime" );
 416  1
             String properties = getI18nString( "developers.properties" );
 417  
 
 418  1
             if ( requiredHeaders.get( ID ) == Boolean.TRUE )
 419  
             {
 420  1
                 requiredArray.add( id );
 421  
             }
 422  
 
 423  1
             setRequiredArray( requiredHeaders, requiredArray, name, email, url, organization, organizationUrl, roles,
 424  
                               timeZone, actualTime, properties );
 425  
 
 426  1
             String[] array = new String[requiredArray.size()];
 427  8
             for ( int i = 0; i < array.length; i++ )
 428  
             {
 429  7
                 array[i] = (String) requiredArray.get( i );
 430  
             }
 431  
 
 432  1
             return array;
 433  
         }
 434  
 
 435  
         /**
 436  
          * @param requiredHeaders
 437  
          * @param requiredArray
 438  
          * @param name
 439  
          * @param email
 440  
          * @param url
 441  
          * @param organization
 442  
          * @param organizationUrl
 443  
          * @param roles
 444  
          * @param timeZone
 445  
          * @param actualTime
 446  
          * @param properties
 447  
          */
 448  
         private void setRequiredArray( Map requiredHeaders, List requiredArray, String name, String email, String url,
 449  
                                        String organization, String organizationUrl, String roles, String timeZone,
 450  
                                        String actualTime, String properties )
 451  
         {
 452  1
             if ( requiredHeaders.get( NAME ) == Boolean.TRUE )
 453  
             {
 454  1
                 requiredArray.add( name );
 455  
             }
 456  1
             if ( requiredHeaders.get( EMAIL ) == Boolean.TRUE )
 457  
             {
 458  1
                 requiredArray.add( email );
 459  
             }
 460  1
             if ( requiredHeaders.get( URL ) == Boolean.TRUE )
 461  
             {
 462  0
                 requiredArray.add( url );
 463  
             }
 464  1
             if ( requiredHeaders.get( ORGANIZATION ) == Boolean.TRUE )
 465  
             {
 466  1
                 requiredArray.add( organization );
 467  
             }
 468  1
             if ( requiredHeaders.get( ORGANIZATION_URL ) == Boolean.TRUE )
 469  
             {
 470  0
                 requiredArray.add( organizationUrl );
 471  
             }
 472  1
             if ( requiredHeaders.get( ROLES ) == Boolean.TRUE )
 473  
             {
 474  1
                 requiredArray.add( roles );
 475  
             }
 476  1
             if ( requiredHeaders.get( TIME_ZONE ) == Boolean.TRUE )
 477  
             {
 478  1
                 requiredArray.add( timeZone );
 479  1
                 requiredArray.add( actualTime );
 480  
             }
 481  
 
 482  1
             if ( requiredHeaders.get( PROPERTIES ) == Boolean.TRUE )
 483  
             {
 484  0
                 requiredArray.add( properties );
 485  
             }
 486  1
         }
 487  
 
 488  
         /**
 489  
          * @param requiredHeaders
 490  
          * @param units
 491  
          */
 492  
         private void checkRequiredHeaders( Map requiredHeaders, List units )
 493  
         {
 494  1
             requiredHeaders.put( ID, Boolean.FALSE );
 495  1
             requiredHeaders.put( NAME, Boolean.FALSE );
 496  1
             requiredHeaders.put( EMAIL, Boolean.FALSE );
 497  1
             requiredHeaders.put( URL, Boolean.FALSE );
 498  1
             requiredHeaders.put( ORGANIZATION, Boolean.FALSE );
 499  1
             requiredHeaders.put( ORGANIZATION_URL, Boolean.FALSE );
 500  1
             requiredHeaders.put( ROLES, Boolean.FALSE );
 501  1
             requiredHeaders.put( TIME_ZONE, Boolean.FALSE );
 502  1
             requiredHeaders.put( PROPERTIES, Boolean.FALSE );
 503  
 
 504  1
             for ( Iterator i = units.iterator(); i.hasNext(); )
 505  
             {
 506  1
                 Object unit = i.next();
 507  1
                 String name = null;
 508  1
                 String email = null;
 509  1
                 String url = null;
 510  1
                 String organization = null;
 511  1
                 String organizationUrl = null;
 512  1
                 List roles = null;
 513  1
                 String timeZone = null;
 514  1
                 Properties properties = null;
 515  
 
 516  1
                 if ( unit.getClass().getName().equals( Contributor.class.getName() ) )
 517  
                 {
 518  0
                     Contributor contributor = (Contributor) unit;
 519  0
                     name = contributor.getName();
 520  0
                     email = contributor.getEmail();
 521  0
                     url = contributor.getUrl();
 522  0
                     organization = contributor.getOrganization();
 523  0
                     organizationUrl = contributor.getOrganizationUrl();
 524  0
                     roles = contributor.getRoles();
 525  0
                     timeZone = contributor.getTimezone();
 526  0
                     properties = contributor.getProperties();
 527  0
                 }
 528  
                 else
 529  
                 {
 530  1
                     Developer developer = (Developer) unit;
 531  1
                     name = developer.getName();
 532  1
                     email = developer.getEmail();
 533  1
                     url = developer.getUrl();
 534  1
                     organization = developer.getOrganization();
 535  1
                     organizationUrl = developer.getOrganizationUrl();
 536  1
                     roles = developer.getRoles();
 537  1
                     timeZone = developer.getTimezone();
 538  1
                     properties = developer.getProperties();
 539  1
                     if ( StringUtils.isNotEmpty( developer.getId() ) )
 540  
                     {
 541  1
                         requiredHeaders.put( ID, Boolean.TRUE );
 542  
                     }
 543  
                 }
 544  1
                 if ( StringUtils.isNotEmpty( name ) )
 545  
                 {
 546  1
                     requiredHeaders.put( NAME, Boolean.TRUE );
 547  
                 }
 548  1
                 if ( StringUtils.isNotEmpty( email ) )
 549  
                 {
 550  1
                     requiredHeaders.put( EMAIL, Boolean.TRUE );
 551  
                 }
 552  1
                 if ( StringUtils.isNotEmpty( url ) )
 553  
                 {
 554  0
                     requiredHeaders.put( URL, Boolean.TRUE );
 555  
                 }
 556  1
                 if ( StringUtils.isNotEmpty( organization ) )
 557  
                 {
 558  1
                     requiredHeaders.put( ORGANIZATION, Boolean.TRUE );
 559  
                 }
 560  1
                 if ( StringUtils.isNotEmpty( organizationUrl ) )
 561  
                 {
 562  0
                     requiredHeaders.put( ORGANIZATION_URL, Boolean.TRUE );
 563  
                 }
 564  1
                 if ( null != roles && !roles.isEmpty() )
 565  
                 {
 566  1
                     requiredHeaders.put( ROLES, Boolean.TRUE );
 567  
                 }
 568  1
                 if ( StringUtils.isNotEmpty( timeZone ) )
 569  
                 {
 570  1
                     requiredHeaders.put( TIME_ZONE, Boolean.TRUE );
 571  
                 }
 572  1
                 if ( null != properties && !properties.isEmpty() )
 573  
                 {
 574  0
                     requiredHeaders.put( PROPERTIES, Boolean.TRUE );
 575  
                 }
 576  1
             }
 577  1
         }
 578  
 
 579  
         /**
 580  
          * Create a table cell with a link to the given url. The url is not validated.
 581  
          *
 582  
          * @param url
 583  
          */
 584  
         private void tableCellForUrl( String url )
 585  
         {
 586  0
             sink.tableCell();
 587  
 
 588  0
             if ( StringUtils.isEmpty( url ) )
 589  
             {
 590  0
                 text( url );
 591  
             }
 592  
             else
 593  
             {
 594  0
                 link( url, url );
 595  
             }
 596  
 
 597  0
             sink.tableCell_();
 598  0
         }
 599  
     }
 600  
 }