001: package org.objectweb.salome_tmf.api.sql;
002:
003: /*
004: * SalomeTMF is a Test Management Framework
005: * Copyright (C) 2005 France Telecom R&D
006: *
007: * This library is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU Lesser General Public
009: * License as published by the Free Software Foundation; either
010: * version 2 of the License, or (at your option) any later version.
011: *
012: * This library is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this library; if not, write to the Free Software
019: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
020: *
021: * @author Marche Mikael
022: *
023: * Contact: mikael.marche@rd.francetelecom.com
024: */
025:
026: import java.rmi.Remote;
027:
028: import org.objectweb.salome_tmf.api.data.GroupWrapper;
029: import org.objectweb.salome_tmf.api.data.UserWrapper;
030:
031: public interface ISQLGroup extends Remote {
032: /**
033: * Insert a group for the project idProject
034: * @param idProject
035: * @param name of the group
036: * @param description of the group
037: * @param perm of the group in the project
038: * @return the id of the group
039: * @exception
040: * no permission needed
041: */
042: public int insert(int idProject, String name, String description,
043: int perm) throws Exception;
044:
045: /**
046: * Insert an user idUser in the group idGroup
047: * @param
048: * @param
049: * @exception
050: * no permission needed
051: */
052: public void insertUser(int idGroup, int idUser) throws Exception;
053:
054: /**
055: * delete the group idGroup and all reference about user in group
056: * @param idGroup
057: * @exception
058: * no permission needed
059: */
060: public void delete(int idGroup) throws Exception;
061:
062: /**
063: * update the permission of the group idGroup by perm
064: * @param idGroup
065: * @param perm
066: * @exception
067: * no permission needed
068: */
069: public void updatePermission(int idGroup, int perm)
070: throws Exception;
071:
072: /**
073: * update the name and the description of the group idGroup
074: * @param idGroup
075: * @param name
076: * @param description
077: * @exception
078: * no permission needed
079: */
080: public void updateGroup(int idGroup, String name, String description)
081: throws Exception;
082:
083: /**
084: * Update the description of idUser in the group idGroup
085: * @param idGroup
086: * @param idUser
087: * @param description
088: * @exception
089: * no permission needed
090: */
091: public void updateUserDescInGroup(int idGroup, int idUser,
092: String description) throws Exception;
093:
094: /**
095: * Delete idUser in the group idGroup
096: * @param idGroup
097: * @param idUser
098: * @exception
099: * no permission needed
100: */
101: public void deleteUserInGroup(int idGroup, int idUser)
102: throws Exception;
103:
104: /**
105: * Delete all reference of group in user - group mapping
106: * @param idGroup
107: * @throws Exception
108: */
109: public void deleteUserGroup(int idGroup) throws Exception;
110:
111: /**
112: * get the id of an group groupName in project idProject
113: * @param idProject
114: * @param groupName
115: * @exception
116: * no permission needed
117: */
118: public int getID(int idProject, String groupName) throws Exception;
119:
120: /**
121: * Get an Array of GroupWrapper representing all groups in project idProject
122: * @param idProject
123: * @exception
124: * no permission needed
125: */
126: public GroupWrapper[] getGroupWrapperInProject(int idProject)
127: throws Exception;
128:
129: /**
130: * Get an Array of GroupWrapper representing all groups where userLogin is
131: * @param idProject
132: * @param userLogin
133: * @exception
134: * no permission needed
135: */
136: public GroupWrapper[] getGroupsForUser(int idProject,
137: String userLogin) throws Exception;
138:
139: /**
140: * Get an Array of UserWrapper representing all users in group idGroup
141: * @param idGroup
142: * @exception
143: * no permission needed
144: */
145: public UserWrapper[] getUserWrappersInGroup(int idGroup)
146: throws Exception;
147: }
|