Musico
Informace
- Webová aplikace vytvořená pomocí technologií EJB a JSF, s úmyslem nasazení na Glassfish serveru.
- Psaná jako semestrální práce pro předmět X33EJA.
-
Účelem bylo osvojit si:
- Návrh doménového modelu a jeho implementaci (alespoň jedna vazba M:N)
- Použití JPA pro persistenci
- Transakce
- Použití EJB (stateless i statefull)
- Lokalizaci do více jazyků
- Autorizaci uživatelů, rozdělení do rolí a zabezpečení přístupu k business vrstvě
- Webové rozhrání (servlety, jsp, nebo web framework)
Zdrojové kódy
-
musico-ejb
- setup
-
src
- conf
-
java
-
cz.cvut.x33eja.macosond
-
business
- music
- user
- util
- persistence
-
business
-
cz.cvut.x33eja.macosond
- build.xml
-
musico-war
-
src
-
java
-
cz.cvut.x33eja.macosond.web
- back
- converter
- resources
-
cz.cvut.x33eja.macosond.web
-
java
-
web
- WEB-INF
-
clientside
-
css
-
img
-
css
- common
- error
- login
- member
- bandList.jsp
- eventList.jsp
- index.jsp
- logout.jsp
- redirect.jsp
- build.xml
-
src
-
src
- conf
- build.xml
1: package cz.cvut.x33eja.macosond.business.user; 2: 3: import cz.cvut.x33eja.macosond.persistence.entity.UserAccount; 4: import java.util.Collection; 5: import javax.ejb.Local; 6: 7: /** 8: * @author Ondra 9: * @version 1.0 10: * @created 23-XII-2009 19:34:17 11: */ 12: @Local 13: public interface UserAccountLocal 14: { 15: 16: /** 17: * Add new useraccount 18: * @param user 19: */ 20: public void add(UserAccount user); 21: 22: /** 23: * Edit existing useraccount 24: * @param user 25: */ 26: public void edit(UserAccount user); 27: 28: /** 29: * Delete existing useraccount 30: * @param user 31: */ 32: public void delete(UserAccount user); 33: 34: /** 35: * Get specific useraccount by info in given object 36: * @param user 37: */ 38: public UserAccount get(UserAccount user); 39: 40: /** 41: * Get specific useraccount by given id 42: * @param user 43: */ 44: public UserAccount get(Integer UserAccountID); 45: 46: /** 47: * Check if username exists in database 48: * @param Username 49: * @return true if username exists 50: * @return fals if username not exists 51: */ 52: public boolean usernameExists(String Username); 53: 54: /** 55: * Check if email exists in database 56: * @param Email 57: * @return true if email exists 58: * @return false if email not exists 59: */ 60: public boolean emailExists(String Email); 61: 62: /** 63: * For current user change old password to new one 64: * @param oldPassword 65: * @param newPassword 66: * @return true if password changed 67: * @return false if password not changed 68: */ 69: public boolean changePassword(String oldPassword, String newPassword); 70: 71: /** 72: * Return current logged user (in current session) 73: * @return User user entity if logged 74: */ 75: public UserAccount getCurrentUser(); 76: 77: /** 78: * Get all existing user accounts 79: * @return 80: */ 81: public Collection<UserAccount> getAll(); 82: 83: }
