Skip to content
Snippets Groups Projects
Commit e6c8765e authored by Daniel Gerhardt's avatar Daniel Gerhardt
Browse files

Fix SpEL for score cache keys

This was broken by refactoring of events.
parent 6f150152
Branches
Tags
1 merge request!104Fix SpEL for score cache keys
Pipeline #20657 passed with warnings with stages
in 1 minute and 9 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