KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > struts > webapp > tiles > portal > MenuSettings


1 /*
2  * $Id: MenuSettings.java 54929 2004-10-16 16:38:42Z germuska $
3  *
4  * Copyright 1999-2004 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 package org.apache.struts.webapp.tiles.portal;
20
21 import java.util.ArrayList JavaDoc;
22 import java.util.List JavaDoc;
23
24   /**
25    * Objects of this class hold menu settings for one user.
26    */

27    public class MenuSettings
28    {
29        /** List of items */
30      protected List JavaDoc items = new ArrayList JavaDoc();
31
32        /**
33         * Get list of items
34         */

35      public List JavaDoc getItems( )
36        {
37        return items;
38        }
39
40        /**
41         * Add an item to the list
42         */

43      public void addItem( Object JavaDoc item )
44        {
45        items.add( item );
46        }
47
48        /**
49         * Add all items to the list.
50         */

51      public void addItems( List JavaDoc list )
52        {
53        items.addAll( list );
54        }
55
56        /**
57         * Reset settings
58         */

59      public void reset()
60        {
61        items.clear();
62        }
63
64      public String JavaDoc toString()
65        {
66        return "items=" + items;
67        }
68    }
69
Popular Tags