KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > blandware > atleap > service > core > MenuManager


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

16 package com.blandware.atleap.service.core;
17
18 import com.blandware.atleap.common.util.PartialCollection;
19 import com.blandware.atleap.common.util.QueryInfo;
20 import com.blandware.atleap.model.core.MenuItem;
21 import com.blandware.atleap.service.exception.BeanNotFoundException;
22
23 import java.util.List JavaDoc;
24
25 /**
26  * <p>Business Delegate (Proxy) Interface to handle communication between web and
27  * persistence layer.
28  * </p>
29  * <p><a HREF="MenuManager.java.htm"><i>View Source</i></a>
30  * </p>
31  *
32  * @author Sergey Zubtcovskii <a HREF="mailto:sergey.zubtcovskii@blandware.com">&lt;sergey.zubtcovskii@blandware.com&gt;</a>
33  * @version $Revision: 1.12 $ $Date: 2005/08/02 14:53:39 $
34  */

35 public interface MenuManager extends BaseManager {
36     //~ CRUD Methods ================================================================
37

38     /**
39      * Creates new menuItem
40      *
41      * @param menuItem Menu item to create
42      * @param parentItemId ID of parent menu item
43      * @param ownerId ID of owner of menu item
44      * @return ID of created menu item
45      * @throws BeanNotFoundException if parent item or owner with specified ID couldn't be found
46      */

47     public Long JavaDoc createMenuItem(MenuItem menuItem, Long JavaDoc parentItemId, Long JavaDoc ownerId) throws BeanNotFoundException;
48
49     /**
50      * Retrieves menu item with specified ID
51      *
52      * @param menuItemId ID of menu item to retrieve
53      * @return MenuItem or null if no menu item with specified ID exists in database
54      */

55     public MenuItem retrieveMenuItem(Long JavaDoc menuItemId);
56
57     /**
58      * Updates menu item
59      *
60      * @param menuItem Menu item to update
61      * @param parentItemId ID of parent menu item
62      * @param ownerId ID of owner of menu item
63      * @throws com.blandware.atleap.service.exception.BeanNotFoundException
64      * if menu item or parent item with specified ID couldn't be found
65      */

66     public void updateMenuItem(MenuItem menuItem, Long JavaDoc parentItemId, Long JavaDoc ownerId) throws BeanNotFoundException;
67
68
69     /**
70      * Deletes menu item with specified ID
71      *
72      * @param menuItemId ID of menu item to delete
73      */

74     public void deleteMenuItem(Long JavaDoc menuItemId) throws BeanNotFoundException;
75
76     // ~ Additional methods ================================================================
77

78     /**
79      * Retrieves filtered/sorted collection of menu items
80      *
81      * @param queryInfo Object that contains information about how to filter and sort data
82      * @return Collection of menuItems
83      */

84     public PartialCollection listMenuItems(QueryInfo queryInfo);
85
86     // ~ Finders ================================================================
87

88     /**
89      * Finds menu item by identifier, parent and owner
90      *
91      * @param identifier Identifier of menu item
92      * @param parentItemId ID of parent menu item
93      * @param ownerId ID of owner of menu item
94      * @return Menu item or null if none exists
95      */

96     public MenuItem findMenuItemByIdentifierAndParentAndOwner(String JavaDoc identifier, Long JavaDoc parentItemId, Long JavaDoc ownerId);
97
98     /**
99      * Finds menu item by position, parent and owner
100      *
101      * @param position Position of menu item
102      * @param parentItemId ID of parent menu item
103      * @param ownerId ID of owner of menu item
104      * @return Menu item or null if none exists
105      */

106     public MenuItem findMenuItemByPositionAndParentAndOwner(Integer JavaDoc position, Long JavaDoc parentItemId, Long JavaDoc ownerId);
107
108     /**
109      * Finds all menu items with specified parent and owner
110      *
111      * @param parentItemId ID of parent menu item
112      * @param ownerId ID of owner of menu item
113      * @return List of menu items or null if none exists
114      */

115     public List JavaDoc findMenuItemsByParentAndOwner(Long JavaDoc parentItemId, Long JavaDoc ownerId);
116
117     /**
118      * Looks up for redefinition of item with specified ID on specified layer
119      *
120      * @param origItemId ID of item to lookup redeifinitions for
121      * @param ownerId Layer to search on
122      * @return Menu item or null if none exists
123      */

124     public MenuItem findRedefinitionItem(Long JavaDoc origItemId, Long JavaDoc ownerId);
125
126 }
127
Popular Tags