KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ivata > groupware > navigation > Navigation


1 /*
2  * Copyright (c) 2001 - 2005 ivata limited.
3  * All rights reserved.
4  * -----------------------------------------------------------------------------
5  * ivata groupware may be redistributed under the GNU General Public
6  * License as published by the Free Software Foundation;
7  * version 2 of the License.
8  *
9  * These programs are free software; you can redistribute them and/or
10  * modify them under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; version 2 of the License.
12  *
13  * These programs are distributed in the hope that they will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  *
17  * See the GNU General Public License in the file LICENSE.txt for more
18  * details.
19  *
20  * If you would like a copy of the GNU General Public License write to
21  *
22  * Free Software Foundation, Inc.
23  * 59 Temple Place - Suite 330
24  * Boston, MA 02111-1307, USA.
25  *
26  *
27  * To arrange commercial support and licensing, contact ivata at
28  * http://www.ivata.com/contact.jsp
29  * -----------------------------------------------------------------------------
30  * $Log: Navigation.java,v $
31  * Revision 1.3 2005/04/10 20:09:39 colinmacleod
32  * Added new themes.
33  * Changed id type to String.
34  * Changed i tag to em and b tag to strong.
35  * Improved PicoContainerFactory with NanoContainer scripts.
36  *
37  * Revision 1.2 2005/04/09 17:19:09 colinmacleod
38  * Changed copyright text to GPL v2 explicitly.
39  *
40  * Revision 1.1.1.1 2005/03/10 17:50:35 colinmacleod
41  * Restructured ivata op around Hibernate/PicoContainer.
42  * Renamed ivata groupware.
43  *
44  * Revision 1.3 2004/11/12 18:17:25 colinmacleod
45  * Ordered imports.
46  *
47  * Revision 1.2 2004/11/12 15:57:07 colinmacleod
48  * Removed dependencies on SSLEXT.
49  * Moved Persistence classes to ivata masks.
50  *
51  * Revision 1.1 2004/07/13 19:41:16 colinmacleod
52  * Moved project to POJOs from EJBs.
53  * Applied PicoContainer to services layer (replacing session EJBs).
54  * Applied Hibernate to persistence layer (replacing entity EJBs).
55  * -----------------------------------------------------------------------------
56  */

57 package com.ivata.groupware.navigation;
58
59 import java.util.Collection JavaDoc;
60
61 import javax.ejb.EJBException JavaDoc;
62
63 import com.ivata.groupware.admin.security.server.SecuritySession;
64 import com.ivata.groupware.navigation.menu.item.MenuItemDO;
65 import com.ivata.mask.util.SystemException;
66
67 /**
68  * @author Colin MacLeod
69  * <a HREF='mailto:colin.macleod@ivata.com'>colin.macleod@ivata.com</a>
70  * @since Apr 14, 2004
71  * @version $Revision: 1.3 $
72  */

73 public interface Navigation {
74     /**
75      * <p>Add a new menu item, with no image associated with it initially.</p>
76      *
77      * @param userName the user for whom to insert the new menu item, or
78      * <code>null</code> if everyone should see it.
79      * @param menuId the unique identifier of the menu into which the new item
80      * will be inserted.
81      * @param text human-readable english language text for the menu item.
82      * Should be unique within the menu it is in though this is not enforced
83      * server-side.
84      * @param URL the <code>URL</code> the new menu item links to.
85      *
86      * @ejb.interface-method
87      * view-type="remote"
88      */

89     public abstract void addMenuItem(
90         SecuritySession securitySession,
91         MenuItemDO menuItem)
92         throws SystemException;
93     /**
94      * <p>changes a menu item, if it belongs to the given user</p>
95      *
96      * @param menuItemId the unique identifier of the menu item to change.
97      * @param text human-readable english language text for the menu item.
98      * Should be unique within the menu it is in though this is not enforced
99      * server-side.
100      * @param URL the <code>URL</code> the new menu item links to.
101      * @param userName the user for whom the menu item should belong
102      *
103      * @ejb.interface-method
104      * view-type="remote"
105      */

106     public abstract void amendMenuItem(
107         SecuritySession securitySession,
108         MenuItemDO menuItem)
109         throws SystemException;
110     /**
111      * <p>Find all the menues for a given user.</p>
112      *
113      * @param userName the user to search for
114      * @return a <code>Collection</code>Containing all the user's menues, as
115      * instances of {@link com.ivata.groupware.menu.MenuDO MenuDO}
116      * @see com.ivata.groupware.menu.MenuDOHome#findByUserName( String sUserName )
117      * @throws EJBException if there is a <code>FinderException</code> calling
118      * <code>MenuDOHome.findByUserName</code>
119      * @throws EJBException if there is a <code>NamingException</code> setting
120      * looking up the MenuHome
121      *
122      * @ejb.interface-method
123      * view-type="remote"
124      */

125     public abstract Collection JavaDoc findMenues(SecuritySession securitySession)
126         throws SystemException;
127     /**
128      * <p>removes a menu item, if it belongs to the given user</p>
129      *
130      * @param menuItemId the unique identifier of the menu item to remove.
131      * @param userName the user for whom the menu item should belong
132      *
133      * @ejb.interface-method
134      * view-type="remote"
135      */

136     public abstract void removeMenuItem(
137         SecuritySession securitySession,
138         String JavaDoc menuItemId)
139         throws SystemException;
140 }
Popular Tags