|
|
|
|
@@ -6,8 +6,6 @@ import java.util.ArrayList;
|
|
|
|
|
import java.util.HashSet;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Set;
|
|
|
|
|
import java.util.regex.Matcher;
|
|
|
|
|
import java.util.regex.Pattern;
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
import org.apache.commons.logging.Log;
|
|
|
|
|
@@ -20,7 +18,10 @@ import org.springframework.web.servlet.ModelAndViewDefiningException;
|
|
|
|
|
import org.springframework.web.servlet.mvc.AbstractWizardFormController;
|
|
|
|
|
import org.springframework.web.servlet.view.RedirectView;
|
|
|
|
|
import org.yacos.core.conferences.Conference;
|
|
|
|
|
import org.yacos.core.conferences.CriterionBean;
|
|
|
|
|
import org.yacos.core.conferences.IConferenceManager;
|
|
|
|
|
import org.yacos.core.conferences.IConferenceSession;
|
|
|
|
|
import org.yacos.core.conferences.PersonBean;
|
|
|
|
|
import org.yacos.core.conferences.Conference.Phase;
|
|
|
|
|
import org.yacos.core.evaluation.Criterion;
|
|
|
|
|
import org.yacos.core.evaluation.IEvaluationManager;
|
|
|
|
|
@@ -40,6 +41,8 @@ public class AddConferenceController extends AbstractWizardFormController {
|
|
|
|
|
protected final Log logger = LogFactory.getLog(getClass());
|
|
|
|
|
|
|
|
|
|
private IConferenceManager conferenceManager;
|
|
|
|
|
|
|
|
|
|
private IConferenceSession conferenceSession;
|
|
|
|
|
|
|
|
|
|
private IUserManager userManager;
|
|
|
|
|
|
|
|
|
|
@@ -63,179 +66,64 @@ public class AddConferenceController extends AbstractWizardFormController {
|
|
|
|
|
public void setConferenceManager(IConferenceManager conferenceManager) {
|
|
|
|
|
this.conferenceManager = conferenceManager;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ###########################################################
|
|
|
|
|
|
|
|
|
|
private static int nextPerson = 1;
|
|
|
|
|
|
|
|
|
|
private List<PersonBean> listPersonBean;
|
|
|
|
|
private List<PersonBean> listPersonFiltered;
|
|
|
|
|
private List<PersonBean> listPersonAdded;
|
|
|
|
|
private List<String> listInvitations;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void fillUser(String text) {
|
|
|
|
|
if (text.equals(""))
|
|
|
|
|
listPersonFiltered = listPersonBean;
|
|
|
|
|
else {
|
|
|
|
|
listPersonFiltered = new ArrayList<PersonBean>();
|
|
|
|
|
for (PersonBean b : listPersonBean) {
|
|
|
|
|
if (b.getFirstName().toLowerCase().startsWith(text.toLowerCase()) || b.getLastName().toLowerCase().startsWith(text.toLowerCase())){
|
|
|
|
|
listPersonFiltered.add(b);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
conferenceSession.fillUser(text);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setPerson(PersonBean b) {
|
|
|
|
|
if (b.getId() == -1) {
|
|
|
|
|
b.setId(getNextPerson());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PersonBean truePerson = getTruePerson(b.getLogin());
|
|
|
|
|
|
|
|
|
|
listPersonAdded.remove(truePerson);
|
|
|
|
|
listPersonAdded.add(truePerson);
|
|
|
|
|
listPersonBean.remove(truePerson);
|
|
|
|
|
listPersonFiltered.remove(truePerson);
|
|
|
|
|
|
|
|
|
|
public void setPerson(PersonBean b){
|
|
|
|
|
conferenceSession.setPerson(b);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void deletePerson(PersonBean b) {
|
|
|
|
|
|
|
|
|
|
PersonBean truePerson = getTruePerson(b.getLogin());
|
|
|
|
|
|
|
|
|
|
listPersonAdded.remove(truePerson);
|
|
|
|
|
listPersonBean.add(truePerson);
|
|
|
|
|
|
|
|
|
|
public void deletePerson(PersonBean b){
|
|
|
|
|
conferenceSession.deletePerson(b);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public PersonBean getTruePerson(String login) {
|
|
|
|
|
for (PersonBean b : listPersonBean) {
|
|
|
|
|
if (b.getLogin().equals(login)){
|
|
|
|
|
return b;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (PersonBean b : listPersonAdded) {
|
|
|
|
|
if (b.getLogin().equals(login)){
|
|
|
|
|
return b;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
public List<PersonBean> getUsersFiltered(){
|
|
|
|
|
return conferenceSession.getUsersFiltered();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static synchronized int getNextPerson()
|
|
|
|
|
{
|
|
|
|
|
return nextPerson++;
|
|
|
|
|
|
|
|
|
|
public List<PersonBean> getUsers(){
|
|
|
|
|
return conferenceSession.getUsers();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<PersonBean> getUsersFiltered() {
|
|
|
|
|
return listPersonFiltered;
|
|
|
|
|
|
|
|
|
|
public List<PersonBean> getUsersAdded(){
|
|
|
|
|
return conferenceSession.getUsersAdded();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<PersonBean> getUsers() {
|
|
|
|
|
return listPersonBean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<PersonBean> getUsersAdded() {
|
|
|
|
|
return listPersonAdded;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public List<String> getInvitation(){
|
|
|
|
|
return listInvitations;
|
|
|
|
|
return conferenceSession.getInvitation();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public boolean addInvitation(String email){
|
|
|
|
|
email = email.toLowerCase();
|
|
|
|
|
Pattern emailPattern = Pattern.compile("^[a-z0-9._-]+@[a-z0-9._-]{2,}[.][a-z]{2,4}$"); // Regex
|
|
|
|
|
Matcher emailMatcher = emailPattern.matcher(email);
|
|
|
|
|
|
|
|
|
|
if(!emailMatcher.matches()){
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
listInvitations.add(email);
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
return conferenceSession.addInvitation(email);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void removeInvitations(List<String> emailList){
|
|
|
|
|
for(String email : emailList){
|
|
|
|
|
listInvitations.remove(email);
|
|
|
|
|
}
|
|
|
|
|
conferenceSession.removeInvitations(emailList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ###########################################################
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static int nextId = 1;
|
|
|
|
|
|
|
|
|
|
private Set<CriterionBean> criteria;
|
|
|
|
|
private Set<CriterionBean> criteriaAll;
|
|
|
|
|
|
|
|
|
|
public Set<CriterionBean> getCriteriaAll() {
|
|
|
|
|
return criteriaAll;
|
|
|
|
|
|
|
|
|
|
public Set<CriterionBean> getCriteriaAll(){
|
|
|
|
|
return conferenceSession.getCriteriaAll();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Set<CriterionBean> getCriteriaAdded() {
|
|
|
|
|
return criteria;
|
|
|
|
|
|
|
|
|
|
public Set<CriterionBean> getCriteriaAdded(){
|
|
|
|
|
return conferenceSession.getCriteriaAdded();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public CriterionBean getTrueCriteria(int id) {
|
|
|
|
|
for (CriterionBean cb : criteriaAll) {
|
|
|
|
|
if (cb.getId() == id){
|
|
|
|
|
return cb;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (CriterionBean cb : criteria) {
|
|
|
|
|
if (cb.getId() == id){
|
|
|
|
|
return cb;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
public void setCriterionClick(CriterionBean c){
|
|
|
|
|
conferenceSession.setCriterionClick(c);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setCriterionClick(CriterionBean c) {
|
|
|
|
|
if (c.getId() == -1) {
|
|
|
|
|
c.setId(getNextId());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
criteria.remove(c);
|
|
|
|
|
criteria.add(c);
|
|
|
|
|
|
|
|
|
|
public void setCriterion(CriterionBean c){
|
|
|
|
|
conferenceSession.setCriterion(c);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setCriterion(CriterionBean c) {
|
|
|
|
|
if (c.getId() == -1) {
|
|
|
|
|
c.setId(getNextId());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CriterionBean trueCriteria = getTrueCriteria(c.getId());
|
|
|
|
|
|
|
|
|
|
criteria.remove(trueCriteria);
|
|
|
|
|
criteria.add(trueCriteria);
|
|
|
|
|
criteriaAll.remove(trueCriteria);
|
|
|
|
|
|
|
|
|
|
public void deleteCriterion(CriterionBean c){
|
|
|
|
|
conferenceSession.deleteCriterion(c);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void deleteCriterion(CriterionBean c) {
|
|
|
|
|
|
|
|
|
|
CriterionBean trueCriteria = getTrueCriteria(c.getId());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
criteria.remove(trueCriteria);
|
|
|
|
|
criteriaAll.add(trueCriteria);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static synchronized int getNextId()
|
|
|
|
|
{
|
|
|
|
|
return nextId++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ###########################################################
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public AddConferenceController() {
|
|
|
|
|
setCommandName("formConference");
|
|
|
|
|
@@ -244,7 +132,7 @@ public class AddConferenceController extends AbstractWizardFormController {
|
|
|
|
|
|
|
|
|
|
protected Object formBackingObject(HttpServletRequest request) throws ModelAndViewDefiningException {
|
|
|
|
|
logger.info(this.getClass().toString() + " dans le formBackingObject");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FormConference conference = new FormConference();
|
|
|
|
|
|
|
|
|
|
String action = request.getParameter("action");
|
|
|
|
|
@@ -255,8 +143,13 @@ public class AddConferenceController extends AbstractWizardFormController {
|
|
|
|
|
throw new ModelAndViewDefiningException(new ModelAndView("denied"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
criteria = new HashSet<CriterionBean>();
|
|
|
|
|
criteriaAll = new HashSet<CriterionBean>();
|
|
|
|
|
SessionService.getInstance().resetCurrentConference();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int nextId;
|
|
|
|
|
|
|
|
|
|
conferenceSession.setCriteria(new HashSet<CriterionBean>());
|
|
|
|
|
conferenceSession.setCriteriaAll(new HashSet<CriterionBean>());
|
|
|
|
|
List<Criterion> listCriterion = evaluationManager.getCriterions();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -266,8 +159,12 @@ public class AddConferenceController extends AbstractWizardFormController {
|
|
|
|
|
maxNext = crit.getId();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
nextId = conferenceSession.getNextId2();
|
|
|
|
|
nextId = maxNext + 1;
|
|
|
|
|
conferenceSession.setNextId2(nextId);
|
|
|
|
|
|
|
|
|
|
Set<CriterionBean> criteriaAll = new HashSet<CriterionBean>();
|
|
|
|
|
|
|
|
|
|
for (Criterion crit : listCriterion) {
|
|
|
|
|
CriterionBean cb = new CriterionBean();
|
|
|
|
|
cb.setId(crit.getId());
|
|
|
|
|
@@ -275,17 +172,22 @@ public class AddConferenceController extends AbstractWizardFormController {
|
|
|
|
|
cb.setMax(crit.getMax_rating());
|
|
|
|
|
cb.setMin(crit.getMin_rating());
|
|
|
|
|
criteriaAll.add(cb);
|
|
|
|
|
getNextId();
|
|
|
|
|
conferenceSession.setNextId2(conferenceSession.getNextId2() + 1);
|
|
|
|
|
}
|
|
|
|
|
conferenceSession.setCriteriaAll(criteriaAll);
|
|
|
|
|
|
|
|
|
|
listPersonBean = new ArrayList<PersonBean>();
|
|
|
|
|
listPersonAdded = new ArrayList<PersonBean>();
|
|
|
|
|
listInvitations = new ArrayList<String>();
|
|
|
|
|
listPersonFiltered = listPersonBean;
|
|
|
|
|
conferenceSession.setListPersonBean(new ArrayList<PersonBean>());
|
|
|
|
|
conferenceSession.setListPersonAdded(new ArrayList<PersonBean>());
|
|
|
|
|
conferenceSession.setListInvitations(new ArrayList<String>());
|
|
|
|
|
conferenceSession.setListPersonFiltered(conferenceSession.getUsersFiltered());
|
|
|
|
|
|
|
|
|
|
List<PersonBean> listPersonBean = conferenceSession.getUsers();
|
|
|
|
|
|
|
|
|
|
List<User> listUsers = userManager.getUsers();
|
|
|
|
|
for (User user : listUsers) {
|
|
|
|
|
PersonBean pb = new PersonBean();
|
|
|
|
|
pb.setId(getNextPerson());
|
|
|
|
|
conferenceSession.setNextPerson2(conferenceSession.getNextPerson2() + 1);
|
|
|
|
|
pb.setId(conferenceSession.getNextPerson2());
|
|
|
|
|
pb.setFirstName(user.getFirstName());
|
|
|
|
|
pb.setLastName(user.getLastName());
|
|
|
|
|
pb.setLogin(user.getLogin());
|
|
|
|
|
@@ -295,26 +197,33 @@ public class AddConferenceController extends AbstractWizardFormController {
|
|
|
|
|
listPersonBean.add(pb);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
conferenceSession.setListPersonBean(listPersonBean);
|
|
|
|
|
|
|
|
|
|
return conference;
|
|
|
|
|
}
|
|
|
|
|
else if (action.equals("modify")) {
|
|
|
|
|
Conference conf = SessionService.getInstance().getCurrentConference();
|
|
|
|
|
|
|
|
|
|
criteria = new HashSet<CriterionBean>();
|
|
|
|
|
criteriaAll = new HashSet<CriterionBean>();
|
|
|
|
|
conferenceSession.setCriteria(new HashSet<CriterionBean>());
|
|
|
|
|
conferenceSession.setCriteriaAll(new HashSet<CriterionBean>());
|
|
|
|
|
|
|
|
|
|
List<Criterion> listCriterionForConf = evaluationManager.getCriterions(conf.getId());
|
|
|
|
|
List<Criterion> listCriterion = evaluationManager.getCriterions();
|
|
|
|
|
|
|
|
|
|
int nextId;
|
|
|
|
|
|
|
|
|
|
int maxNext = 0;
|
|
|
|
|
for (Criterion crit : listCriterion) {
|
|
|
|
|
if (maxNext <= crit.getId())
|
|
|
|
|
maxNext = crit.getId();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
nextId = conferenceSession.getNextId2();
|
|
|
|
|
nextId = maxNext + 1;
|
|
|
|
|
conferenceSession.setNextId2(nextId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Set<CriterionBean> criteria = new HashSet<CriterionBean>();
|
|
|
|
|
for (Criterion crit : listCriterionForConf) {
|
|
|
|
|
CriterionBean cb = new CriterionBean();
|
|
|
|
|
cb.setId(crit.getId());
|
|
|
|
|
@@ -322,9 +231,11 @@ public class AddConferenceController extends AbstractWizardFormController {
|
|
|
|
|
cb.setMax(crit.getMax_rating());
|
|
|
|
|
cb.setMin(crit.getMin_rating());
|
|
|
|
|
criteria.add(cb);
|
|
|
|
|
getNextId();
|
|
|
|
|
conferenceSession.setNextId2(conferenceSession.getNextId2() + 1);
|
|
|
|
|
}
|
|
|
|
|
conferenceSession.setCriteria(criteria);
|
|
|
|
|
|
|
|
|
|
Set<CriterionBean> criteriaAll = new HashSet<CriterionBean>();
|
|
|
|
|
for (Criterion crit : listCriterion) {
|
|
|
|
|
CriterionBean cb = new CriterionBean();
|
|
|
|
|
cb.setId(crit.getId());
|
|
|
|
|
@@ -332,52 +243,61 @@ public class AddConferenceController extends AbstractWizardFormController {
|
|
|
|
|
cb.setMax(crit.getMax_rating());
|
|
|
|
|
cb.setMin(crit.getMin_rating());
|
|
|
|
|
criteriaAll.add(cb);
|
|
|
|
|
getNextId();
|
|
|
|
|
conferenceSession.setNextId2(conferenceSession.getNextId2() + 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// remove of the criteria already added
|
|
|
|
|
Set<CriterionBean> criteriaAllIter = new HashSet<CriterionBean>(criteriaAll);
|
|
|
|
|
for (CriterionBean crit : criteriaAllIter)
|
|
|
|
|
for (CriterionBean crit2 : criteria)
|
|
|
|
|
for (CriterionBean crit : criteriaAllIter) {
|
|
|
|
|
Set<CriterionBean> criteriatmp = conferenceSession.getCriteriaAdded();
|
|
|
|
|
for (CriterionBean crit2 : criteriatmp)
|
|
|
|
|
if (crit.getId() == crit2.getId())
|
|
|
|
|
criteriaAll.remove(crit);
|
|
|
|
|
}
|
|
|
|
|
conferenceSession.setCriteriaAll(criteriaAll);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
listPersonBean = new ArrayList<PersonBean>();
|
|
|
|
|
listPersonAdded = new ArrayList<PersonBean>();
|
|
|
|
|
// Should get the invitation tokens and allow them to be removed
|
|
|
|
|
listInvitations = new ArrayList<String>();
|
|
|
|
|
listPersonFiltered = listPersonBean;
|
|
|
|
|
conferenceSession.setListPersonBean(new ArrayList<PersonBean>());
|
|
|
|
|
conferenceSession.setListPersonAdded(new ArrayList<PersonBean>());
|
|
|
|
|
conferenceSession.setListInvitations(new ArrayList<String>());
|
|
|
|
|
conferenceSession.setListPersonFiltered(conferenceSession.getUsersFiltered());
|
|
|
|
|
List<User> listUsers = userManager.getUsers();
|
|
|
|
|
List<PersonBean> listPersonBean = conferenceSession.getUsers();
|
|
|
|
|
|
|
|
|
|
for (User user : listUsers) {
|
|
|
|
|
PersonBean pb = new PersonBean();
|
|
|
|
|
pb.setId(getNextPerson());
|
|
|
|
|
conferenceSession.setNextPerson2(conferenceSession.getNextPerson2() + 1);
|
|
|
|
|
pb.setId(conferenceSession.getNextPerson2());
|
|
|
|
|
pb.setFirstName(user.getFirstName());
|
|
|
|
|
pb.setLastName(user.getLastName());
|
|
|
|
|
pb.setLogin(user.getLogin());
|
|
|
|
|
|
|
|
|
|
if(!SessionService.getInstance().getCurrentUserLogin().equals(user.getLogin())){
|
|
|
|
|
|
|
|
|
|
listPersonBean.add(pb);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(! SessionService.getInstance().getCurrentUserLogin().equals(user.getLogin())){
|
|
|
|
|
listPersonBean.add(pb);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<User> listUsersForConf = userManager.getUsers(conf.getId(), RoleType.PCMEMBER);
|
|
|
|
|
List<PersonBean> listPersonAddedTmp = new ArrayList<PersonBean>();
|
|
|
|
|
for (User user : listUsersForConf) {
|
|
|
|
|
PersonBean pb = new PersonBean();
|
|
|
|
|
pb.setId(getNextPerson());
|
|
|
|
|
conferenceSession.setNextPerson2(conferenceSession.getNextPerson2() + 1);
|
|
|
|
|
pb.setId(conferenceSession.getNextPerson2());
|
|
|
|
|
pb.setFirstName(user.getFirstName());
|
|
|
|
|
pb.setLastName(user.getLastName());
|
|
|
|
|
pb.setLogin(user.getLogin());
|
|
|
|
|
listPersonAdded.add(pb);
|
|
|
|
|
listPersonAddedTmp.add(pb);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// remove of the person already added
|
|
|
|
|
List<PersonBean> listPersonIter = new ArrayList<PersonBean>(listPersonBean);
|
|
|
|
|
for (PersonBean person : listPersonIter)
|
|
|
|
|
for (PersonBean person2 : listPersonAdded)
|
|
|
|
|
for (PersonBean person : listPersonIter) {
|
|
|
|
|
for (PersonBean person2 : listPersonAddedTmp)
|
|
|
|
|
if (person.getLogin().equals(person2.getLogin()))
|
|
|
|
|
listPersonBean.remove(person);
|
|
|
|
|
}
|
|
|
|
|
conferenceSession.setListPersonBean(listPersonBean);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
|
|
|
|
|
@@ -460,7 +380,8 @@ public class AddConferenceController extends AbstractWizardFormController {
|
|
|
|
|
conference.setConferenceId(conf.getId());
|
|
|
|
|
SessionService.getInstance().setCurrentConference(conf);
|
|
|
|
|
|
|
|
|
|
for(CriterionBean criterion : criteria){
|
|
|
|
|
Set<CriterionBean> criteriaTmp = conferenceSession.getCriteriaAdded();
|
|
|
|
|
for(CriterionBean criterion : criteriaTmp){
|
|
|
|
|
conferenceManager.addCriterionToConference(
|
|
|
|
|
conf.getId(),
|
|
|
|
|
criterion.getLabel(),
|
|
|
|
|
@@ -468,7 +389,8 @@ public class AddConferenceController extends AbstractWizardFormController {
|
|
|
|
|
criterion.getMax());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for(PersonBean personBean : listPersonAdded){
|
|
|
|
|
List<PersonBean> listPersonAddedTmp = conferenceSession.getUsersAdded();
|
|
|
|
|
for(PersonBean personBean : listPersonAddedTmp){
|
|
|
|
|
conferenceManager.addPCMemberToConference(
|
|
|
|
|
conf.getId(),
|
|
|
|
|
personBean.getLogin());
|
|
|
|
|
@@ -490,7 +412,9 @@ public class AddConferenceController extends AbstractWizardFormController {
|
|
|
|
|
mailBody += YACOSUtils.fullURL("registerUser.htm")+" \n";
|
|
|
|
|
mailBody += "Please note that you MUST use this eMail address in the registration form in order to get the appropriate credentials.";
|
|
|
|
|
// TODO : use a template
|
|
|
|
|
for(String invitationEmail : listInvitations){
|
|
|
|
|
|
|
|
|
|
List<String> listInvitationsTmp = conferenceSession.getInvitation();
|
|
|
|
|
for(String invitationEmail : listInvitationsTmp){
|
|
|
|
|
try {
|
|
|
|
|
conferenceManager.addInvitationToken(invitationEmail, RoleType.PCMEMBER, conf.getId());
|
|
|
|
|
MailSenderService.getInstance().sendEMail(invitationEmail, mailSubject , mailBody);
|
|
|
|
|
@@ -529,7 +453,8 @@ public class AddConferenceController extends AbstractWizardFormController {
|
|
|
|
|
|
|
|
|
|
conferenceManager.removeCriterionToConference(conf.getId());
|
|
|
|
|
|
|
|
|
|
for(CriterionBean criterion : criteria){
|
|
|
|
|
Set<CriterionBean> criteriaTmp = conferenceSession.getCriteriaAdded();
|
|
|
|
|
for(CriterionBean criterion : criteriaTmp){
|
|
|
|
|
conferenceManager.addCriterionToConference(
|
|
|
|
|
conf.getId(),
|
|
|
|
|
criterion.getLabel(),
|
|
|
|
|
@@ -538,8 +463,9 @@ public class AddConferenceController extends AbstractWizardFormController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
conferenceManager.removePCMemberForConf(conf.getId());
|
|
|
|
|
|
|
|
|
|
for(PersonBean personBean : listPersonAdded){
|
|
|
|
|
|
|
|
|
|
List<PersonBean> listPersonAddedTmp = conferenceSession.getUsersAdded();
|
|
|
|
|
for(PersonBean personBean : listPersonAddedTmp){
|
|
|
|
|
conferenceManager.addPCMemberToConference(
|
|
|
|
|
conf.getId(),
|
|
|
|
|
personBean.getLogin());
|
|
|
|
|
@@ -549,5 +475,11 @@ public class AddConferenceController extends AbstractWizardFormController {
|
|
|
|
|
|
|
|
|
|
return new ModelAndView(new RedirectView("reportConfCreate.htm"));
|
|
|
|
|
}
|
|
|
|
|
public IConferenceSession getConferenceSession() {
|
|
|
|
|
return conferenceSession;
|
|
|
|
|
}
|
|
|
|
|
public void setConferenceSession(IConferenceSession conferenceSession) {
|
|
|
|
|
this.conferenceSession = conferenceSession;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|