DSpace dspace = new DSpace();
ApplicationService applicationService = dspace.getServiceManager()
.getServiceByName("applicationService",
ApplicationService.class);
RelationPreferenceService relationPreferenceService = dspace
.getServiceManager()
.getServiceByName(
"org.dspace.app.cris.service.RelationPreferenceService",
RelationPreferenceService.class);
List<RelationPreference> rejected = new ArrayList<RelationPreference>();
for (RelationPreferenceConfiguration configuration : relationPreferenceService
.getConfigurationService().getList())
{
if (configuration.getRelationConfiguration().getRelationClass().equals(Item.class))
{
rejected = applicationService