View Javadoc

1   /*
2    * $Id: Navigation.java 2993 2011-11-24 19:51:48Z andrewinkler $
3    * ============================================================================
4    * Project gluehloch-homepage-core
5    * Copyright (c) 2004-2007 by Andre Winkler. All rights reserved.
6    * ============================================================================
7    *          GNU LESSER GENERAL PUBLIC LICENSE
8    *  TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
9    *
10   *  This library is free software; you can redistribute it and/or
11   *  modify it under the terms of the GNU Lesser General Public
12   *  License as published by the Free Software Foundation; either
13   *  version 2.1 of the License, or (at your option) any later version.
14   *
15   *  This library is distributed in the hope that it will be useful,
16   *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17   *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18   *  Lesser General Public License for more details.
19   *
20   *  You should have received a copy of the GNU Lesser General Public
21   *  License along with this library; if not, write to the Free Software
22   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23   *
24   */
25  
26  package de.awtools.homegen.navigation;
27  
28  import java.util.ArrayList;
29  import java.util.List;
30  
31  /**
32   * Ein <code>Navigation</code> aus der <code>navigation.xml</code>.
33   * 
34   * @version $LastChangedRevision: 2993 $ $LastChangedDate: 2011-11-24 20:51:48 +0100 (Thu, 24 Nov 2011) $
35   * @author by Andre Winkler, $LastChangedBy: andrewinkler $
36   */
37  public final class Navigation {
38  
39      // -- header --------------------------------------------------------------
40  
41      /** Header Beschreibung. */
42      private Header header;
43  
44      /**
45       * Liefert den Header.
46       * 
47       * @return Der Header.
48       */
49      public Header getHeader() {
50          return header;
51      }
52  
53      /**
54       * Setzt den Header.
55       * 
56       * @param value Der Header.
57       */
58      public void setHeader(final Header value) {
59          header = value;
60      }
61  
62      // -- links ---------------------------------------------------------------
63  
64      /** Eine Liste mit {@link Item}. */
65      private List<Item> links = new ArrayList<Item>();
66  
67      /**
68       * Liefert die Liste der Links.
69       * 
70       * @return Liste mit Links.
71       */
72      public List<Item> getLinks() {
73          return links;
74      }
75  
76      /**
77       * Liefert die Liste der Links.
78       * 
79       * @param item Ein <code>Item</code>
80       */
81      public void addLink(final Item item) {
82          links.add(item);
83      }
84  
85      // -- items ---------------------------------------------------------------
86  
87      /** Eine Liste mit Menu-Items. */
88      private List<Item> menus = new ArrayList<Item>();
89  
90      /**
91       * Liefert die Liste der Menu-Items.
92       * 
93       * @return Liste mit Menu-Items.
94       */
95      public List<Item> getMenus() {
96          return menus;
97      }
98  
99      /**
100      * Liefert die Liste der Menu-Items.
101      * 
102      * @param item Menu-Items
103      */
104     public void addMenu(final Item item) {
105         menus.add(item);
106     }
107 
108 }