Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Gitlab will go into maintenance Friday 3rd February from 9:00 to 10:00
Open sidebar
minerva
core
Commits
a55dc0c8
Commit
a55dc0c8
authored
Jun 11, 2021
by
Piotr Gawron
Browse files
chnage serialization field names to be consistent with old format
parent
01cd6048
Changes
3
Hide whitespace changes
Inline
Side-by-side
model/src/main/java/lcsb/mapviewer/model/map/layout/ProjectBackground.java
View file @
a55dc0c8
...
...
@@ -11,6 +11,7 @@ import org.hibernate.annotations.Cascade;
import
org.hibernate.annotations.CascadeType
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
lcsb.mapviewer.common.exception.NotImplementedException
;
...
...
@@ -312,6 +313,7 @@ public class ProjectBackground implements Serializable {
this
.
defaultOverlay
=
defaultOverlay
;
}
@JsonProperty
(
"order"
)
public
int
getOrderIndex
()
{
return
orderIndex
;
}
...
...
@@ -332,6 +334,7 @@ public class ProjectBackground implements Serializable {
}
}
@JsonProperty
(
"images"
)
public
Set
<
ProjectBackgroundImageLayer
>
getProjectBackgroundImageLayer
()
{
return
backgrounds
;
}
...
...
rest-api/src/main/java/lcsb/mapviewer/api/projects/ProjectRestImpl.java
View file @
a55dc0c8
...
...
@@ -804,7 +804,7 @@ public class ProjectRestImpl extends BaseRestImpl {
throw
new
QueryException
(
"name cannot be empty"
);
}
background
.
setName
((
String
)
value
);
}
else
if
(
key
.
equalsIgnoreCase
(
"order
Index
"
))
{
}
else
if
(
key
.
equalsIgnoreCase
(
"order"
))
{
background
.
setOrderIndex
(
parseInteger
(
value
));
}
else
if
(
key
.
equalsIgnoreCase
(
"defaultOverlay"
))
{
background
.
setDefaultOverlay
(
parseBoolean
(
value
));
...
...
web/src/test/java/lcsb/mapviewer/web/ProjectControllerIntegrationTest.java
View file @
a55dc0c8
...
...
@@ -986,19 +986,19 @@ public class ProjectControllerIntegrationTest extends ControllerIntegrationTest
fieldWithPath
(
"progress"
)
.
type
(
JsonFieldType
.
NUMBER
)
.
description
(
"generating images progress information (in %)"
),
fieldWithPath
(
"order
Index
"
)
fieldWithPath
(
"order"
)
.
type
(
JsonFieldType
.
NUMBER
)
.
description
(
"order used when listing all backgrounds"
),
fieldWithPath
(
"
projectBackgroundImageLayer
[].id"
)
fieldWithPath
(
"
images
[].id"
)
.
type
(
JsonFieldType
.
NUMBER
)
.
ignored
(),
fieldWithPath
(
"
projectBackgroundImageLayer
[].projectBackground.id"
)
fieldWithPath
(
"
images
[].projectBackground.id"
)
.
type
(
JsonFieldType
.
NUMBER
)
.
ignored
(),
fieldWithPath
(
"
projectBackgroundImageLayer
[].directory"
)
fieldWithPath
(
"
images
[].directory"
)
.
type
(
JsonFieldType
.
STRING
)
.
description
(
"directory where background tiles are located"
),
fieldWithPath
(
"
projectBackgroundImageLayer
[].model.id"
)
fieldWithPath
(
"
images
[].model.id"
)
.
type
(
JsonFieldType
.
NUMBER
)
.
description
(
"(sub)map for which images are described"
),
fieldWithPath
(
"defaultOverlay"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment