Project

General

Profile

« Previous | Next » 

Revision 9070

Added by Jing Tao over 9 years ago

Add the code to check if the pid is an SID in the registerSystemMetadata method.

View differences:

CNodeService.java
1168 1168
          throw new NotAuthorized("4861", "No Session - could not authorize for registration." +
1169 1169
                  "  If you are not logged in, please do so and retry the request.");
1170 1170
      }
1171
      // the identifier can't be an SID
1172
      try {
1173
          if(IdentifierManager.getInstance().systemMetadataSIDExists(pid)) {
1174
              throw new InvalidRequest("4863", "The provided identifier "+pid.getValue()+" is a series id which is not allowed.");
1175
          }
1176
      } catch (SQLException sqle) {
1177
          throw new ServiceFailure("4862", "Couldn't determine if the pid "+pid.getValue()+" is a series id since "+sqle.getMessage());
1178
      }
1171 1179
      
1172 1180
      // verify that guid == SystemMetadata.getIdentifier()
1173 1181
      logMetacat.debug("Comparing guid|sysmeta_guid: " + pid.getValue() + 

Also available in: Unified diff