Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Backend
Commits
31107cba
Commit
31107cba
authored
Jan 06, 2014
by
Matija Obreza
Browse files
Allow updating accession UUID with REST call
parent
463def3e
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/genesys2/server/service/impl/BatchRESTServiceImpl.java
View file @
31107cba
...
...
@@ -19,6 +19,7 @@ package org.genesys2.server.service.impl;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.UUID
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.logging.Log
;
...
...
@@ -107,6 +108,20 @@ public class BatchRESTServiceImpl implements BatchRESTService {
updated
=
true
;
}
}
value
=
accnJson
.
get
(
"uuid"
);
if
(
value
!=
null
)
{
String
uuid
=
value
.
isNull
()
?
null
:
value
.
textValue
();
if
(!
StringUtils
.
equals
(
uuid
,
accession
.
getUuid
()))
{
if
(
uuid
!=
null
)
{
// Throws a runtime exception if format is invalid
UUID
.
fromString
(
uuid
);
}
accession
.
setUuid
(
uuid
);
updated
=
true
;
}
}
value
=
accnJson
.
get
(
"acqDate"
);
if
(
value
!=
null
)
{
String
acqDate
=
value
.
isNull
()
?
null
:
value
.
textValue
();
...
...
src/main/resources/content/language.properties
View file @
31107cba
...
...
@@ -150,6 +150,7 @@ ce.methods=Methods
ce.method
=
Method
method.fieldName
=
DB Field
accession.uuid
=
UUID
accession.accessionName
=
Accession
accession.origin
=
Country of origin
accession.holdingInstitute
=
Holding institute
...
...
src/main/webapp/WEB-INF/jsp/accession/details.jsp
View file @
31107cba
...
...
@@ -66,6 +66,12 @@
<td><spring:message
code=
"accession.accessionName"
/></td>
<td><c:out
value=
"
${
accession
.
accessionName
}
"
/></td>
</tr>
<c:if
test=
"
${
accession
.
uuid
ne
null
}
"
>
<tr>
<td><spring:message
code=
"accession.uuid"
/></td>
<td><b><c:out
value=
"
${
accession
.
uuid
}
"
/></b></td>
</tr>
</c:if>
<c:if
test=
"
${
crops
ne
null
}
"
>
<tr>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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