BUG-997: Evolve the SchemaRegistry concepts
[yangtools.git] / yang / yang-model-util / src / main / java / org / opendaylight / yangtools / yang / model / repo / util / AbstractSchemaSourceRegistration.java
index 9ed0afefc727eb1771d8055a7a661433cafd6128..241cc15996426321cf2f4051cd5a8c8a0f1e0444 100644 (file)
@@ -10,19 +10,20 @@ package org.opendaylight.yangtools.yang.model.repo.util;
 import com.google.common.base.Preconditions;
 
 import org.opendaylight.yangtools.concepts.AbstractObjectRegistration;
-import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
+import org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation;
+import org.opendaylight.yangtools.yang.model.repo.spi.PotentialSchemaSource;
 import org.opendaylight.yangtools.yang.model.repo.spi.SchemaSourceProvider;
 import org.opendaylight.yangtools.yang.model.repo.spi.SchemaSourceRegistration;
 
-public abstract class AbstractSchemaSourceRegistration extends AbstractObjectRegistration<SourceIdentifier> implements SchemaSourceRegistration {
+public abstract class AbstractSchemaSourceRegistration<T extends SchemaSourceRepresentation> extends AbstractObjectRegistration<PotentialSchemaSource<T>> implements SchemaSourceRegistration<T> {
     private final SchemaSourceProvider<?> provider;
 
-    protected AbstractSchemaSourceRegistration(final SourceIdentifier identifier, final SchemaSourceProvider<?> provider) {
-        super(identifier);
+    protected AbstractSchemaSourceRegistration(final SchemaSourceProvider<?> provider, final PotentialSchemaSource<T> source) {
+        super(source);
         this.provider = Preconditions.checkNotNull(provider);
     }
 
-    protected SchemaSourceProvider<?> getProvider() {
+    protected final SchemaSourceProvider<?> getProvider() {
         return provider;
     }
 }