Project

General

Profile

« Previous | Next » 

Revision 10278

Added by Jing Tao over 7 years ago

Add the checksum parameter to the handleInsertorUpdate method.

View differences:

src/edu/ucsb/nceas/metacat/MetacatHandler.java
75 75
import org.apache.commons.lang.StringEscapeUtils;
76 76
import org.apache.log4j.Logger;
77 77
import org.dataone.service.types.v1.AccessPolicy;
78
import org.dataone.service.types.v1.Checksum;
78 79
import org.dataone.service.types.v1.Event;
79 80
import org.dataone.service.types.v1.Identifier;
80 81
import org.dataone.service.types.v1.Session;
......
1656 1657
     */
1657 1658
    public String handleInsertOrUpdateAction(String ipAddress, String userAgent,
1658 1659
            HttpServletResponse response, PrintWriter out, Hashtable<String, String[]> params,
1659
            String user, String[] groups, boolean generateSystemMetadata, boolean writeAccessRules, byte[] xmlBytes, String formatId) {
1660
            String user, String[] groups, boolean generateSystemMetadata, boolean writeAccessRules, byte[] xmlBytes, String formatId, Checksum checksum) {
1660 1661
        Logger logMetacat = Logger.getLogger(MetacatHandler.class);
1661 1662
        DBConnection dbConn = null;
1662 1663
        int serialNumber = -1;
......
3267 3268
                boolean writeAccessRules = true;
3268 3269
                //call the insert routine
3269 3270
                String formatId = null;
3271
                Checksum checksum = null;//for Metacat API, we don't calculate the checksum
3270 3272
                handleInsertOrUpdateAction(request.getRemoteAddr(), request.getHeader("User-Agent"), response, out, 
3271
                          params, username, groupnames, true, writeAccessRules, null, formatId);
3273
                          params, username, groupnames, true, writeAccessRules, null, formatId, checksum);
3272 3274
              }
3273 3275
              catch(Exception e)
3274 3276
              {

Also available in: Unified diff