Close the the input stream from the method parameter in the create method.
Made the ssl http client not moinitor the stale connections.
Use the new AutoCloseInputStream wrapper for replication. It will close but http client and input stream when the inputStream.close method is called.
If a format id in the system metadata is registered in the xml_catalog table, we will use the schema location for the format id to validate the xml instance;otherwise, we will use our previous way.
Close the input stream object on the MN.replicate method.
use SM.fileName if we have it. https://projects.ecoinformatics.org/ecoinfo/issues/6970
ensure there is a file extension included for the data files in a package download. https://projects.ecoinformatics.org/ecoinfo/issues/6970
Add code to print the the stack trace on the getPackage method in order to help us to identity some tmp file issues.
Also handle authentication tokens when uploading data (action=upload) by using Ben's RequestUtil.getSessionData() changes.
refs https://github.nceas.ucsb.edu/KNB/arctic-data/issues/43
In the isScienceMetacata method, the ServiceFailure exception shouldn't be caught anymore, since the code doesn't throw it.
allow Metacat API calls to be made by clients providing their identity with a DataONE auth token. https://github.nceas.ucsb.edu/KNB/arctic-data/issues/43
Add the java code to handle the ezid configuration.
Put a detal code on the InvalidRequest exception in the getPackage method.
If the pid it is a package id in the getPackage method, the method will throw an InvalidRequest exception.
Make sure to close the prepared statement on the final statement.
Close the result and connection in the finally clause to make sure they being closed.
add warning when exception encountered loading SM into map.
Add the dataone create event mapping to the select clause.
map the metacat log event INSERT, upload and UPLOAD to the dataone log event "create"
set authoritative MN to origin MN if the client did not set it on mn.create. https://projects.ecoinformatics.org/ecoinfo/issues/6938
include metacat context in the redirect after successful harvester registration login. https://projects.ecoinformatics.org/ecoinfo/issues/6936
Use the "order by" to preserve the nodes order in the replication policy.
Use the ServiceFailure to replace the InvalidRequest when it is the read-only mode (CN throws the exception).
In the replicate method, the checking of the read-only mode was moved from MNodeService class to the MNResourceHandler class since it is asynchronized.
The systemmetadataChanged method is asynchronized, so we put the read-only checking on the ResourceHandler class.
Add the code to check if the mn is on the read-only mode.
Add the code to check if the metacat is in the read-only mode.
Add the code to handle the read-only mode.
Add a class to determine if the metacat is in the readonly mode.
Add the check that only the administrator can shrink the connection pool.
Close the sql statements on the four methods - getGUID, getHeadPID, systemMetadataSIDExist and systemMetadataPIDExist.
Close some prepared sql statement in the summarize method.
merge from branch: only check for d1 rightsholder when checking permissions in original metacat code base, otherwise legacy access control tests in metcat begin to fail. https://redmine.dataone.org/issues/7560
include check for d1 rightsholder when checking permissions in original metacat code base. https://redmine.dataone.org/issues/7560
merge from 2.5.x branch: neglected to replace solr schema during 2.5.0 upgrade - this will do it for 2.5.1.
Escape the user names, group name and other information in the xml format.
Add the keyword "select" into the list.
remove "al" prefix from subquery since we are only querying one table and do not need to use a prefix.
merge from 2.5 branch: use subquery to do paging before joining to identifier table. https://redmine.dataone.org/issues/7491
Add more statement to debug the query performance.
Use conditional method for retrieving server URL (http vs https). When metacat is configured to force SSL communication we get the https url, otherwise we get http. this allows us to use the DBTransform on localhosts that are not using SSL.
Fixed a bug that the publish method should throw an io exception.
Move the editScienceMetadata method to the MNodeService class - only update packageId in EML on publish()
Fixed a bug in the condition check for the archive field in the updateSystemMetadata method.
The archived field can't be reset to false if it is true in the systemMetadataChanged method.
Doesn't allow to reset the archived field to be false if the field is true in the updateSystemMetadata method.
In the systemMetadataChanged method, we will update system metadata when the local serial version is less than or equals the comming one.
refs #7453: modified the metacatLog message from mn.synchronizationFailed to include the syncFailed.message field. Also increased the log level to WARN.
Remove the method editScienceMetadata from the update method. This method will add a packageId attribute into the eml document. Lauren will add the method to the publish method.
In the systemMetadataChanged method, the object will be archived if the new archive value is true and old value is false.The log event is recorded in the systemMetadataChanged method as well.
Make the isAuthoritativeNode throw exception if some value is null.
In the updateSystemMetadata method, we avoid to log the event twice for archive=true.
In the setReplicationStatus method, it only notified the replicas when the status is completed. Now we added the status - failed and invalid.
use idFilter for v2 getLogRecords() to match v2 API definition.
refs #7419: refactored CNodeService implementations to not throw IdentifierNotUnique for hasReservation.
In the reindex method, the error message will be sent back.
In the create method, the modification date is reset only on the objects whose authoritative member node is v1.
In the deleteReplicationMetadata method, the modification date of the system metadata will not be reset.
Modify the text of an exception.
Add contrains for the v1/v2.registerSystemMetadata method. See https://redmine.dataone.org/issues/7380
For the v1/v2 setObsoletedBy and setRightsHolder method, they only apply the objects whose authoriative member node is v1.
Add the constrains that v1/v2.archive only applies the object whose authoritative node is a v1 node.
Add the case the mn.updateSystemMetadata and cn.updateSystemMetadata will call the archive method internally.
Refactory the mn.archive and cn.archive method so the mn.update and cn.update can reuse them.
Update the packageId attribute in EML documents on update. Never display the local docid in the rendered EML.
In the archive method, add the lock.
check for auth before doing asynch call to MN dirtySysMeta implementation
Only applies the setAccessPolicy method to objects whose authoritative mn is v1.
Add a comment to specify that the setReplicationPolicy only applys to v1.
The setReplicationPolicy method only apply to the pids whose authoritative member node has v2 MNStorage.
Add the code to check if the serialVersion object is null before it is saved to the db.
Add a flag on the systemMetadataChanged method. If it is true, the authoritative member node will only accepts the serial version and replica list; the replica node accepts everything. If it is false, it will accept everything.
Add a note for the updateSystemMetadata method.
CN.updateSystemMetadata will ignore the serial version and replica list in the comming system metadata from the mn.
Add the code to check the date of system metadata modification match in MN.updateSystemMetadata only. CN.updateSystemMetadata doesn't check.
use request query string first when handling MN.query() method. https://redmine.dataone.org/issues/7384
Commented out the code to check serial version on the updateSystemMetadata method.
Add more debug messages for the isCNAdmin method.
Put a the systemMetadataChanged method into a queue, so it will not hold the block.
Change updateReplicationMetadata() and setReplicationStatus() to no longer set the dateSysmetaModified date per our discussion on 9/16/15.
Add more debug statement for the updateSystemMetadata method.
In the getLog method, if the event is null, we will set it unknown.
If the event string is null, we will skip this log in the getLog method.
Add the code to check if we can't get the current system metadata from the node in the mn.systemMetadataChanged method.If we can't find it, an InvalidRequest will be thrown.
Fixed a bug that a client can set the original member node to be null.
Change some exceptions from the InvalidSystem to the InvalidRequest in the updateSystemMetadata method.
rollback: set session.subject so libclient can look up certificate. Seems like the default behavior may have changed?
set session.subject so libclient can look up certificate. Seems like the default behavior may have changed?
use the TypeFactory to convert the Log and ObjectFormatList objects from the v2 to v1.
In the setReplicaStatus method, if the coming status is the same one of the existing one, the system metadata will not be updated.
Fixed some incorrect exceptions in the getReplica method.
In the isAdminAuthorized method, the faiure of the isNodeAdmin method will not interrupt the next check - if it is a cn.
Fixed a bug that when the count is 0, the total is incorrect in the querySystemMetadata method.
Fixed a bug the total was not correct in the querySystemMetadata method.
Use the application/bagit-097 to replace application/bagit.
Use the TypeFactory to replace the TypeMarshaller according to the change in the d1_common_java.
Use the key word "packages" to replace the "package".
Decode the string of the uri after we break the uri into parts base on the "/".