View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 2.1.2,
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 String 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 String footer;
48  
49  
50        //-----------/
51       //- Methods -/
52      //-----------/
53  
54      /**
55       * Method addBreadcrumb.
56       * 
57       * @param linkItem a linkItem object.
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 a linkItem object.
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 a menu object.
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.links != null )
96              {
97                  copy.links = new java.util.ArrayList<LinkItem>();
98                  for ( LinkItem item : this.links )
99                  {
100                     copy.links.add( ( (LinkItem) item).clone() );
101                 }
102             }
103 
104             if ( this.breadcrumbs != null )
105             {
106                 copy.breadcrumbs = new java.util.ArrayList<LinkItem>();
107                 for ( LinkItem item : this.breadcrumbs )
108                 {
109                     copy.breadcrumbs.add( ( (LinkItem) item).clone() );
110                 }
111             }
112 
113             if ( this.menus != null )
114             {
115                 copy.menus = new java.util.ArrayList<Menu>();
116                 for ( Menu item : this.menus )
117                 {
118                     copy.menus.add( ( (Menu) item).clone() );
119                 }
120             }
121 
122             return copy;
123         }
124         catch ( java.lang.Exception ex )
125         {
126             throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
127                 + " does not support clone()" ).initCause( ex );
128         }
129     } //-- Body clone()
130 
131     /**
132      * Method equals.
133      * 
134      * @param other a other object.
135      * @return boolean
136      */
137     public boolean equals( Object other )
138     {
139         if ( this == other )
140         {
141             return true;
142         }
143 
144         if ( !( other instanceof Body ) )
145         {
146             return false;
147         }
148 
149         Body that = (Body) other;
150         boolean result = true;
151 
152         result = result && ( getHead() == null ? that.getHead() == null : getHead().equals( that.getHead() ) );
153         result = result && ( getLinks() == null ? that.getLinks() == null : getLinks().equals( that.getLinks() ) );
154         result = result && ( getBreadcrumbs() == null ? that.getBreadcrumbs() == null : getBreadcrumbs().equals( that.getBreadcrumbs() ) );
155         result = result && ( getMenus() == null ? that.getMenus() == null : getMenus().equals( that.getMenus() ) );
156         result = result && ( getFooter() == null ? that.getFooter() == null : getFooter().equals( that.getFooter() ) );
157 
158         return result;
159     } //-- boolean equals( Object )
160 
161     /**
162      * Method getBreadcrumbs.
163      * 
164      * @return List
165      */
166     public java.util.List<LinkItem> getBreadcrumbs()
167     {
168         if ( this.breadcrumbs == null )
169         {
170             this.breadcrumbs = new java.util.ArrayList<LinkItem>();
171         }
172 
173         return this.breadcrumbs;
174     } //-- java.util.List<LinkItem> getBreadcrumbs()
175 
176     /**
177      * Get if present, the contained text will be used instead of
178      * the generated copyright text.
179      * 
180      * @return String
181      */
182     public String getFooter()
183     {
184         return this.footer;
185     } //-- String getFooter()
186 
187     /**
188      * Get additional content (like JavaScript) to include in the
189      * HEAD block of the generated pages.
190      * 
191      * @return String
192      */
193     public String getHead()
194     {
195         return this.head;
196     } //-- String getHead()
197 
198     /**
199      * Method getLinks.
200      * 
201      * @return List
202      */
203     public java.util.List<LinkItem> getLinks()
204     {
205         if ( this.links == null )
206         {
207             this.links = new java.util.ArrayList<LinkItem>();
208         }
209 
210         return this.links;
211     } //-- java.util.List<LinkItem> getLinks()
212 
213     /**
214      * Method getMenus.
215      * 
216      * @return List
217      */
218     public java.util.List<Menu> getMenus()
219     {
220         if ( this.menus == null )
221         {
222             this.menus = new java.util.ArrayList<Menu>();
223         }
224 
225         return this.menus;
226     } //-- java.util.List<Menu> getMenus()
227 
228     /**
229      * Method hashCode.
230      * 
231      * @return int
232      */
233     public int hashCode()
234     {
235         int result = 17;
236 
237         result = 37 * result + ( head != null ? head.hashCode() : 0 );
238         result = 37 * result + ( links != null ? links.hashCode() : 0 );
239         result = 37 * result + ( breadcrumbs != null ? breadcrumbs.hashCode() : 0 );
240         result = 37 * result + ( menus != null ? menus.hashCode() : 0 );
241         result = 37 * result + ( footer != null ? footer.hashCode() : 0 );
242 
243         return result;
244     } //-- int hashCode()
245 
246     /**
247      * Method removeBreadcrumb.
248      * 
249      * @param linkItem a linkItem object.
250      */
251     public void removeBreadcrumb( LinkItem linkItem )
252     {
253         getBreadcrumbs().remove( linkItem );
254     } //-- void removeBreadcrumb( LinkItem )
255 
256     /**
257      * Method removeLink.
258      * 
259      * @param linkItem a linkItem object.
260      */
261     public void removeLink( LinkItem linkItem )
262     {
263         getLinks().remove( linkItem );
264     } //-- void removeLink( LinkItem )
265 
266     /**
267      * Method removeMenu.
268      * 
269      * @param menu a menu object.
270      */
271     public void removeMenu( Menu menu )
272     {
273         getMenus().remove( menu );
274     } //-- void removeMenu( Menu )
275 
276     /**
277      * Set a list of breadcrumbs to display in the navigation.
278      * 
279      * @param breadcrumbs a breadcrumbs object.
280      */
281     public void setBreadcrumbs( java.util.List<LinkItem> breadcrumbs )
282     {
283         this.breadcrumbs = breadcrumbs;
284     } //-- void setBreadcrumbs( java.util.List )
285 
286     /**
287      * Set if present, the contained text will be used instead of
288      * the generated copyright text.
289      * 
290      * @param footer a footer object.
291      */
292     public void setFooter( String footer )
293     {
294         this.footer = footer;
295     } //-- void setFooter( String )
296 
297     /**
298      * Set additional content (like JavaScript) to include in the
299      * HEAD block of the generated pages.
300      * 
301      * @param head a head object.
302      */
303     public void setHead( String head )
304     {
305         this.head = head;
306     } //-- void setHead( String )
307 
308     /**
309      * Set a list of links to display in the navigation.
310      * 
311      * @param links a links object.
312      */
313     public void setLinks( java.util.List<LinkItem> links )
314     {
315         this.links = links;
316     } //-- void setLinks( java.util.List )
317 
318     /**
319      * Set a list of menus to include in the navigation.
320      * 
321      * @param menus a menus object.
322      */
323     public void setMenus( java.util.List<Menu> menus )
324     {
325         this.menus = menus;
326     } //-- void setMenus( java.util.List )
327 
328     /**
329      * Method toString.
330      * 
331      * @return String
332      */
333     public java.lang.String toString()
334     {
335         StringBuilder buf = new StringBuilder( 128 );
336 
337         buf.append( "head = '" );
338         buf.append( getHead() );
339         buf.append( "'" );
340         buf.append( "\n" ); 
341         buf.append( "links = '" );
342         buf.append( getLinks() );
343         buf.append( "'" );
344         buf.append( "\n" ); 
345         buf.append( "breadcrumbs = '" );
346         buf.append( getBreadcrumbs() );
347         buf.append( "'" );
348         buf.append( "\n" ); 
349         buf.append( "menus = '" );
350         buf.append( getMenus() );
351         buf.append( "'" );
352         buf.append( "\n" ); 
353         buf.append( "footer = '" );
354         buf.append( getFooter() );
355         buf.append( "'" );
356 
357         return buf.toString();
358     } //-- java.lang.String toString()
359 
360 }