This commit is contained in:
Maxime Dagnicourt
2007-12-12 10:11:15 +00:00
parent e7e98246a5
commit b559cc9ece
5 changed files with 0 additions and 263 deletions

View File

@@ -1,12 +0,0 @@
/**
*
*/
package org.yacos.core;
/**
* @author christiancorsano
* TODO
*/
public class Conference {
}

View File

@@ -1,66 +0,0 @@
package org.yacos.core;
/**
* An role of a given type (author,chairman,PCmember or referee)
* defined for a user and a conference
* @author christiancorsano
*
*/
public class Role {
/**
* User for which this role is defined
*/
private User user;
/**
* Conference for which this role is defined
*/
private Conference conference;
/**
* The type of this role
*/
private RoleType type;
public Role(RoleType type,User user, Conference conference) {
super();
setType(type);
setUser(user);
setConference(conference);
}
/**
* @return the user who plays this role
*/
public User getUser() {
return user;
}
/**
* @param user the user who is to play this role
*/
public void setUser(User user) {
this.user = user;
}
/**
* @return the conference for which this role is defined
*/
public Conference getConference() {
return conference;
}
/**
* @param conference the conference for which this role is defined
*/
public void setConference(Conference conference) {
this.conference = conference;
}
/**
* @return the type of this role
*/
public RoleType getType() {
return type;
}
/**
* @param type the type of this role
*/
public void setType(RoleType type) {
this.type = type;
}
}

View File

@@ -1,48 +0,0 @@
/**
*
*/
package org.yacos.core;
/**
* @author christiancorsano
*
*/
public class RoleType {
/**
* Author constant role
*/
static public final RoleType author = new RoleType("author");
/**
* Chairman constant role
*/
static public final RoleType chairman = new RoleType("chairman");
/**
* PCMember constant role
*/
static public final RoleType PCmember = new RoleType("PCmember");
/**
* Referee constant role
*/
static public final RoleType Referee = new RoleType("referee");
/**
* Name of this role type
*/
private String name;
/**
* Private constructor : used to instanciate the constants
* @param name Name of the new RoleType
*/
private RoleType(String name){
this.name = name;
}
/**
* Return the name of this RoleType
* @return
*/
public String getName() {
return this.name;
}
}

View File

@@ -1,104 +0,0 @@
package org.yacos.core;
import java.util.Set;
/**
* A unique User of the system.
* The user is registered globally in the application and would be able to get different roles for
* different conferences.
* @author christiancorsano
*
*/
public class User {
/**
* Unique login of the user
* Is used to identify the user, should be unique and can't be modified
*/
private String login;
/**
* Password : used for authentication purpose only, is only writable
*/
private String password;
/**
* First Name of the user
*/
private String firstName;
/**
* Last name of the user
*/
private String lastName;
/**
* Organization or lab the user belongs to
*/
private String organization;
/**
* Active email (has to be used frequently) of the user
*/
private String email;
public User() {
}
public String getLogin() {
return login;
}
public void setPassword(String password) {
this.password = password;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getOrganization() {
return organization;
}
public void setOrganization(String organization) {
this.organization = organization;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public void addRole(Role role){
// TODO
}
public void addRoleForConference(RoleType roleType, Conference conference){
if(! hasRoleForConference(roleType)){
} else {
// TODO : declare and throw an exception
}
}
public boolean hasRoleForConference(RoleType roleType){
// TODO
return false;
}
public Set<Role> getRoles(){
// TODO
return null;
}
}

View File

@@ -1,33 +0,0 @@
/**
*
*/
package org.yacos.core;
import java.util.Collection;
/**
* @author christiancorsano
*
*/
public class UsersManager {
public Collection<User> getUsers(){
// TODO
return null;
}
/**
* Adds a user into the system
* @param user
*/
public void addUser(User user){
// TODO
}
/**
* Removes a user from the system
* @param user
*/
public void removeUser(User user){
// TODO
}
}