This commit is contained in:
@@ -4,13 +4,14 @@ import java.util.List;
|
|||||||
|
|
||||||
import javax.ejb.Remote;
|
import javax.ejb.Remote;
|
||||||
|
|
||||||
|
import org.yacos.core.conferences.Conference;
|
||||||
import org.yacos.core.exceptions.PKAlreadyUsedException;
|
import org.yacos.core.exceptions.PKAlreadyUsedException;
|
||||||
|
|
||||||
@Remote
|
@Remote
|
||||||
public interface IUserManager {
|
public interface IUserManager {
|
||||||
|
|
||||||
//crud methode
|
//crud methode
|
||||||
public List<User> getUsers();
|
|
||||||
public User addUser(String login, String password, String firstName,
|
public User addUser(String login, String password, String firstName,
|
||||||
String lastName, String organization, String email) throws PKAlreadyUsedException;
|
String lastName, String organization, String email) throws PKAlreadyUsedException;
|
||||||
public void removeUser(User user);
|
public void removeUser(User user);
|
||||||
@@ -18,8 +19,10 @@ public interface IUserManager {
|
|||||||
public void UpdateUser(User user);
|
public void UpdateUser(User user);
|
||||||
public Boolean exists(String login);
|
public Boolean exists(String login);
|
||||||
|
|
||||||
//role methode
|
// methodes lister
|
||||||
public List<Role> getRoles();
|
public List<User> getUsers();
|
||||||
|
public List<User> getUsers(Conference conf);
|
||||||
|
public List<User> getUsers(Role.RoleType type);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import javax.persistence.Entity;
|
|||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.OneToMany;
|
import javax.persistence.OneToMany;
|
||||||
|
|
||||||
|
import org.yacos.core.article.Article;
|
||||||
import org.yacos.core.conferences.Conference;
|
import org.yacos.core.conferences.Conference;
|
||||||
|
|
||||||
|
|
||||||
@@ -52,12 +53,16 @@ public class User implements Serializable{
|
|||||||
* Active email (has to be used frequently) of the user
|
* Active email (has to be used frequently) of the user
|
||||||
*/
|
*/
|
||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Roles for this user
|
* Roles for this user
|
||||||
*/
|
*/
|
||||||
@OneToMany(targetEntity=Role.class,mappedBy="user")
|
@OneToMany(targetEntity=Role.class,mappedBy="user")
|
||||||
private List<Role> roles;
|
private List<Role> roles;
|
||||||
|
|
||||||
|
@OneToMany(targetEntity=Article.class,mappedBy="mainAuthor")
|
||||||
|
private List<Article> articles;
|
||||||
|
|
||||||
public User(String login, String password, String firstName,
|
public User(String login, String password, String firstName,
|
||||||
String lastName, String organization, String email) {
|
String lastName, String organization, String email) {
|
||||||
this();
|
this();
|
||||||
@@ -159,5 +164,15 @@ public class User implements Serializable{
|
|||||||
public void setRoles(List<Role> roles) {
|
public void setRoles(List<Role> roles) {
|
||||||
this.roles = roles;
|
this.roles = roles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OneToMany(targetEntity=Article.class,mappedBy="mainAuthor")
|
||||||
|
public List<Article> getArticles() {
|
||||||
|
return articles;
|
||||||
|
}
|
||||||
|
|
||||||
|
@OneToMany(targetEntity=Article.class,mappedBy="mainAuthor")
|
||||||
|
public void setArticles(List<Article> articles) {
|
||||||
|
this.articles = articles;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user