[DS-3024] Move permanence logic from entity class to its service class.

This commit is contained in:
Mark H. Wood
2016-02-03 12:46:43 -05:00
parent b8a862bc1e
commit 65b6e7276e
2 changed files with 6 additions and 6 deletions

View File

@@ -90,7 +90,10 @@ public class GroupServiceImpl extends DSpaceObjectServiceImpl<Group> implements
@Override
public void setName(Context context, Group group, String name) throws SQLException {
group.setName(context, name);
if (!group.isPermanent())
group.setName(context, name);
else
throw new SQLException("Attempt to rename a permanent Group");
}
@Override