private void downgradeProfile(OrcidProfile orcidProfile) { if (orcidProfile != null) { if(orcidProfile.getOrcidHistory() !=null && orcidProfile.getOrcidHistory().getCreationMethod() != null) { CreationMethod c = orcidProfile.getOrcidHistory().getCreationMethod(); if (c.equals(CreationMethod.MEMBER_REFERRED) || c.equals(CreationMethod.DIRECT)) orcidProfile.getOrcidHistory().setCreationMethod(CreationMethod.WEBSITE); } orcidProfile.setFundings(null); } }
history.setClaimed(new Claimed(confirmed)); String creationMethod = profileEntity.getCreationMethod(); history.setCreationMethod(CreationMethod.isValid(creationMethod) ? CreationMethod.fromValue(creationMethod) : CreationMethod.WEBSITE); history.setSource(getSponsor(profileEntity));