Remove deprecated SchemaRepository.createSchemaContextFactory()
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / repo / api / SchemaRepository.java
index 5418e49c63fe359cff90fdec2bf728471c00d29c..6959d0aded23f7b42d9ee31181768bb6361ae719 100644 (file)
@@ -19,24 +19,21 @@ import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 @Beta
 public interface SchemaRepository {
     /**
-     * Instantiate a new {@link SchemaContextFactory}, which will filter available schema sources using the provided
-     * filter.
+     * Returns {@link SchemaContextFactory} with supplied configuration.
      *
-     * @param filter Filter which acts as the gating function before a schema source is considered by the factory
-     *               for inclusion in the {@link SchemaContext} it produces.
-     * @return A new schema context factory.
-     * @deprecated Use {@link #createSchemaContextFactory(SchemaContextFactoryConfiguration)} instead.
+     * @param config configuration of schema context factory.
+     * @return schema context factory.
      */
-    @Deprecated
-    @NonNull SchemaContextFactory createSchemaContextFactory(@NonNull SchemaSourceFilter filter);
+    @NonNull SchemaContextFactory createSchemaContextFactory(@NonNull SchemaContextFactoryConfiguration config);
 
     /**
-     * Returns {@link SchemaContextFactory} with supplied configuration.
+     * Returns {@link SchemaContextFactory} with {@link SchemaContextFactoryConfiguration#getDefault()}.
      *
-     * @param config configuration of schema context factory.
      * @return schema context factory.
      */
-    @NonNull SchemaContextFactory createSchemaContextFactory(@NonNull SchemaContextFactoryConfiguration config);
+    default @NonNull SchemaContextFactory createSchemaContextFactory() {
+        return createSchemaContextFactory(SchemaContextFactoryConfiguration.getDefault());
+    }
 
     <T extends SchemaSourceRepresentation> @NonNull ListenableFuture<T> getSchemaSource(@NonNull SourceIdentifier id,
             @NonNull Class<T> represetation);