A new class is used to get the version of service for a given node.
Only support the application/bagit format in the getPackage method.
Use the status of mn.ping to guess the version of the source node in the replicate method.
In the replicate method, it will use the v1.getReplica method if the source node only supports v1 replication service.
The code was added to compare the serial version in the updateSystemMetadata method. If the serial version in the new system metadata is less than or equals previous version, an exception will be thrown.
Increase the version number after updating the existing object's system metadata in the update method.
Fixed a possible null exception in the updateSystemmetadata method.
In the MN.updateSystemMetadata method, when we set the obsoletedBy and obsoletes method, we will check if those values already exist in other chains.
Add the identifier in the message of the exception when a client tries to reset the obsoletes or obsoletedBy fields.
Check the obosoletedBy and Obsoletes only can be set once.
The method of setReplicationstatus can be called by CNs and MNs.
merge from V2 impl: check for optional "failure" param instead of throwing exception when it is missing (often is). https://redmine.dataone.org/issues/7283
check for optional "failure" param instead of throwing exception when it is missing (often is). https://redmine.dataone.org/issues/7283
Fixed a possible null pointer exception bug. https://redmine.dataone.org/issues/7280
Only CNs can call those methods:CNCore.registerSystemMetadata()CNCore,updateSystemMetadata()CNReplication.setReplicationStatus()CNReplication.updateReplicationMetadata()CNReplication.deleteReplicationMetadata()
On mn.update and mn.updateSystemMetadata, those clients are allowed:1. CNs.2. Clients with appropriate permission calling the method on the authoritative nodes.
When compare the dateUploaded, now we use sysmetadata.getDateUploaded().getTime(). It used systemmetadata.getDateUploaded() (Date objects) to compare.
Add code to catch the BaseException in the updateSystemMetadata method.
Add the code to handle if the cn is null.
Handle multiple versions (v1 and v2) of a service in getCapacity method.
Use the NodeReference object to replace the replicaStatus to restrict the listObjects method.
[re]register DOI when system metadata is updated (typically access policy). https://projects.ecoinformatics.org/ecoinfo/issues/6796
Change the signature of listObject method - remove replicaStatus and add nodeId.
Add the code to call cn.synchroinize at the method of updateSystemMetadata.
Throw an exception if the request doesn't specify the name of the theme in the view method.
use objectFormat.extension in cases where we need to construct a filename for download. https://redmine.dataone.org/issues/3312
use v1 and v2 xsl as appropriate for rendering d1 types (object format list, mostly)
use MediaType from v2.SystemMetadata and v2.ObjectFormat to better determine mime-type, charset and filename for the get() method. https://redmine.dataone.org/issues/3309
Fixed a bug that two columns were missing in the sql command.
Add the code to read/write the new system metadata fields - file name, media type and media type properties into the db tables.
Add code to update smmediatypeproperties table.
Throw an exception if the saving system metadata fails.
Add the code to roll back the saved system metadata if the object can't be saved.
Don't use ssClient as a class field. Now it is a local variable. This fixed an issue that two statements using the client caused the exception - java.net.SocketTimeoutException: Read timed out.
refs: #7092. found another unclosed inputStream, this time in ReplicationService.handleForceReplicationDataFileRequest(...).
fixes #7092: added finally clause to ReplicationHandler.update method to unconditionally close the inputStreams it keeps in a Vector. Needs testing.
Add the code to check if the client is trying to update an archived object. If it is, reject it.
Add a new method -updateSystemMetadata. It only can be called by CNs.
Refactory the authorize methods on D1NodeService.Add the check for whom can call mn.updatesystemMetadata.
Committed the change which Andreit did. 1. Add the code for synchronize(not implemented)2. Add the code for addForm.
remove portal servlet and configuration - no need for this if we are supporting auth tokens from authentication service.
defer to D1 PortalCertificateManager to pull authentication credentials from the request before defering to old Metacat cookie session
Add the code to check the authorization of the client which is reindexing a pid.
Created the updateSystemMetadata method.
Add the code to check if the current node is the authoritative node for the the given pid.
Add the check of permission to update the system metadata.
add whoami endpoint to make debugging authn/authz easier as we use additional mechanisms for proving identity.
Remove the code to check sid on create and registerSystemMetadata.
Fixed a bug that put the detail code in a wrong position.
Add the code to check if a user tries to modify an immutable field on system metadata.
If an Event object is null in the v1 log entry, we won't add it to the log.
use singleton for getting JWT token - refactor in d1_portal project
use secure context url for loading XSLTs in db transform
ReplicationServices.getUrlStream(url) callers were not closing the inputstream properly, as was revealed when switching to libclient v2 (a pooling connection manager in HttpClient) and encountering reasource leaks.
remove classes annotator classes that have moved to a different project under dataone's github.
bullet-proofed exception handling in ReplicationService.getURLStream, to make sure client communication exceptions are handled and logged.
fixed getSSLClient method.
fixed class name typo.
fixed private getSSLClient method for HttpClient v4.3 compatibility. Now also caching the RestClient for reuse to save overhead.
Make the REST api work for views.
Add the code to support CNView interface in CNodeService. Both CNodeService and MNodeService share the same code base.
Transform the ObjectFormat from v2 to v1 in getFormat method.
Add a read timeout for the connection. See bug https://projects.ecoinformatics.org/ecoinfo/issues/6684:wq
Convert the v2 system metadata object to v1 in the getSystemMetadata method.
Use the log to the replace system.out.print.
The setObsoletedBy only handles PID.
The method setObsoletedBy only hanldes SID.
Added the code to handle put method in meta url. See bug https://projects.ecoinformatics.org/ecoinfo/issues/6666
Add the code to handle the PUT method for meta url. See https://projects.ecoinformatics.org/ecoinfo/issues/6666.
Add the code to get the head version.
Add the timestamp for the printing out the start and end of hazelcast synchronization.
Call the method lock.lock() immediately after getting the lock. Otherwise, if an exception happened between the two calls (in another word, lock.lock() was called), lock.unlock() can cause an issue:Current thread is not owner of lock!See https://redmine.dataone.org/issues/6836.
Add a cap to only write 512 characters of the user-agent to db.
Modify v1 and v2 calls to MultipartRequestResolver to use MAX_UPLOAD_SIZE from configuration.
The constrcutor of EventLogData missed the user-agent field. So the user-agent wasn't recorded. The bug was fixed.
organize imports. move exception-throwing method call into try block.
use HttpMultipartRestClient since the DefaultHttpMultipartRestClient was removed from d1_libclient_java
Updated D1ResourceHandler to not hardcode a file size limit. This will allowlarge, multi-gigabyte files to be uploaded, but still needs testing. The limitis now drawn from the metacat.properties file. An alternative would be to inspectthe Content-Length header of the request and set the max to a value greater than the...
The setReplicationStatus method only supports sid and the setRightsHolder method supports both PID and SID.
Add the code transform a sid to a pid in publish, getPackage and view method. Fefer dataONE #6734.
Fixed a bug that it should use getReplica rather than get method.
The CN.setReplicationPolicy method now only support PIDs. Refer to https://redmine.dataone.org/issues/6734.
Went through the v2 ObjectFormatList and convert every v2 ObjectFormat to v1 ObjectFormat and put them into a v1 objectFormatList.
Add the log messages to indicate the hazelcast synchronization starting and ending.
Add the code to handle sid in the publish method.
Add the code to exclude the sid in the view and getPackage.
Add a converter to convert the V2 Log object to the V1 Log object.
Add the rules to check the if a sid is valid in the updateSystemMetadata method.
Implemented the feature to support the identifier(both sid and pid) feature in the objectLists method.
The MN.listobjects and CN.listobjects methods will call the one in the D1NodeService class.
Add the code to check if the pid is an SID in the registerSystemMetadata method.
Add code to check if the sid equals pid for the method checkSidInRegisterSystemMetadata.
Moved the rules for the SID from D1NodeService.create to MNodeService.create.Also moved the code to check the validation of an pid from D1NodeService.create to MNodeService.create, MNodeService.replicate and CNodeService.create.
Add the code to check if a sid is legitimate in the method create and registerSystemMetadata.
The the code to handle sids on the v2 api - setReplicationPolicy, setReplicationStatus, setAccessPolicy and setObsoletedBy.
Add the code to handle if a identifier is a sid in setAccessPolicy, setReplicationPolicy, setObsoletedBy and setRreplicationStatus.
Comment out a print of an error message. It will show up for every public request.
Add the code to handle SID in the getLogRecords method.
In the getLogRecords method, the pidFilter is checked if it exists.