Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
minerva
core
Commits
db307666
Commit
db307666
authored
6 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
error message is more appropriate
parent
19d4f8f3
No related branches found
No related tags found
2 merge requests
!412
changes from 12.1.0~beta.1 into master
,
!405
Resolve "Custom overlays are not sorted in numeric order"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
rest-api/src/main/java/lcsb/mapviewer/api/projects/overlays/OverlayRestImpl.java
+7
-5
7 additions, 5 deletions
...lcsb/mapviewer/api/projects/overlays/OverlayRestImpl.java
with
7 additions
and
5 deletions
rest-api/src/main/java/lcsb/mapviewer/api/projects/overlays/OverlayRestImpl.java
+
7
−
5
View file @
db307666
...
...
@@ -241,7 +241,7 @@ public class OverlayRestImpl extends BaseRestImpl {
layoutDao
.
update
(
layout
);
return
getOverlayById
(
token
,
layout
.
getModel
().
getProject
().
getProjectId
(),
overlayId
);
}
catch
(
NumberFormatException
e
)
{
throw
new
ObjectNotFoundException
(
"overlay doesn't exist"
);
throw
new
QueryException
(
"invliad overlay id"
,
e
);
}
}
...
...
@@ -314,7 +314,8 @@ public class OverlayRestImpl extends BaseRestImpl {
}
public
Map
<
String
,
Object
>
addOverlay
(
String
token
,
String
projectId
,
String
name
,
String
description
,
String
content
,
String
fileId
,
String
filename
,
String
type
,
String
googleLicenseConsent
)
throws
SecurityException
,
QueryException
,
IOException
{
String
fileId
,
String
filename
,
String
type
,
String
googleLicenseConsent
)
throws
SecurityException
,
QueryException
,
IOException
{
User
user
=
getUserService
().
getUserByToken
(
token
);
if
(
Configuration
.
ANONYMOUS_LOGIN
.
equals
(
user
.
getLogin
()))
{
throw
new
SecurityException
(
"You have no privileges to add overlay"
);
...
...
@@ -355,9 +356,10 @@ public class OverlayRestImpl extends BaseRestImpl {
}
}
Layout
layout
=
layoutService
.
createLayout
(
new
CreateLayoutParams
().
async
(
false
).
colorInputStream
(
stream
)
.
description
(
description
).
layoutFileName
(
filename
).
model
(
model
).
name
(
name
).
user
(
user
)
.
colorSchemaType
(
colorSchemaType
).
directory
(
"."
).
googleLicenseConsent
(
googleLicenseConsent
.
equalsIgnoreCase
(
"true"
)));
Layout
layout
=
layoutService
.
createLayout
(
new
CreateLayoutParams
().
async
(
false
).
colorInputStream
(
stream
).
description
(
description
)
.
layoutFileName
(
filename
).
model
(
model
).
name
(
name
).
user
(
user
).
colorSchemaType
(
colorSchemaType
)
.
directory
(
"."
).
googleLicenseConsent
(
googleLicenseConsent
.
equalsIgnoreCase
(
"true"
)));
int
count
=
layoutService
.
getCustomLayouts
(
model
,
token
,
false
,
user
).
size
();
layout
.
setOrderIndex
(
count
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment