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