YANGTOOLS-812: Add SchemaContextFactory control of deviations
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / repo / api / SchemaRepository.java
index cefd55868eeb84b392d66d284b3ca16dd217e897..c3936f40b09ee0465d8398223cde2576935b602b 100644 (file)
@@ -19,16 +19,30 @@ 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.
+     * Instantiate a new {@link SchemaContextFactory}, which will filter
+     * available schema sources using the provided filter.
      *
-     * @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.
+     * @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.
      */
+    @Deprecated
     SchemaContextFactory createSchemaContextFactory(@Nonnull SchemaSourceFilter filter);
 
+    /**
+     * Returns {@link SchemaContextFactory} with supplied configuration.
+     *
+     * @param config
+     *            configuration of schema context factory.
+     * @return schema context factory.
+     */
+    SchemaContextFactory createSchemaContextFactory(@Nonnull SchemaContextFactoryConfiguration config);
+
     <T extends SchemaSourceRepresentation> ListenableFuture<T> getSchemaSource(@Nonnull SourceIdentifier id,
             @Nonnull Class<T> represetation);
 }