Ajout d'un getter pour obtenir la phase courante d'une conférence
This commit is contained in:
@@ -68,7 +68,6 @@ public class ArticleManagerBean implements IArticleManager, Serializable {
|
|||||||
ut.rollback();
|
ut.rollback();
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} catch (Exception e1) {
|
} catch (Exception e1) {
|
||||||
// TODO Auto-generated catch block
|
|
||||||
e1.printStackTrace();
|
e1.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import javax.persistence.OneToMany;
|
|||||||
import javax.persistence.OneToOne;
|
import javax.persistence.OneToOne;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
import org.yacos.core.article.Article;
|
import org.yacos.core.article.Article;
|
||||||
import org.yacos.core.evaluation.Criterion;
|
import org.yacos.core.evaluation.Criterion;
|
||||||
@@ -24,8 +25,11 @@ import org.yacos.core.users.User;
|
|||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
public class Conference implements Serializable{
|
public class Conference implements Serializable{
|
||||||
|
private static final long serialVersionUID = 7278920769049538175L;
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
public enum Phase {
|
||||||
|
CALL_FOR_PAPER, ARTICLE_EVALUATION, PROGRAM_VALIDATED, PAST
|
||||||
|
};
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy=GenerationType.AUTO)
|
@GeneratedValue(strategy=GenerationType.AUTO)
|
||||||
@@ -201,5 +205,27 @@ public class Conference implements Serializable{
|
|||||||
public void setCriterions(List<Criterion> criterions) {
|
public void setCriterions(List<Criterion> criterions) {
|
||||||
this.criterions = criterions;
|
this.criterions = criterions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the current phase of the conference programmation
|
||||||
|
* Phase.CALL_FOR_PAPER : Before the submission deadline
|
||||||
|
* Phase.ARTICLE_EVALUATION : Before the evaluation deadline
|
||||||
|
* Phase.PROGRAM_VALIDATED : Before the end of the conference
|
||||||
|
* Phase.PAST : After the end of the conference
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Transient
|
||||||
|
public Phase getCurrentPhase() {
|
||||||
|
Date currentDate = new Date();
|
||||||
|
if(currentDate.before(this.dateArticle)){
|
||||||
|
return Phase.CALL_FOR_PAPER;
|
||||||
|
} else if(currentDate.before(this.dateEvaluation)){
|
||||||
|
return Phase.ARTICLE_EVALUATION;
|
||||||
|
} else if(currentDate.before(this.dateEnd)){
|
||||||
|
return Phase.PROGRAM_VALIDATED;
|
||||||
|
} else {
|
||||||
|
return Phase.PAST;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
package org.yacos.core.users;
|
package org.yacos.core.users;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.ejb.Remote;
|
import javax.ejb.Remote;
|
||||||
|
|
||||||
import org.yacos.core.exceptions.NoConferenceCreationTokenLeftException;
|
|
||||||
import org.yacos.core.exceptions.PKAlreadyUsedException;
|
import org.yacos.core.exceptions.PKAlreadyUsedException;
|
||||||
import org.yacos.core.exceptions.UserEMailAlreadyExistsException;
|
import org.yacos.core.exceptions.UserEMailAlreadyExistsException;
|
||||||
import org.yacos.core.system.InvitationToken;
|
import org.yacos.core.system.InvitationToken;
|
||||||
|
|||||||
Reference in New Issue
Block a user