Replace deprecated setMetadata() that uses removed field names. #2956

Once upon a time, DSOs had dedicated fields for some metadata.  These were
moved into the Metadatavalue table long ago, but there were still methods
which used the old field names instead of proper MetadataField triplets.
This commit is contained in:
Mark H. Wood
2020-11-17 12:25:48 -05:00
parent 3e7ac5d935
commit e94911ba19
13 changed files with 163 additions and 166 deletions

View File

@@ -549,7 +549,7 @@ public class EPersonServiceImpl extends DSpaceObjectServiceImpl<EPerson> impleme
@Override
public List<String> getDeleteConstraints(Context context, EPerson ePerson) throws SQLException {
List<String> tableList = new ArrayList<String>();
List<String> tableList = new ArrayList<>();
// check for eperson in item table
Iterator<Item> itemsBySubmitter = itemService.findBySubmitter(context, ePerson, true);
@@ -603,12 +603,6 @@ public class EPersonServiceImpl extends DSpaceObjectServiceImpl<EPerson> impleme
return getMetadataFirstValue(dso, MDValue[0], MDValue[1], MDValue[2], Item.ANY);
}
@Override
public void setMetadata(Context context, EPerson ePerson, String field, String value) throws SQLException {
String[] MDValue = getMDValueByLegacyField(field);
setMetadataSingleValue(context, ePerson, MDValue[0], MDValue[1], MDValue[2], null, value);
}
@Override
public List<EPerson> findUnsalted(Context context) throws SQLException {
return ePersonDAO.findWithPasswordWithoutDigestAlgorithm(context);