class ContextualPreferenceManager {

    @Transactional
    public ContextualPreference delete(final String name, final ContextualPreferenceExternalResource resource) {
        validateName(name);
        validateResource(resource);
        final ContextualPreference preference = load(name, resource);
        contextualPreferenceDao.delete(name, resource);
        return preference;
    }

}