mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-15 06:49:56 +00:00
Merge branch 'master' into bug5442
This commit is contained in:
commit
dbd2ae0ac4
11 files changed
+19
-18
No files matched your search
+2
-2
@@ -15,7 +15,7 @@ public class FreestyleProperties extends JsonWrapper {
|
||||
private static final String FIELD_SHAPE = "shape";
|
||||
private static final String FIELD_PATTERN = "pattern";
|
||||
private static final String FIELD_MARK_TYPE = "markType";
|
||||
private static final String FIELD_TAG = "tags";
|
||||
private static final String FIELD_TAGS = "tags";
|
||||
|
||||
public FreestyleProperties(final JSONObject json) {
|
||||
super(json);
|
||||
@@ -31,7 +31,7 @@ public class FreestyleProperties extends JsonWrapper {
|
||||
getJson().put(FIELD_PATTERN, pattern);
|
||||
getJson().put(FIELD_MARK_TYPE, markType);
|
||||
JSONArray jsonTags = new JSONArray(tags);
|
||||
getJson().put(FIELD_TAG, jsonTags);
|
||||
getJson().put(FIELD_TAGS, jsonTags);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
|
||||
+2
-3
@@ -142,8 +142,7 @@ public class CourseConfigurationResource extends AbstractSailingServerResource {
|
||||
@Path("getFromCourse/{regattaName}/{raceColumn}/{fleet}")
|
||||
public Response createCourseConfigurationFromCourse(@PathParam("regattaName") String regattaName,
|
||||
@PathParam("raceColumn") String raceColumn, @PathParam("fleet") String fleet,
|
||||
@QueryParam("tag") List<String> tags) throws Exception {
|
||||
|
||||
@QueryParam("tags") List<String> tags) throws Exception {
|
||||
if (regattaName == null || raceColumn == null || fleet == null) {
|
||||
return getBadCourseConfigurationValidationErrorResponse(
|
||||
"Course configuration is required to have a regatta name and a race name");
|
||||
@@ -183,7 +182,7 @@ public class CourseConfigurationResource extends AbstractSailingServerResource {
|
||||
@Path("getFromCourseTemplate/{courseTemplateId}")
|
||||
public Response createCourseConfigurationFromCourseTemplate(@PathParam("courseTemplateId") String courseTemplateId,
|
||||
@QueryParam("regattaName") String regattaName,
|
||||
@QueryParam("tag") List<String> tags,
|
||||
@QueryParam("tags") List<String> tags,
|
||||
@QueryParam("numberOfLaps") Integer optionalNumberOfLaps) {
|
||||
final CourseTemplate courseTemplate = this.getSharedSailingData()
|
||||
.getCourseTemplateById(UUID.fromString(courseTemplateId));
|
||||
|
||||
+3
-1
@@ -114,7 +114,8 @@
|
||||
"color": "#00FF00",
|
||||
"shape": "",
|
||||
"pattern": "",
|
||||
"markType": "BUOY"
|
||||
"markType": "BUOY",
|
||||
"tags":["tag1"]
|
||||
},
|
||||
"storeToInventory": true
|
||||
},
|
||||
@@ -148,6 +149,7 @@
|
||||
"shape": "",
|
||||
"pattern": "",
|
||||
"markType": "BUOY"
|
||||
"tags":["tag1"]
|
||||
},
|
||||
"storeToInventory": true
|
||||
},
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@
|
||||
<ul>
|
||||
<li>name: the name of the mark to create</li>
|
||||
<li>shortName: the short name to set. If not given, the short name defaults to the name.</li>
|
||||
<li>tag: Multi value specifying an optional set of tags.</li>
|
||||
<li>tags: Multi value specifying an optional set of tags.</li>
|
||||
<li>markType: One of [BUOY, CAMERABOAT, STARTBOAT, UMPIREBOAT, LANDMARK, FINISHBOAT]</li>
|
||||
<li>color: RGB color value. Either of the hex color patterns: #RRGGBB, #RGB, RRGGBB, RGB</li>
|
||||
<li>shape: For marks with BUOY type, this may be specified as one of [CYLINDER, CONICAL]</li>
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Optional query parameters:</td>
|
||||
<td>tag: Tags to filter mark properties for.
|
||||
<td>tags: Tags to filter mark properties for.
|
||||
This is only relevant if a course is loaded that was created based on a course template.
|
||||
In this case matching of MarkProperties to MarkTemplates that aren't covered by regatta marks is done by also using the given tags as a filter criteria filter.
|
||||
</td>
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ public class CourseTemplateResource extends SharedAbstractSailingServerResource
|
||||
|
||||
@GET
|
||||
@Produces("application/json;charset=UTF-8")
|
||||
public Response getCourseTemplates(@QueryParam("tag") List<String> tags) throws Exception {
|
||||
public Response getCourseTemplates(@QueryParam("tags") List<String> tags) throws Exception {
|
||||
Iterable<CourseTemplate> courseTemplateList = getSharedSailingData().getAllCourseTemplates(tags);
|
||||
JSONArray result = new JSONArray();
|
||||
for (CourseTemplate courseTemplate : courseTemplateList) {
|
||||
|
||||
+3
-3
@@ -59,7 +59,7 @@ public class MarkPropertiesResource extends SharedAbstractSailingServerResource
|
||||
|
||||
@GET
|
||||
@Produces("application/json;charset=UTF-8")
|
||||
public Response getMarkProperties(@QueryParam("tag") List<String> tags) throws Exception {
|
||||
public Response getMarkProperties(@QueryParam("tags") List<String> tags) throws Exception {
|
||||
Iterable<MarkProperties> markPropertiesList = getSharedSailingData().getAllMarkProperties(tags);
|
||||
JSONArray result = new JSONArray();
|
||||
for (MarkProperties markProperties : markPropertiesList) {
|
||||
@@ -85,7 +85,7 @@ public class MarkPropertiesResource extends SharedAbstractSailingServerResource
|
||||
public Response createMarkProperties(@FormParam("name") final String name,
|
||||
@FormParam("shortName") final String shortName, @FormParam("deviceUuid") String deviceUuid,
|
||||
@FormParam("color") String rgbColor, @FormParam("shape") String shape, @FormParam("pattern") String pattern,
|
||||
@FormParam("markType") final String markType, @FormParam("tag") List<String> tags,
|
||||
@FormParam("markType") final String markType, @FormParam("tags") List<String> tags,
|
||||
@FormParam("latDeg") Double latDeg, @FormParam("lonDeg") Double lonDeg) throws Exception {
|
||||
if (name == null || name.isEmpty()) {
|
||||
return getBadMarkPropertiesValidationErrorResponse("name must be given");
|
||||
@@ -161,7 +161,7 @@ public class MarkPropertiesResource extends SharedAbstractSailingServerResource
|
||||
@FormParam("name") final String name,
|
||||
@FormParam("shortName") final String shortName,
|
||||
@FormParam("color") String rgbColor, @FormParam("shape") String shape, @FormParam("pattern") String pattern,
|
||||
@FormParam("markType") final String markType, @FormParam("tag") List<String> tags,
|
||||
@FormParam("markType") final String markType, @FormParam("tags") List<String> tags,
|
||||
@FormParam("deviceUuid") String deviceUuid, @FormParam("latDeg") Double latDeg,
|
||||
@FormParam("lonDeg") Double lonDeg) throws Exception {
|
||||
final UUID markPropertiesUUID = UUID.fromString(markPropertiesId);
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Optional parameters:</td>
|
||||
<td>tag: tag for filtering. Multiple tags are allowed. If no tag is specified, no filtering by tag will be done.<br>
|
||||
<td>tags: tags for filtering. Multiple tags are allowed. If no tag is specified, no filtering by tag will be done.<br>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Request method:</td>
|
||||
@@ -37,7 +37,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Example:</td>
|
||||
<td><a href="http://www.sapsailing.com/sailingserver/api/v1/coursetemplates?tag=test1&tag=test2">http://www.sapsailing.com/sailingserver/api/v1/coursetemplates?tag=test1&tag=test2</a></td>
|
||||
<td><a href="http://www.sapsailing.com/sailingserver/api/v1/coursetemplates?tag=test1&tag=test2">http://www.sapsailing.com/sailingserver/api/v1/coursetemplates?tags=test1&tags=test2</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="height: 1em;"></div>
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Optional parameters:</td>
|
||||
<td>tag: tag for filtering. Multiple tags are allowed. If no tag is specified, no filtering by tag will be done.<br>
|
||||
<td>tags: Multi value specifying an optional set of tags. No filtering by tag will be done.<br>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Request method:</td>
|
||||
@@ -37,7 +37,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Example:</td>
|
||||
<td><a href="http://www.sapsailing.com/sailingserver/api/v1/markproperties?tag=test1&tag=test2">http://www.sapsailing.com/sailingserver/api/v1/markproperties?tag=test1&tag=test2</a></td>
|
||||
<td><a href="http://www.sapsailing.com/sailingserver/api/v1/markproperties?tag=test1&tag=test2">http://www.sapsailing.com/sailingserver/api/v1/markproperties?tags=test1&tags=test2</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="height: 1em;"></div>
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@
|
||||
<tr>
|
||||
<td>Optional parameters:</td>
|
||||
<td>shortName: the short name to set. If not given, the short name defaults to the name.<br>
|
||||
tag: Multi value specifying an optional set of tags.
|
||||
tags: Multi value specifying an optional set of tags.
|
||||
markType: One of [BUOY, CAMERABOAT, STARTBOAT, UMPIREBOAT, LANDMARK, FINISHBOAT]<br>
|
||||
color: RGB color value. Either of the hex color patterns: #RRGGBB, #RGB, RRGGBB, RGB<br>
|
||||
shape: For marks with BUOY type, this may be specified as one of [CYLINDER, CONICAL]<br>
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@
|
||||
<tr>
|
||||
<td>Optional parameters:</td>
|
||||
<td>shortName: the short name to set. If not given, the short name defaults to the name.<br>
|
||||
tag: Multi value specifying an optional set of tags.
|
||||
tags: Multi value specifying an optional set of tags.
|
||||
Appearance parameters (not giving a parameter sets it to the default):<br>
|
||||
markType: One of [BUOY, CAMERABOAT, STARTBOAT, UMPIREBOAT, LANDMARK, FINISHBOAT]<br>
|
||||
color: RGB color value. Either of the hex color patterns: #RRGGBB, #RGB, RRGGBB, RGB<br>
|
||||
|
||||
Reference in new issue
Block a user