1 /* 2 * Copyright 2005 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.Group; 21 import com.blandware.atleap.persistence.core.GroupDAO; 22 import com.blandware.atleap.service.exception.BeanAlreadyExistsException; 23 import com.blandware.atleap.service.exception.BeanNotFoundException; 24 25 /** 26 * <p>Business Delegate (Proxy) Interface to handle communication between web and 27 * persistence layer. 28 * </p> 29 * <p><a HREF="GroupManager.java.htm"><i>View source</i></a></p> 30 * 31 * @author Roman Puchkovskiy <a HREF="mailto:roman.puchkovskiy@blandware.com"> 32 * <roman.puchkovskiy@blandware.com></a> 33 * @version $Revision: 1.1 $ $Date: 2006/03/06 18:12:30 $ 34 */ 35 public interface GroupManager extends BaseManager { 36 37 /** 38 * Sets DAO for operating with groups 39 * 40 * @param dao the DAO to set 41 */ 42 public void setGroupDAO(GroupDAO dao); 43 44 // ~ CRUD Methods ================================================================ 45 46 /** 47 * Creates new group 48 * 49 * @param group Value object that represents what group must be created 50 */ 51 public void createGroup(Group group) throws BeanAlreadyExistsException; 52 53 /** 54 * Retrieves group with specified name 55 * 56 * @param groupName Name to search by 57 * @return Group or null if no group with specified name exists in database 58 */ 59 public Group retrieveGroup(String groupName); 60 61 /** 62 * Updates group 63 * 64 * @param group Group to update 65 */ 66 public void updateGroup(Group group) throws BeanAlreadyExistsException; 67 68 /** 69 * Deletes group with specified name 70 * 71 * @param groupName Name of group to delete 72 */ 73 public void deleteGroup(String groupName) throws BeanNotFoundException; 74 75 // ~ Additional methods ================================================================ 76 77 /** 78 * Retrieves filtered/sorted collection of groups. 79 * 80 * @param queryInfo Object that contains information about how to filter and sort data 81 * @return Collection of groups 82 */ 83 public PartialCollection listGroups(QueryInfo queryInfo); 84 } 85