Revision 6525
Added by ben leinfelder over 13 years ago
src/edu/ucsb/nceas/metacat/dataone/MNodeService.java | ||
---|---|---|
27 | 27 |
import java.io.InputStream; |
28 | 28 |
import java.security.NoSuchAlgorithmException; |
29 | 29 |
import java.sql.SQLException; |
30 |
import java.util.Calendar; |
|
30 | 31 |
import java.util.Date; |
31 | 32 |
import java.util.List; |
32 | 33 |
import java.util.Timer; |
... | ... | |
274 | 275 |
|
275 | 276 |
// set the submitter to match the certificate |
276 | 277 |
sysmeta.setSubmitter(subject); |
278 |
// set the dates |
|
279 |
Date now = Calendar.getInstance().getTime(); |
|
280 |
sysmeta.setDateSysMetadataModified(now); |
|
281 |
sysmeta.setDateUploaded(now); |
|
277 | 282 |
|
278 | 283 |
// does the subject have WRITE ( == update) priveleges on the pid? |
279 | 284 |
allowed = isAuthorized(session, pid, Permission.WRITE); |
... | ... | |
347 | 352 |
// set the originating node |
348 | 353 |
NodeReference originMemberNode = this.getCapabilities().getIdentifier(); |
349 | 354 |
sysmeta.setOriginMemberNode(originMemberNode); |
355 |
// set the dates |
|
356 |
Date now = Calendar.getInstance().getTime(); |
|
357 |
sysmeta.setDateSysMetadataModified(now); |
|
358 |
sysmeta.setDateUploaded(now); |
|
350 | 359 |
// call the shared impl |
351 | 360 |
return super.create(session, pid, object, sysmeta); |
352 | 361 |
} |
Also available in: Unified diff
set date uploaded and date system metadata updated date to current time when calling MN.create() and MN.update()