fixed that getPublicEvents() should only deliver public events (was borken for local events)

This commit is contained in:
fmittag committed 2014-08-15 11:29:43 +02:00
1 parent 8dd998b8be
commit 67a967ccff
1 file changed
+2
@@ -3031,8 +3031,10 @@ public class SailingServiceImpl extends ProxiedRemoteServiceServlet implements S
public List<EventBaseDTO> getPublicEventsOfAllSailingServers() throws MalformedURLException { public List<EventBaseDTO> getPublicEventsOfAllSailingServers() throws MalformedURLException {
List<EventBaseDTO> result = new ArrayList<>(); List<EventBaseDTO> result = new ArrayList<>();
for (EventDTO localEvent : getEvents()) { for (EventDTO localEvent : getEvents()) {
if(localEvent.isPublic) {
result.add(localEvent); result.add(localEvent);
} }
}
for (Entry<RemoteSailingServerReference, com.sap.sse.common.Util.Pair<Iterable<EventBase>, Exception>> serverRefAndEventsOrException : for (Entry<RemoteSailingServerReference, com.sap.sse.common.Util.Pair<Iterable<EventBase>, Exception>> serverRefAndEventsOrException :
getService().getPublicEventsOfAllSailingServers().entrySet()) { getService().getPublicEventsOfAllSailingServers().entrySet()) {
final com.sap.sse.common.Util.Pair<Iterable<EventBase>, Exception> eventsOrException = serverRefAndEventsOrException.getValue(); final com.sap.sse.common.Util.Pair<Iterable<EventBase>, Exception> eventsOrException = serverRefAndEventsOrException.getValue();