use of org.orcid.jaxb.model.v3.dev1.groupid.GroupIdRecord in project ORCID-Source by ORCID.
the class MemberV3ApiServiceDelegatorImpl method createGroupIdRecord.
@Override
public Response createGroupIdRecord(GroupIdRecord groupIdRecord) {
orcidSecurityManager.checkScopes(ScopePathType.GROUP_ID_RECORD_UPDATE);
GroupIdRecord newRecord = groupIdRecordManager.createGroupIdRecord(groupIdRecord);
try {
return Response.created(new URI(String.valueOf(newRecord.getPutCode()))).build();
} catch (URISyntaxException ex) {
throw new RuntimeException(localeManager.resolveMessage("apiError.creategroupidrecord_response.exception"), ex);
}
}
use of org.orcid.jaxb.model.v3.dev1.groupid.GroupIdRecord in project ORCID-Source by ORCID.
the class MemberV3ApiServiceDelegatorImpl method updateGroupIdRecord.
@Override
public Response updateGroupIdRecord(GroupIdRecord groupIdRecord, Long putCode) {
orcidSecurityManager.checkScopes(ScopePathType.GROUP_ID_RECORD_UPDATE);
if (!putCode.equals(groupIdRecord.getPutCode())) {
Map<String, String> params = new HashMap<String, String>();
params.put("urlPutCode", String.valueOf(putCode));
params.put("bodyPutCode", String.valueOf(groupIdRecord.getPutCode()));
throw new MismatchedPutCodeException(params);
}
GroupIdRecord updatedRecord = groupIdRecordManager.updateGroupIdRecord(putCode, groupIdRecord);
return Response.ok(updatedRecord).build();
}
Aggregations