diff options
author | Simon Rettberg | 2015-09-16 13:47:28 +0200 |
---|---|---|
committer | Simon Rettberg | 2015-09-16 13:47:28 +0200 |
commit | 6734c5fdc364c4cb7aa6ce9cd10443a3be32a1bc (patch) | |
tree | 707f2bf06b88d575b8df6d95c48d2bf70c58f890 /dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/cache/OrganizationList.java | |
parent | [client] Clean up satellite selection window (diff) | |
download | tutor-module-6734c5fdc364c4cb7aa6ce9cd10443a3be32a1bc.tar.gz tutor-module-6734c5fdc364c4cb7aa6ce9cd10443a3be32a1bc.tar.xz tutor-module-6734c5fdc364c4cb7aa6ce9cd10443a3be32a1bc.zip |
[server] Refresh organization list of a user with an unknown organization connects
Diffstat (limited to 'dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/cache/OrganizationList.java')
-rw-r--r-- | dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/cache/OrganizationList.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/cache/OrganizationList.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/cache/OrganizationList.java index 6d2ebda2..3f144f15 100644 --- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/cache/OrganizationList.java +++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/cache/OrganizationList.java @@ -17,7 +17,7 @@ import org.openslx.util.QuickTimer.Task; * the master server. */ public class OrganizationList extends CacheBase<List<Organization>> { - + private static final Logger LOGGER = Logger.getLogger(OrganizationList.class); private static final OrganizationList instance = new OrganizationList(); @@ -54,4 +54,15 @@ public class OrganizationList extends CacheBase<List<Organization>> { return organizations; } + public static Organization find(String organizationId) { + List<Organization> list = get(); + if (list == null) + return null; + for (Organization org : list) { + if (org != null && organizationId.equals(org.organizationId)) + return org; + } + return null; + } + } |