Skip to content
Snippets Groups Projects
Commit f458babf authored by Tom Käsler's avatar Tom Käsler
Browse files

Merge branch 'fix-score-cache-spel' into 'master'

Fix SpEL for score cache keys

See merge request !104
parents 6f150152 e6c8765e
1 merge request!104Fix SpEL for score cache keys
Pipeline #20658 passed with warnings with stages
in 1 minute and 59 seconds
...@@ -53,79 +53,79 @@ public class ScoreCalculatorFactoryImpl implements ScoreCalculatorFactory, Appli ...@@ -53,79 +53,79 @@ public class ScoreCalculatorFactoryImpl implements ScoreCalculatorFactory, Appli
return scoreCalculator; return scoreCalculator;
} }
@CacheEvict(value = "score", key = "#event.Room") @CacheEvict(value = "score", key = "#event.entity.roomId")
@EventListener @EventListener
public void handleAfterContentCreation(AfterCreationEvent<Content> event) { public void handleAfterContentCreation(AfterCreationEvent<Content> event) {
this.publisher.publishEvent(new ChangeScoreEvent(this, event.getEntity().getRoomId())); this.publisher.publishEvent(new ChangeScoreEvent(this, event.getEntity().getRoomId()));
} }
@CacheEvict(value = "score", key = "#event.Room") @CacheEvict(value = "score", key = "#event.roomId")
@EventListener @EventListener
public void handleUnlockQuestion(UnlockQuestionEvent event) { public void handleUnlockQuestion(UnlockQuestionEvent event) {
this.publisher.publishEvent(new ChangeScoreEvent(this, event.getRoomId())); this.publisher.publishEvent(new ChangeScoreEvent(this, event.getRoomId()));
} }
@CacheEvict(value = "score", key = "#event.Room") @CacheEvict(value = "score", key = "#event.roomId")
@EventListener @EventListener
public void handleUnlockQuestions(UnlockQuestionsEvent event) { public void handleUnlockQuestions(UnlockQuestionsEvent event) {
this.publisher.publishEvent(new ChangeScoreEvent(this, event.getRoomId())); this.publisher.publishEvent(new ChangeScoreEvent(this, event.getRoomId()));
} }
@CacheEvict(value = "score", key = "#event.Room") @CacheEvict(value = "score", key = "#event.roomId")
@EventListener @EventListener
public void handleLockQuestion(LockQuestionEvent event) { public void handleLockQuestion(LockQuestionEvent event) {
this.publisher.publishEvent(new ChangeScoreEvent(this, event.getRoomId())); this.publisher.publishEvent(new ChangeScoreEvent(this, event.getRoomId()));
} }
@CacheEvict(value = "score", key = "#event.Room") @CacheEvict(value = "score", key = "#event.roomId")
@EventListener @EventListener
public void handleLockQuestions(LockQuestionsEvent event) { public void handleLockQuestions(LockQuestionsEvent event) {
this.publisher.publishEvent(new ChangeScoreEvent(this, event.getRoomId())); this.publisher.publishEvent(new ChangeScoreEvent(this, event.getRoomId()));
} }
@CacheEvict(value = "score", key = "#event.Room") @CacheEvict(value = "score", key = "#event.entity.roomId")
@EventListener @EventListener
public void handleNewAnswer(AfterCreationEvent<Answer> event) { public void handleNewAnswer(AfterCreationEvent<Answer> event) {
this.publisher.publishEvent(new ChangeScoreEvent(this, event.getEntity().getRoomId())); this.publisher.publishEvent(new ChangeScoreEvent(this, event.getEntity().getRoomId()));
} }
@CacheEvict(value = "score", key = "#event.Room") @CacheEvict(value = "score", key = "#event.entity.roomId")
@EventListener @EventListener
public void handleDeleteAnswer(AfterDeletionEvent<Answer> event) { public void handleDeleteAnswer(AfterDeletionEvent<Answer> event) {
this.publisher.publishEvent(new ChangeScoreEvent(this, event.getEntity().getRoomId())); this.publisher.publishEvent(new ChangeScoreEvent(this, event.getEntity().getRoomId()));
} }
@CacheEvict(value = "score", key = "#event.Room") @CacheEvict(value = "score", key = "#event.entity.roomId")
@EventListener @EventListener
public void handleDeleteQuestion(AfterDeletionEvent<Content> event) { public void handleDeleteQuestion(AfterDeletionEvent<Content> event) {
this.publisher.publishEvent(new ChangeScoreEvent(this, event.getEntity().getRoomId())); this.publisher.publishEvent(new ChangeScoreEvent(this, event.getEntity().getRoomId()));
} }
@CacheEvict(value = "score", key = "#event.Room") @CacheEvict(value = "score", key = "#event.roomId")
@EventListener @EventListener
public void handleDeleteAllQuestions(DeleteAllQuestionsEvent event) { public void handleDeleteAllQuestions(DeleteAllQuestionsEvent event) {
this.publisher.publishEvent(new ChangeScoreEvent(this, event.getRoomId())); this.publisher.publishEvent(new ChangeScoreEvent(this, event.getRoomId()));
} }
@CacheEvict(value = "score", key = "#event.Room") @CacheEvict(value = "score", key = "#event.roomId")
@EventListener @EventListener
public void handleDeleteAllQuestionsAnswers(DeleteAllQuestionsAnswersEvent event) { public void handleDeleteAllQuestionsAnswers(DeleteAllQuestionsAnswersEvent event) {
this.publisher.publishEvent(new ChangeScoreEvent(this, event.getRoomId())); this.publisher.publishEvent(new ChangeScoreEvent(this, event.getRoomId()));
} }
@CacheEvict(value = "score", key = "#event.Room") @CacheEvict(value = "score", key = "#event.roomId")
@EventListener @EventListener
public void handleDeleteAllPreparationAnswers(DeleteAllPreparationAnswersEvent event) { public void handleDeleteAllPreparationAnswers(DeleteAllPreparationAnswersEvent event) {
this.publisher.publishEvent(new ChangeScoreEvent(this, event.getRoomId())); this.publisher.publishEvent(new ChangeScoreEvent(this, event.getRoomId()));
} }
@CacheEvict(value = "score", key = "#event.Room") @CacheEvict(value = "score", key = "#event.roomId")
@EventListener @EventListener
public void handleDeleteAllLectureAnswers(DeleteAllLectureAnswersEvent event) { public void handleDeleteAllLectureAnswers(DeleteAllLectureAnswersEvent event) {
this.publisher.publishEvent(new ChangeScoreEvent(this, event.getRoomId())); this.publisher.publishEvent(new ChangeScoreEvent(this, event.getRoomId()));
} }
@CacheEvict(value = "score", key = "#event.Room") @CacheEvict(value = "score", key = "#event.roomId")
@EventListener @EventListener
public void handlePiRoundReset(PiRoundResetEvent event) { public void handlePiRoundReset(PiRoundResetEvent event) {
this.publisher.publishEvent(new ChangeScoreEvent(this, event.getRoomId())); this.publisher.publishEvent(new ChangeScoreEvent(this, event.getRoomId()));
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment