Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
reg-app
Regapp
Commits
42b17fe1
Commit
42b17fe1
authored
Feb 09, 2021
by
michael.simon
Browse files
Filter empty federations
parent
e651989d
Changes
1
Hide whitespace changes
Inline
Side-by-side
bwreg-service/src/main/java/edu/kit/scc/webreg/service/saml/FederationSingletonBean.java
View file @
42b17fe1
...
...
@@ -53,11 +53,12 @@ public class FederationSingletonBean {
public
void
refreshCache
()
{
if
(
System
.
currentTimeMillis
()
-
lastRefresh
>
1000L
*
60L
*
60L
)
{
sortedFederationList
=
federationDao
.
findAll
();
List
<
FederationEntity
>
tempFederationList
=
federationDao
.
findAll
();
sortedFederationList
=
new
ArrayList
<
FederationEntity
>();
idpMap
.
clear
();
for
(
FederationEntity
federation
:
sorted
FederationList
)
{
for
(
FederationEntity
federation
:
temp
FederationList
)
{
logger
.
info
(
"Loading federation {} ({})"
,
federation
.
getId
(),
federation
.
getEntityId
());
List
<
SamlIdpMetadataEntity
>
idpList
=
idpDao
.
findAllByFederationOrderByOrgname
(
federation
);
...
...
@@ -65,6 +66,10 @@ public class FederationSingletonBean {
for
(
SamlIdpMetadataEntity
idp
:
idpList
)
{
idpMap
.
put
(
idp
.
getEntityId
(),
idp
);
}
if
(
idpList
.
size
()
>
0
)
{
sortedFederationList
.
add
(
federation
);
}
}
lastRefresh
=
System
.
currentTimeMillis
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment