001: package org.objectweb.salome_tmf.api.sql;
002:
003: import java.rmi.Remote;
004:
005: import org.objectweb.salome_tmf.api.data.UserWrapper;
006:
007: public interface ISQLPersonne extends Remote {
008: /**
009: * Insert a user to the datadase
010: * @param login
011: * @param name
012: * @param firstName
013: * @param desc
014: * @param email
015: * @param tel
016: * @param pwd
017: * @return
018: * @throws Exception
019: * no permission needed
020: */
021: public int insert(String login, String name, String firstName,
022: String desc, String email, String tel, String pwd,
023: boolean crypth) throws Exception;
024:
025: /**
026: * Update information about user identified by idUser
027: * @param idUser
028: * @param newLogin
029: * @param newName
030: * @param newFirstName
031: * @param newDesc
032: * @param newEmail
033: * @param newTel
034: * @throws Exception
035: * no permission needed
036: */
037: public void update(int idUser, String newLogin, String newName,
038: String newFirstName, String newDesc, String newEmail,
039: String newTel) throws Exception;
040:
041: /**
042: * Update the password for User userLogin with newPassword
043: * @param userLogin
044: * @param newPassword
045: * @param crypt (true to crypte the password in MD5)
046: * @return the new crypted password
047: * @throws Exception
048: * no permission needed
049: */
050: public String updatePassword(String userLogin, String newPassword,
051: boolean crypth) throws Exception;
052:
053: /**
054: * Delete an user in the database
055: * the clean all reference about user in project and group
056: * if user is the unique admin of an project, the project is deleted
057: * @param userLogin
058: * @throws Exception
059: * no permission needed
060: */
061: public void deleteByLogin(String userLogin) throws Exception;
062:
063: /**
064: * Delete an user in the database
065: * the clean all reference about user in project and group
066: * if user is the unique admin of an project, the project is deleted
067: * @param idUser
068: * @throws Exception
069: * no permission needed
070: */
071: public void deleteById(int idUser) throws Exception;
072:
073: /**
074: * Delete user reference in project
075: * @param idUser
076: * @param projectName
077: * @throws Exception
078: */
079: public void deleteInProject(int idUser, String projectName)
080: throws Exception;
081:
082: /**
083: * Get the permission of an user in a projet idProject
084: * @param idProject
085: * @param userLogin
086: * @return
087: * @throws Exception
088: */
089: public int getPermissionOfUser(int idProject, String userLogin)
090: throws Exception;
091:
092: /**
093: * Get The Id of a person using login
094: * @param login
095: * @return
096: * @throws Exception
097: */
098: public int getID(String login) throws Exception;
099:
100: /**
101: * Get the login of the user identified by idUser
102: * @param idUser
103: * @return
104: * @throws Exception
105: */
106: public String getLogin(int idUser) throws Exception;
107:
108: /**
109: * Get the name of the user identified by idUser
110: * @param idUser
111: * @return
112: * @throws Exception
113: */
114: public String getName(int idUser) throws Exception;
115:
116: /**
117: * Get the last and the fist name of the user identified by idUser
118: * @param idUser
119: * @return
120: * @throws Exception
121: */
122: public String getTwoName(int idUser) throws Exception;
123:
124: /**
125: * Get an UserWrapper of the user identified by login
126: * @param login
127: * @return
128: * @throws Exception
129: */
130: public UserWrapper getUserByLogin(String login) throws Exception;
131:
132: /**
133: * Get an UserWrapper of the user identified by idUser
134: * @param idUser
135: * @return
136: * @throws Exception
137: */
138: public UserWrapper getUserById(int idUser) throws Exception;
139: }
|