Mike Kolesnik has posted comments on this change.
Change subject: core: Added Provider class
......................................................................
Patch Set 15: (5 inline comments)
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/Provider.java
Line 1: package org.ovirt.engine.core.common.businessentities;
Line 2:
Line 3: import org.ovirt.engine.core.compat.Guid;
Line 4:
Done
Line 5: public class Provider extends IVdcQueryable implements
BusinessEntity<Guid> {
Line 6:
Line 7: private static final long serialVersionUID = 8279455368568715758L;
Line 8:
Line 10:
Line 11: private String name;
Line 12:
Line 13: private String description;
Line 14:
The URL is the endpoint address, if there will be authentication data it will
be in separate location (currently there is no authentication support, since
this is an open issue).
Line 15: private String url;
Line 16:
Line 17: public String getName() {
Line 18: return name;
Line 11: private String name;
Line 12:
Line 13: private String description;
Line 14:
Line 15: private String url;
I haven't found a good way to validate URL in java.
If you know of a good method please suggest, but using java.net.URL is not good
enough.
I did add some other validations to this class in a later patch..
As regards to class, since we're using GWT serialization, I'm not sure that we
can use java.net.URL so I preferred to be on the safe side.
Line 16:
Line 17: public String getName() {
Line 18: return name;
Line 19: }
Line 69: if (this == obj)
Line 70: return true;
Line 71: if (obj == null)
Line 72: return false;
Line 73: if (getClass() != obj.getClass())
Done
Line 74: return false;
Line 75: Provider other = (Provider) obj;
Line 76: if (getId() == null) {
Line 77: if (other.getId() != null)
Line 98:
Line 99: @Override
Line 100: public String toString() {
Line 101: StringBuilder builder = new StringBuilder();
Line 102: builder.append("NetworkProvider [name=")
Done
Line 103: .append(getName())
Line 104: .append(", description=")
Line 105: .append(getDescription())
Line 106: .append(", url=")
--
To view, visit http://gerrit.ovirt.org/10783
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I67e42286f513cf47dd057a6078ea365d6dff24e9
Gerrit-PatchSet: 15
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Itamar Heim <[email protected]>
Gerrit-Reviewer: Livnat Peer <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches