mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-17 01:31:01 +00:00
Moved media model and util to com.sap.sse.shared.android project because
this is only shared between backend and android but not usable in GWT UI
This commit is contained in:
1 parent
69054601dd
commit
d8b9014d03
40 files changed
+6642
-6625
No files matched your search
+98
-98
@@ -1,98 +1,98 @@
|
||||
package com.sap.sailing.domain.base;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.Map;
|
||||
|
||||
import com.sap.sailing.domain.common.Renamable;
|
||||
import com.sap.sse.common.Named;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.common.WithID;
|
||||
import com.sap.sse.common.media.ImageSize;
|
||||
import com.sap.sse.common.media.WithMedia;
|
||||
|
||||
/**
|
||||
* Base interface for an Event consisting of all static information, which might be shared
|
||||
* by the server and an Android application.
|
||||
*/
|
||||
public interface EventBase extends Named, WithDescription, Renamable, WithID, WithMedia {
|
||||
|
||||
void setDescription(String description);
|
||||
|
||||
/**
|
||||
* @return a non-<code>null</code> venue for this event
|
||||
*/
|
||||
Venue getVenue();
|
||||
|
||||
/**
|
||||
* @return the start date of the event
|
||||
*/
|
||||
TimePoint getStartDate();
|
||||
|
||||
void setStartDate(TimePoint startDate);
|
||||
|
||||
/**
|
||||
* @return the end date of the event
|
||||
*/
|
||||
TimePoint getEndDate();
|
||||
|
||||
void setEndDate(TimePoint startDate);
|
||||
|
||||
boolean isPublic();
|
||||
|
||||
void setPublic(boolean isPublic);
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* Returns a non-<code>null</code> live but unmodifiable collection of URLs pointing to image resources that can be
|
||||
* used to represent the event, e.g., on a web page.
|
||||
*
|
||||
* @return a non-<code>null</code> value which may be empty
|
||||
*/
|
||||
Iterable<URL> getImageURLs();
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* An event may have zero or more sponsors, each of which usually want to see their logo on the web page.
|
||||
*
|
||||
* @return the sponsors' logos; always non-<code>null</code> but possibly empty
|
||||
*/
|
||||
Iterable<URL> getSponsorImageURLs();
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* An optional logo image; may return <code>null</code>.
|
||||
*/
|
||||
URL getLogoImageURL();
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* Returns a non-<code>null</code> live but unmodifiable collection of URLs pointing to video resources that can be
|
||||
* used to represent the event, e.g., on a web page.
|
||||
*
|
||||
* @return a non-<code>null</code> value which may be empty
|
||||
*/
|
||||
Iterable<URL> getVideoURLs();
|
||||
|
||||
/**
|
||||
* @return the URL of the event's official web site, or <code>null</code> if such a site does not exist or its URL
|
||||
* is not known
|
||||
*/
|
||||
URL getOfficialWebsiteURL();
|
||||
|
||||
void setOfficialWebsiteURL(URL officialWebsiteURL);
|
||||
|
||||
/**
|
||||
* @return the URL of an external web site containing sailor related information like protests, official results, etc.
|
||||
* or <code>null</code> if such a site does not exist or its URL is not known.
|
||||
*/
|
||||
URL getSailorsInfoWebsiteURL();
|
||||
|
||||
void setSailorsInfoWebsiteURL(URL sailorsInfoWebsiteURL);
|
||||
|
||||
Iterable<? extends LeaderboardGroupBase> getLeaderboardGroups();
|
||||
|
||||
/**
|
||||
* Sets and converts all event images and videos from the old URL based format to the new richer format
|
||||
* */
|
||||
boolean setMediaURLs(Iterable<URL> imageURLs, Iterable<URL> sponsorImageURLs, Iterable<URL> videoURLs, URL logoImageURL, Map<URL, ImageSize> imageSizes);
|
||||
}
|
||||
package com.sap.sailing.domain.base;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.Map;
|
||||
|
||||
import com.sap.sailing.domain.common.Renamable;
|
||||
import com.sap.sse.common.Named;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.common.WithID;
|
||||
import com.sap.sse.common.media.ImageSize;
|
||||
import com.sap.sse.shared.media.WithMedia;
|
||||
|
||||
/**
|
||||
* Base interface for an Event consisting of all static information, which might be shared
|
||||
* by the server and an Android application.
|
||||
*/
|
||||
public interface EventBase extends Named, WithDescription, Renamable, WithID, WithMedia {
|
||||
|
||||
void setDescription(String description);
|
||||
|
||||
/**
|
||||
* @return a non-<code>null</code> venue for this event
|
||||
*/
|
||||
Venue getVenue();
|
||||
|
||||
/**
|
||||
* @return the start date of the event
|
||||
*/
|
||||
TimePoint getStartDate();
|
||||
|
||||
void setStartDate(TimePoint startDate);
|
||||
|
||||
/**
|
||||
* @return the end date of the event
|
||||
*/
|
||||
TimePoint getEndDate();
|
||||
|
||||
void setEndDate(TimePoint startDate);
|
||||
|
||||
boolean isPublic();
|
||||
|
||||
void setPublic(boolean isPublic);
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* Returns a non-<code>null</code> live but unmodifiable collection of URLs pointing to image resources that can be
|
||||
* used to represent the event, e.g., on a web page.
|
||||
*
|
||||
* @return a non-<code>null</code> value which may be empty
|
||||
*/
|
||||
Iterable<URL> getImageURLs();
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* An event may have zero or more sponsors, each of which usually want to see their logo on the web page.
|
||||
*
|
||||
* @return the sponsors' logos; always non-<code>null</code> but possibly empty
|
||||
*/
|
||||
Iterable<URL> getSponsorImageURLs();
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* An optional logo image; may return <code>null</code>.
|
||||
*/
|
||||
URL getLogoImageURL();
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* Returns a non-<code>null</code> live but unmodifiable collection of URLs pointing to video resources that can be
|
||||
* used to represent the event, e.g., on a web page.
|
||||
*
|
||||
* @return a non-<code>null</code> value which may be empty
|
||||
*/
|
||||
Iterable<URL> getVideoURLs();
|
||||
|
||||
/**
|
||||
* @return the URL of the event's official web site, or <code>null</code> if such a site does not exist or its URL
|
||||
* is not known
|
||||
*/
|
||||
URL getOfficialWebsiteURL();
|
||||
|
||||
void setOfficialWebsiteURL(URL officialWebsiteURL);
|
||||
|
||||
/**
|
||||
* @return the URL of an external web site containing sailor related information like protests, official results, etc.
|
||||
* or <code>null</code> if such a site does not exist or its URL is not known.
|
||||
*/
|
||||
URL getSailorsInfoWebsiteURL();
|
||||
|
||||
void setSailorsInfoWebsiteURL(URL sailorsInfoWebsiteURL);
|
||||
|
||||
Iterable<? extends LeaderboardGroupBase> getLeaderboardGroups();
|
||||
|
||||
/**
|
||||
* Sets and converts all event images and videos from the old URL based format to the new richer format
|
||||
* */
|
||||
boolean setMediaURLs(Iterable<URL> imageURLs, Iterable<URL> sponsorImageURLs, Iterable<URL> videoURLs, URL logoImageURL, Map<URL, ImageSize> imageSizes);
|
||||
}
|
||||
+6
-6
@@ -15,15 +15,15 @@ import com.sap.sailing.domain.base.Venue;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.common.Util;
|
||||
import com.sap.sse.common.Util.Pair;
|
||||
import com.sap.sse.common.media.ImageDescriptor;
|
||||
import com.sap.sse.common.media.ImageDescriptorImpl;
|
||||
import com.sap.sse.common.media.ImageSize;
|
||||
import com.sap.sse.common.media.MediaDescriptor;
|
||||
import com.sap.sse.common.media.MediaTagConstants;
|
||||
import com.sap.sse.common.media.MediaUtils;
|
||||
import com.sap.sse.common.media.MimeType;
|
||||
import com.sap.sse.common.media.VideoDescriptor;
|
||||
import com.sap.sse.common.media.VideoDescriptorImpl;
|
||||
import com.sap.sse.shared.media.ImageDescriptor;
|
||||
import com.sap.sse.shared.media.MediaDescriptor;
|
||||
import com.sap.sse.shared.media.MediaUtils;
|
||||
import com.sap.sse.shared.media.VideoDescriptor;
|
||||
import com.sap.sse.shared.media.impl.ImageDescriptorImpl;
|
||||
import com.sap.sse.shared.media.impl.VideoDescriptorImpl;
|
||||
|
||||
public abstract class EventBaseImpl implements EventBase {
|
||||
private static final long serialVersionUID = -5749964088848611074L;
|
||||
|
||||
Reference in new issue
Block a user