Martin Betak has uploaded a new change for review. Change subject: backend: Make several entities implement Nameable ......................................................................
backend: Make several entities implement Nameable Change-Id: Icaa0e531e88f041f28645c6892f651d93a5aed18 Signed-off-by: Martin Betak <[email protected]> --- M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/MacPool.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Quota.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Role.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterVolumeProfileStats.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/qos/QosBase.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/scheduling/ClusterPolicy.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/scheduling/PolicyUnit.java 7 files changed, 16 insertions(+), 7 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/49/38549/1 diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/MacPool.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/MacPool.java index 57470d4..b5a661d 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/MacPool.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/MacPool.java @@ -10,7 +10,7 @@ import org.ovirt.engine.core.common.validation.group.UpdateEntity; import org.ovirt.engine.core.compat.Guid; -public class MacPool extends IVdcQueryable implements BusinessEntity<Guid> { +public class MacPool extends IVdcQueryable implements BusinessEntity<Guid>, Nameable { private static final long serialVersionUID = -7952435653821354188L; diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Quota.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Quota.java index 79dbfed..1da9d67 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Quota.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Quota.java @@ -26,7 +26,7 @@ * <BR/> * Take in notice there can not be general limitation and specific limitation on the same resource type. */ -public class Quota extends IVdcQueryable implements BusinessEntity<Guid> { +public class Quota extends IVdcQueryable implements BusinessEntity<Guid>, Nameable { /** * Automatic generated serial version ID. @@ -220,6 +220,11 @@ return quotaName; } + @Override + public String getName() { + return getQuotaName(); + } + /** * @param quotaName * the quotaName to set diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Role.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Role.java index bb10bf6..8b112c7 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Role.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Role.java @@ -10,7 +10,7 @@ import org.ovirt.engine.core.common.validation.group.UpdateEntity; import org.ovirt.engine.core.compat.Guid; -public class Role extends IVdcQueryable implements BusinessEntity<Guid> { +public class Role extends IVdcQueryable implements BusinessEntity<Guid>, Nameable { private static final long serialVersionUID = 1487620954798772886L; @Size(max = BusinessEntitiesDefinitions.GENERAL_MAX_SIZE) diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterVolumeProfileStats.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterVolumeProfileStats.java index e3441f2..f5deb83 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterVolumeProfileStats.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterVolumeProfileStats.java @@ -3,9 +3,10 @@ import java.io.Serializable; import java.util.List; +import org.ovirt.engine.core.common.businessentities.Nameable; import org.ovirt.engine.core.common.utils.ObjectUtils; -public class GlusterVolumeProfileStats implements Serializable { +public class GlusterVolumeProfileStats implements Serializable, Nameable { private static final long serialVersionUID = 1L; private String name; diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/qos/QosBase.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/qos/QosBase.java index 53faa50..1d7e366 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/qos/QosBase.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/qos/QosBase.java @@ -8,13 +8,14 @@ import org.ovirt.engine.core.common.businessentities.BusinessEntitiesDefinitions; import org.ovirt.engine.core.common.businessentities.BusinessEntity; import org.ovirt.engine.core.common.businessentities.IVdcQueryable; +import org.ovirt.engine.core.common.businessentities.Nameable; import org.ovirt.engine.core.common.validation.annotation.ValidI18NName; import org.ovirt.engine.core.compat.Guid; /** * Base class for QoS objects derived class will hold qos limit according to type. */ -public class QosBase extends IVdcQueryable implements BusinessEntity<Guid>, Serializable { +public class QosBase extends IVdcQueryable implements BusinessEntity<Guid>, Serializable, Nameable { private static final String UNLIMITED = "Unlimited"; private static final long serialVersionUID = 1122772549710787678L; diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/scheduling/ClusterPolicy.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/scheduling/ClusterPolicy.java index e512fe9..ac8c61f 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/scheduling/ClusterPolicy.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/scheduling/ClusterPolicy.java @@ -6,13 +6,14 @@ import org.ovirt.engine.core.common.businessentities.BusinessEntity; import org.ovirt.engine.core.common.businessentities.IVdcQueryable; +import org.ovirt.engine.core.common.businessentities.Nameable; import org.ovirt.engine.core.common.utils.Pair; import org.ovirt.engine.core.compat.Guid; /** * Bussiness entity for cluster policy, holds logic for host selections and load balancing logic. */ -public class ClusterPolicy extends IVdcQueryable implements BusinessEntity<Guid>, Serializable { +public class ClusterPolicy extends IVdcQueryable implements BusinessEntity<Guid>, Serializable, Nameable { private static final long serialVersionUID = 7739745365583134911L; /** diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/scheduling/PolicyUnit.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/scheduling/PolicyUnit.java index dbad619..1b5cbd0 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/scheduling/PolicyUnit.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/scheduling/PolicyUnit.java @@ -5,12 +5,13 @@ import org.ovirt.engine.core.common.businessentities.BusinessEntity; import org.ovirt.engine.core.common.businessentities.IVdcQueryable; +import org.ovirt.engine.core.common.businessentities.Nameable; import org.ovirt.engine.core.compat.Guid; /** * Policy unit BE represents scheduling unit with the following methods: filter, score & balance. */ -public class PolicyUnit extends IVdcQueryable implements BusinessEntity<Guid>, Serializable { +public class PolicyUnit extends IVdcQueryable implements BusinessEntity<Guid>, Serializable, Nameable { private static final long serialVersionUID = 7739555364433134921L; /** -- To view, visit https://gerrit.ovirt.org/38549 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icaa0e531e88f041f28645c6892f651d93a5aed18 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Betak <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
