com.github.restup.registry.settings.BasicRegistrySettings Maven / Gradle / Ivy
package com.github.restup.registry.settings;
import java.util.Comparator;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import com.github.restup.bind.MethodArgumentFactory;
import com.github.restup.bind.converter.ConverterFactory;
import com.github.restup.bind.converter.ParameterConverterFactory;
import com.github.restup.errors.ErrorFactory;
import com.github.restup.mapping.DefaultMappedClassFactory;
import com.github.restup.mapping.MappedClassFactory;
import com.github.restup.mapping.MappedClassRegistry;
import com.github.restup.mapping.fields.MappedField;
import com.github.restup.mapping.fields.MappedFieldBuilderVisitor;
import com.github.restup.mapping.fields.MappedFieldFactory;
import com.github.restup.path.ResourcePathsProvider;
import com.github.restup.query.Pagination;
import com.github.restup.registry.ResourceRegistryRepository;
import com.github.restup.repository.RepositoryFactory;
import com.github.restup.service.model.request.RequestObjectFactory;
import com.google.common.collect.ImmutableList;
/**
* Configures settings and implementations to be used by registry.
*/
public class BasicRegistrySettings implements RegistrySettings {
private final ResourceRegistryRepository resourceRegistryRepository;
private final MappedClassFactory mappedClassFactory;
private final MappedClassRegistry mappedClassRegistry;
private final List packagesToScan;
private final MappedFieldFactory mappedFieldFactory;
private final MappedFieldBuilderVisitor[] mappedFieldVisitors;
private final Comparator> mappedFieldOrderComparator;
private final ControllerMethodAccess defaultControllerAccess;
private final ServiceMethodAccess defaultServiceAccess;
private final Pagination defaultPagination;
private final ResourcePathsProvider defaultSparseFieldsProvider;
private final ResourcePathsProvider defaultRestrictedFieldsProvider;
private final RepositoryFactory repositoryFactory;
private final ErrorFactory errorFactory;
private final RequestObjectFactory requestObjectFactory;
private final MethodArgumentFactory methodArgumentFactory;
private final ConverterFactory converterFactory;
private final ParameterConverterFactory parameterConverterFactory;
private final List