Mechanical code cleanup (sal-distributed-datastore)
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / entityownership / EntityOwnersModel.java
index aa8d654b65d86b37d2730a957e698365004cb68b..57433baf026c30138c5bd90b4f5b773cfcfd5c0d 100644 (file)
@@ -8,7 +8,7 @@
 package org.opendaylight.controller.cluster.datastore.entityownership;
 
 import java.util.Map.Entry;
-import org.opendaylight.controller.md.sal.common.api.clustering.Entity;
+import org.opendaylight.mdsal.eos.dom.api.DOMEntity;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.clustering.entity.owners.rev150804.EntityOwners;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.clustering.entity.owners.rev150804.entity.owners.EntityType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.clustering.entity.owners.rev150804.entity.owners.entity.type.entity.Candidate;
@@ -30,7 +30,7 @@ import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableOr
  *
  * @author Thomas Pantelis
  */
-final class EntityOwnersModel {
+public final class EntityOwnersModel {
     static final  QName ENTITY_QNAME = org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.
             md.sal.clustering.entity.owners.rev150804.entity.owners.entity.type.Entity.QNAME;
     static final QName CANDIDATE_NAME_QNAME = QName.create(Candidate.QNAME, "name");
@@ -111,7 +111,7 @@ final class EntityOwnersModel {
                 ImmutableNodes.leafNode(ENTITY_OWNER_QNAME, owner)).build();
     }
 
-    static String entityTypeFromEntityPath(YangInstanceIdentifier entityPath){
+    public static String entityTypeFromEntityPath(YangInstanceIdentifier entityPath){
         YangInstanceIdentifier parent = entityPath;
         while(!parent.isEmpty()) {
             if (EntityType.QNAME.equals(parent.getLastPathArgument().getNodeType())) {
@@ -123,7 +123,7 @@ final class EntityOwnersModel {
         return null;
     }
 
-    static Entity createEntity(YangInstanceIdentifier entityPath) {
+    static DOMEntity createEntity(YangInstanceIdentifier entityPath) {
         String entityType = null;
         YangInstanceIdentifier entityId = null;
         for(PathArgument pathArg: entityPath.getPathArguments()) {
@@ -138,6 +138,6 @@ final class EntityOwnersModel {
             }
         }
 
-        return new Entity(entityType, entityId);
+        return new DOMEntity(entityType, entityId);
     }
 }