class ContextualPreferenceManager {

    public ContextualPreference load(final String name, final ContextualPreferenceExternalResource resource) {
        validateName(name);
        validateResource(resource);
        return contextualPreferenceDao.load(name, resource)
                .orElseThrow(() -> new IllegalArgumentException(messageHelper.getMessage(
                        MessageConstants.ERROR_CONTEXTUAL_PREFERENCE_NOT_FOUND, name, resource)));
    }

}