001: /*
002: * Copyright (c) 2001 - 2005 ivata limited.
003: * All rights reserved.
004: * -----------------------------------------------------------------------------
005: * ivata groupware may be redistributed under the GNU General Public
006: * License as published by the Free Software Foundation;
007: * version 2 of the License.
008: *
009: * These programs are free software; you can redistribute them and/or
010: * modify them under the terms of the GNU General Public License
011: * as published by the Free Software Foundation; version 2 of the License.
012: *
013: * These programs are distributed in the hope that they will be useful,
014: * but WITHOUT ANY WARRANTY; without even the implied warranty of
015: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
016: *
017: * See the GNU General Public License in the file LICENSE.txt for more
018: * details.
019: *
020: * If you would like a copy of the GNU General Public License write to
021: *
022: * Free Software Foundation, Inc.
023: * 59 Temple Place - Suite 330
024: * Boston, MA 02111-1307, USA.
025: *
026: *
027: * To arrange commercial support and licensing, contact ivata at
028: * http://www.ivata.com/contact.jsp
029: * -----------------------------------------------------------------------------
030: * $Log: Navigation.java,v $
031: * Revision 1.1 2005/09/29 13:06:06 colinmacleod
032: * First version of setting subproject.
033: * Existing classes restructured, new setting user interface created.
034: * Flexible XML UI configuration makes it easy to reuse the same web pages in
035: * other projects.
036: * Web files work as stand-alone webapp for testing.
037: *
038: * Revision 1.3 2005/04/10 20:09:39 colinmacleod
039: * Added new themes.
040: * Changed id type to String.
041: * Changed i tag to em and b tag to strong.
042: * Improved PicoContainerFactory with NanoContainer scripts.
043: *
044: * Revision 1.2 2005/04/09 17:19:09 colinmacleod
045: * Changed copyright text to GPL v2 explicitly.
046: *
047: * Revision 1.1.1.1 2005/03/10 17:50:35 colinmacleod
048: * Restructured ivata op around Hibernate/PicoContainer.
049: * Renamed ivata groupware.
050: *
051: * Revision 1.3 2004/11/12 18:17:25 colinmacleod
052: * Ordered imports.
053: *
054: * Revision 1.2 2004/11/12 15:57:07 colinmacleod
055: * Removed dependencies on SSLEXT.
056: * Moved Persistence classes to ivata masks.
057: *
058: * Revision 1.1 2004/07/13 19:41:16 colinmacleod
059: * Moved project to POJOs from EJBs.
060: * Applied PicoContainer to services layer (replacing session EJBs).
061: * Applied Hibernate to persistence layer (replacing entity EJBs).
062: * -----------------------------------------------------------------------------
063: */
064: package com.ivata.groupware.navigation;
065:
066: import java.util.Collection;
067:
068: import javax.ejb.EJBException;
069:
070: import com.ivata.groupware.admin.security.server.SecuritySession;
071: import com.ivata.groupware.navigation.menu.item.MenuItemDO;
072: import com.ivata.mask.util.SystemException;
073:
074: /**
075: * @author Colin MacLeod
076: * <a href='mailto:colin.macleod@ivata.com'>colin.macleod@ivata.com</a>
077: * @since Apr 14, 2004
078: * @version $Revision: 1.1 $
079: */
080: public interface Navigation {
081: /**
082: * <p>Add a new menu item, with no image associated with it initially.</p>
083: *
084: * @param userName the user for whom to insert the new menu item, or
085: * <code>null</code> if everyone should see it.
086: * @param menuId the unique identifier of the menu into which the new item
087: * will be inserted.
088: * @param text human-readable english language text for the menu item.
089: * Should be unique within the menu it is in though this is not enforced
090: * server-side.
091: * @param URL the <code>URL</code> the new menu item links to.
092: *
093: * @ejb.interface-method
094: * view-type="remote"
095: */
096: public abstract void addMenuItem(SecuritySession securitySession,
097: MenuItemDO menuItem) throws SystemException;
098:
099: /**
100: * <p>changes a menu item, if it belongs to the given user</p>
101: *
102: * @param menuItemId the unique identifier of the menu item to change.
103: * @param text human-readable english language text for the menu item.
104: * Should be unique within the menu it is in though this is not enforced
105: * server-side.
106: * @param URL the <code>URL</code> the new menu item links to.
107: * @param userName the user for whom the menu item should belong
108: *
109: * @ejb.interface-method
110: * view-type="remote"
111: */
112: public abstract void amendMenuItem(SecuritySession securitySession,
113: MenuItemDO menuItem) throws SystemException;
114:
115: /**
116: * <p>Find all the menues for a given user.</p>
117: *
118: * @param userName the user to search for
119: * @return a <code>Collection</code>Containing all the user's menues, as
120: * instances of {@link com.ivata.groupware.menu.MenuDO MenuDO}
121: * @see com.ivata.groupware.menu.MenuDOHome#findByUserName( String sUserName )
122: * @throws EJBException if there is a <code>FinderException</code> calling
123: * <code>MenuDOHome.findByUserName</code>
124: * @throws EJBException if there is a <code>NamingException</code> setting
125: * looking up the MenuHome
126: *
127: * @ejb.interface-method
128: * view-type="remote"
129: */
130: public abstract Collection findMenues(
131: SecuritySession securitySession) throws SystemException;
132:
133: /**
134: * <p>removes a menu item, if it belongs to the given user</p>
135: *
136: * @param menuItemId the unique identifier of the menu item to remove.
137: * @param userName the user for whom the menu item should belong
138: *
139: * @ejb.interface-method
140: * view-type="remote"
141: */
142: public abstract void removeMenuItem(
143: SecuritySession securitySession, String menuItemId)
144: throws SystemException;
145: }
|