Coverage Report - org.apache.maven.doxia.site.decoration.Body
 
Classes in this File Line Coverage Branch Coverage Complexity
Body
36%
34/94
32%
25/76
2,65
 
 1  
 /*
 2  
  =================== DO NOT EDIT THIS FILE ====================
 3  
  Generated by Modello 1.4.1 on 2011-04-27 00:03:43,
 4  
  any modifications will be overwritten.
 5  
  ==============================================================
 6  
  */
 7  
 
 8  
 package org.apache.maven.doxia.site.decoration;
 9  
 
 10  
 /**
 11  
  * The main content decoration.
 12  
  * 
 13  
  * @version $Revision$ $Date$
 14  
  */
 15  
 @SuppressWarnings( "all" )
 16  396
 public class Body
 17  
     implements java.io.Serializable, java.lang.Cloneable
 18  
 {
 19  
 
 20  
       //--------------------------/
 21  
      //- Class/Member Variables -/
 22  
     //--------------------------/
 23  
 
 24  
     /**
 25  
      * Additional content (like Javascript) to include in the HEAD
 26  
      * block of the generated pages.
 27  
      */
 28  
     private Object head;
 29  
 
 30  
     /**
 31  
      * Field links.
 32  
      */
 33  
     private java.util.List<LinkItem> links;
 34  
 
 35  
     /**
 36  
      * Field breadcrumbs.
 37  
      */
 38  
     private java.util.List<LinkItem> breadcrumbs;
 39  
 
 40  
     /**
 41  
      * Field menus.
 42  
      */
 43  
     private java.util.List<Menu> menus;
 44  
 
 45  
     /**
 46  
      * If present, the contained text will be used instead of the
 47  
      * generated copyright text.
 48  
      */
 49  
     private Object footer;
 50  
 
 51  
 
 52  
       //-----------/
 53  
      //- Methods -/
 54  
     //-----------/
 55  
 
 56  
     /**
 57  
      * Method addBreadcrumb.
 58  
      * 
 59  
      * @param linkItem
 60  
      */
 61  
     public void addBreadcrumb( LinkItem linkItem )
 62  
     {
 63  24
         getBreadcrumbs().add( linkItem );
 64  24
     } //-- void addBreadcrumb( LinkItem )
 65  
 
 66  
     /**
 67  
      * Method addLink.
 68  
      * 
 69  
      * @param linkItem
 70  
      */
 71  
     public void addLink( LinkItem linkItem )
 72  
     {
 73  24
         getLinks().add( linkItem );
 74  24
     } //-- void addLink( LinkItem )
 75  
 
 76  
     /**
 77  
      * Method addMenu.
 78  
      * 
 79  
      * @param menu
 80  
      */
 81  
     public void addMenu( Menu menu )
 82  
     {
 83  0
         getMenus().add( menu );
 84  0
     } //-- void addMenu( Menu )
 85  
 
 86  
     /**
 87  
      * Method clone.
 88  
      * 
 89  
      * @return Body
 90  
      */
 91  
     public Body clone()
 92  
     {
 93  
         try
 94  
         {
 95  0
             Body copy = (Body) super.clone();
 96  
 
 97  0
             if ( this.head != null )
 98  
             {
 99  0
                 copy.head = new org.codehaus.plexus.util.xml.Xpp3Dom( (org.codehaus.plexus.util.xml.Xpp3Dom) this.head );
 100  
             }
 101  
 
 102  0
             if ( this.links != null )
 103  
             {
 104  0
                 copy.links = new java.util.ArrayList<LinkItem>();
 105  0
                 for ( LinkItem item : this.links )
 106  
                 {
 107  0
                     copy.links.add( ( (LinkItem) item).clone() );
 108  
                 }
 109  
             }
 110  
 
 111  0
             if ( this.breadcrumbs != null )
 112  
             {
 113  0
                 copy.breadcrumbs = new java.util.ArrayList<LinkItem>();
 114  0
                 for ( LinkItem item : this.breadcrumbs )
 115  
                 {
 116  0
                     copy.breadcrumbs.add( ( (LinkItem) item).clone() );
 117  
                 }
 118  
             }
 119  
 
 120  0
             if ( this.menus != null )
 121  
             {
 122  0
                 copy.menus = new java.util.ArrayList<Menu>();
 123  0
                 for ( Menu item : this.menus )
 124  
                 {
 125  0
                     copy.menus.add( ( (Menu) item).clone() );
 126  
                 }
 127  
             }
 128  
 
 129  0
             if ( this.footer != null )
 130  
             {
 131  0
                 copy.footer = new org.codehaus.plexus.util.xml.Xpp3Dom( (org.codehaus.plexus.util.xml.Xpp3Dom) this.footer );
 132  
             }
 133  
 
 134  0
             return copy;
 135  
         }
 136  0
         catch ( java.lang.Exception ex )
 137  
         {
 138  0
             throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
 139  
                 + " does not support clone()" ).initCause( ex );
 140  
         }
 141  
     } //-- Body clone()
 142  
 
 143  
     /**
 144  
      * Method equals.
 145  
      * 
 146  
      * @param other
 147  
      * @return boolean
 148  
      */
 149  
     public boolean equals( Object other )
 150  
     {
 151  120
         if ( this == other )
 152  
         {
 153  0
             return true;
 154  
         }
 155  
 
 156  120
         if ( !( other instanceof Body ) )
 157  
         {
 158  0
             return false;
 159  
         }
 160  
 
 161  120
         Body that = (Body) other;
 162  120
         boolean result = true;
 163  
 
 164  120
         result = result && ( getHead() == null ? that.getHead() == null : getHead().equals( that.getHead() ) );
 165  120
         result = result && ( getLinks() == null ? that.getLinks() == null : getLinks().equals( that.getLinks() ) );
 166  120
         result = result && ( getBreadcrumbs() == null ? that.getBreadcrumbs() == null : getBreadcrumbs().equals( that.getBreadcrumbs() ) );
 167  120
         result = result && ( getMenus() == null ? that.getMenus() == null : getMenus().equals( that.getMenus() ) );
 168  120
         result = result && ( getFooter() == null ? that.getFooter() == null : getFooter().equals( that.getFooter() ) );
 169  
 
 170  120
         return result;
 171  
     } //-- boolean equals( Object )
 172  
 
 173  
     /**
 174  
      * Method getBreadcrumbs.
 175  
      * 
 176  
      * @return List
 177  
      */
 178  
     public java.util.List<LinkItem> getBreadcrumbs()
 179  
     {
 180  1434
         if ( this.breadcrumbs == null )
 181  
         {
 182  258
             this.breadcrumbs = new java.util.ArrayList<LinkItem>();
 183  
         }
 184  
 
 185  1434
         return this.breadcrumbs;
 186  
     } //-- java.util.List<LinkItem> getBreadcrumbs()
 187  
 
 188  
     /**
 189  
      * Get if present, the contained text will be used instead of
 190  
      * the generated copyright text.
 191  
      * 
 192  
      * @return Object
 193  
      */
 194  
     public Object getFooter()
 195  
     {
 196  240
         return this.footer;
 197  
     } //-- Object getFooter()
 198  
 
 199  
     /**
 200  
      * Get additional content (like Javascript) to include in the
 201  
      * HEAD block of the generated pages.
 202  
      * 
 203  
      * @return Object
 204  
      */
 205  
     public Object getHead()
 206  
     {
 207  642
         return this.head;
 208  
     } //-- Object getHead()
 209  
 
 210  
     /**
 211  
      * Method getLinks.
 212  
      * 
 213  
      * @return List
 214  
      */
 215  
     public java.util.List<LinkItem> getLinks()
 216  
     {
 217  906
         if ( this.links == null )
 218  
         {
 219  204
             this.links = new java.util.ArrayList<LinkItem>();
 220  
         }
 221  
 
 222  906
         return this.links;
 223  
     } //-- java.util.List<LinkItem> getLinks()
 224  
 
 225  
     /**
 226  
      * Method getMenus.
 227  
      * 
 228  
      * @return List
 229  
      */
 230  
     public java.util.List<Menu> getMenus()
 231  
     {
 232  1104
         if ( this.menus == null )
 233  
         {
 234  396
             this.menus = new java.util.ArrayList<Menu>();
 235  
         }
 236  
 
 237  1104
         return this.menus;
 238  
     } //-- java.util.List<Menu> getMenus()
 239  
 
 240  
     /**
 241  
      * Method hashCode.
 242  
      * 
 243  
      * @return int
 244  
      */
 245  
     public int hashCode()
 246  
     {
 247  0
         int result = 17;
 248  
 
 249  0
         result = 37 * result + ( head != null ? head.hashCode() : 0 );
 250  0
         result = 37 * result + ( links != null ? links.hashCode() : 0 );
 251  0
         result = 37 * result + ( breadcrumbs != null ? breadcrumbs.hashCode() : 0 );
 252  0
         result = 37 * result + ( menus != null ? menus.hashCode() : 0 );
 253  0
         result = 37 * result + ( footer != null ? footer.hashCode() : 0 );
 254  
 
 255  0
         return result;
 256  
     } //-- int hashCode()
 257  
 
 258  
     /**
 259  
      * Method removeBreadcrumb.
 260  
      * 
 261  
      * @param linkItem
 262  
      */
 263  
     public void removeBreadcrumb( LinkItem linkItem )
 264  
     {
 265  0
         getBreadcrumbs().remove( linkItem );
 266  0
     } //-- void removeBreadcrumb( LinkItem )
 267  
 
 268  
     /**
 269  
      * Method removeLink.
 270  
      * 
 271  
      * @param linkItem
 272  
      */
 273  
     public void removeLink( LinkItem linkItem )
 274  
     {
 275  0
         getLinks().remove( linkItem );
 276  0
     } //-- void removeLink( LinkItem )
 277  
 
 278  
     /**
 279  
      * Method removeMenu.
 280  
      * 
 281  
      * @param menu
 282  
      */
 283  
     public void removeMenu( Menu menu )
 284  
     {
 285  0
         getMenus().remove( menu );
 286  0
     } //-- void removeMenu( Menu )
 287  
 
 288  
     /**
 289  
      * Set a list of breadcrumbs to display in the navigation.
 290  
      * 
 291  
      * @param breadcrumbs
 292  
      */
 293  
     public void setBreadcrumbs( java.util.List<LinkItem> breadcrumbs )
 294  
     {
 295  312
         this.breadcrumbs = breadcrumbs;
 296  312
     } //-- void setBreadcrumbs( java.util.List )
 297  
 
 298  
     /**
 299  
      * Set if present, the contained text will be used instead of
 300  
      * the generated copyright text.
 301  
      * 
 302  
      * @param footer
 303  
      */
 304  
     public void setFooter( Object footer )
 305  
     {
 306  0
         this.footer = footer;
 307  0
     } //-- void setFooter( Object )
 308  
 
 309  
     /**
 310  
      * Set additional content (like Javascript) to include in the
 311  
      * HEAD block of the generated pages.
 312  
      * 
 313  
      * @param head
 314  
      */
 315  
     public void setHead( Object head )
 316  
     {
 317  228
         this.head = head;
 318  228
     } //-- void setHead( Object )
 319  
 
 320  
     /**
 321  
      * Set a list of links to display in the navigation.
 322  
      * 
 323  
      * @param links
 324  
      */
 325  
     public void setLinks( java.util.List<LinkItem> links )
 326  
     {
 327  366
         this.links = links;
 328  366
     } //-- void setLinks( java.util.List )
 329  
 
 330  
     /**
 331  
      * Set a list of menus to include in the navigation.
 332  
      * 
 333  
      * @param menus
 334  
      */
 335  
     public void setMenus( java.util.List<Menu> menus )
 336  
     {
 337  174
         this.menus = menus;
 338  174
     } //-- void setMenus( java.util.List )
 339  
 
 340  
     /**
 341  
      * Method toString.
 342  
      * 
 343  
      * @return String
 344  
      */
 345  
     public java.lang.String toString()
 346  
     {
 347  0
         StringBuilder buf = new StringBuilder( 128 );
 348  
 
 349  0
         buf.append( "head = '" );
 350  0
         buf.append( getHead() );
 351  0
         buf.append( "'" );
 352  0
         buf.append( "\n" ); 
 353  0
         buf.append( "links = '" );
 354  0
         buf.append( getLinks() );
 355  0
         buf.append( "'" );
 356  0
         buf.append( "\n" ); 
 357  0
         buf.append( "breadcrumbs = '" );
 358  0
         buf.append( getBreadcrumbs() );
 359  0
         buf.append( "'" );
 360  0
         buf.append( "\n" ); 
 361  0
         buf.append( "menus = '" );
 362  0
         buf.append( getMenus() );
 363  0
         buf.append( "'" );
 364  0
         buf.append( "\n" ); 
 365  0
         buf.append( "footer = '" );
 366  0
         buf.append( getFooter() );
 367  0
         buf.append( "'" );
 368  
 
 369  0
         return buf.toString();
 370  
     } //-- java.lang.String toString()
 371  
 
 372  
 }