Class UploadsService
java.lang.Object
org.tailormap.api.service.UploadsService
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckIfModifiedSince(UUID id, long ifModifiedSince) Checks if the upload with the given ID has been modified since the provided timestamp.static org.springframework.http.ResponseEntity<byte[]> createUploadResponseEntity(Upload upload) getUrlForImage(String imageId, UploadCategory category) getUrlForImage(UUID imageId, UploadCategory category) getUrlForLayerAttachedImage(UUID imageId, UploadCategory category, Application application, String layerId) Returns the URL for a layer-attached image e.g. a legend image, or null if the imageId is null or not found.replaceUploadLinks(Application application, String appLayerId, String description)
-
Field Details
-
DESCRIPTION_HEADER_NAME
- See Also:
-
UPLOAD_MARKDOWN_SCHEME
The scheme used in Markdown files to reference an upload. For example,upload://<upload-id>.- See Also:
-
-
Constructor Details
-
UploadsService
-
-
Method Details
-
checkIfModifiedSince
Checks if the upload with the given ID has been modified since the provided timestamp.- Parameters:
id- the UUID of the uploadifModifiedSince- the timestamp to compare against (in milliseconds)- Returns:
- true if the upload has been modified since the provided timestamp or when the upload does not exist, false otherwise
-
getUrlForImage
-
getUrlForImage
-
getUrlForLayerAttachedImage
public String getUrlForLayerAttachedImage(UUID imageId, UploadCategory category, Application application, String layerId) Returns the URL for a layer-attached image e.g. a legend image, or null if the imageId is null or not found.- Parameters:
imageId- the id of the imagecategory- the category of the image, e.g. LEGENDapplication- the application the image is attached tolayerId- the id of the layer the image is attached to- Returns:
- the URL for the layer-attached image or null
-
replaceUploadLinks
-
createUploadResponseEntity
public static org.springframework.http.ResponseEntity<byte[]> createUploadResponseEntity(Upload upload)
-