Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Plan
Issues
27
Issue boards
Milestones
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
ARSnova
ARSnova Backend
Commits
1426cfce
There was an error fetching the commit references. Please try again later.
Commit
1426cfce
authored
6 years ago
by
Daniel Gerhardt
Browse files
Options
Downloads
Patches
Plain Diff
Don't run ScoreCalculatorFactoryImpl's event handlers if roomId is null
parent
7bc75f68
No related merge requests found
Pipeline
#22173
passed with warnings with stages
Stage:
Stage:
Stage:
in 1 minute and 45 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/thm/arsnova/service/score/ScoreCalculatorFactoryImpl.java
+5
-5
5 additions, 5 deletions
...thm/arsnova/service/score/ScoreCalculatorFactoryImpl.java
with
5 additions
and
5 deletions
src/main/java/de/thm/arsnova/service/score/ScoreCalculatorFactoryImpl.java
+
5
−
5
View file @
1426cfce
...
...
@@ -56,31 +56,31 @@ public class ScoreCalculatorFactoryImpl implements ScoreCalculatorFactory, Appli
return
scoreCalculator
;
}
@CacheEvict
(
value
=
"score"
,
key
=
"#event.entity.roomId"
)
@CacheEvict
(
value
=
"score"
,
key
=
"#event.entity.roomId"
,
condition
=
"#event.entity.roomId != null"
)
@EventListener
public
void
handleAfterContentCreation
(
AfterCreationEvent
<
Content
>
event
)
{
this
.
publisher
.
publishEvent
(
new
ChangeScoreEvent
(
this
,
event
.
getEntity
().
getRoomId
()));
}
@CacheEvict
(
value
=
"score"
,
key
=
"#event.entity.roomId"
)
@CacheEvict
(
value
=
"score"
,
key
=
"#event.entity.roomId"
,
condition
=
"#event.entity.roomId != null"
)
@EventListener
(
condition
=
"#event.stateName == 'state'"
)
public
void
handleContentStateChange
(
StateChangeEvent
<
Content
,
Content
.
State
>
event
)
{
this
.
publisher
.
publishEvent
(
new
ChangeScoreEvent
(
this
,
event
.
getEntity
().
getRoomId
()));
}
@CacheEvict
(
value
=
"score"
,
key
=
"#event.entity.roomId"
)
@CacheEvict
(
value
=
"score"
,
key
=
"#event.entity.roomId"
,
condition
=
"#event.entity.roomId != null"
)
@EventListener
public
void
handleNewAnswer
(
AfterCreationEvent
<
Answer
>
event
)
{
this
.
publisher
.
publishEvent
(
new
ChangeScoreEvent
(
this
,
event
.
getEntity
().
getRoomId
()));
}
@CacheEvict
(
value
=
"score"
,
key
=
"#event.entity.roomId"
)
@CacheEvict
(
value
=
"score"
,
key
=
"#event.entity.roomId"
,
condition
=
"#event.entity.roomId != null"
)
@EventListener
public
void
handleDeleteAnswer
(
AfterDeletionEvent
<
Answer
>
event
)
{
this
.
publisher
.
publishEvent
(
new
ChangeScoreEvent
(
this
,
event
.
getEntity
().
getRoomId
()));
}
@CacheEvict
(
value
=
"score"
,
key
=
"#event.entity.roomId"
)
@CacheEvict
(
value
=
"score"
,
key
=
"#event.entity.roomId"
,
condition
=
"#event.entity.roomId != null"
)
@EventListener
public
void
handleDeleteQuestion
(
AfterDeletionEvent
<
Content
>
event
)
{
this
.
publisher
.
publishEvent
(
new
ChangeScoreEvent
(
this
,
event
.
getEntity
().
getRoomId
()));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment