@DeclareRoles(value={"admin","user"}) @RolesAllowed(value="admin") public class UserEJB extends Object
| Modifier and Type | Field and Description |
|---|---|
protected javax.ejb.SessionContext |
ctx |
| Constructor and Description |
|---|
UserEJB() |
| Modifier and Type | Method and Description |
|---|---|
void |
confirmUser(String login) |
es.uvigo.esei.dgss.lettab.domain.User |
createUser(String login,
String password,
String name,
String email) |
es.uvigo.esei.dgss.lettab.domain.User |
findRegisteredUser(String login) |
void |
linkUserToEvent(es.uvigo.esei.dgss.lettab.domain.User participant,
es.uvigo.esei.dgss.lettab.domain.Event event) |
void |
setEntityManager(javax.persistence.EntityManager em) |
public void setEntityManager(javax.persistence.EntityManager em)
@PermitAll public es.uvigo.esei.dgss.lettab.domain.User createUser(String login, String password, String name, String email) throws javax.persistence.EntityExistsException
login - Unique login for the new userpassword - Password for the new username - Name for the new useremail - Email for the new userjavax.persistence.EntityExistsException - Throws this exception if the user exists@RolesAllowed(value="user") public void confirmUser(String login)
login - The user that you want to activate@PermitAll public es.uvigo.esei.dgss.lettab.domain.User findRegisteredUser(String login)
@RolesAllowed(value="user") public void linkUserToEvent(es.uvigo.esei.dgss.lettab.domain.User participant, es.uvigo.esei.dgss.lettab.domain.Event event)
participant - The user that is linked to an eventevent - Event assigned to a userCopyright © 2016. All rights reserved.