diff --git a/domain/src/main/java/es/uvigo/esei/xcs/domain/entities/Owner.java b/domain/src/main/java/es/uvigo/esei/xcs/domain/entities/Owner.java index decf5df4d3fbc37cdbcab3d1913f7c2804d73fe7..ca9317318cab177e99a49b5b943a2d633df3b1c6 100644 --- a/domain/src/main/java/es/uvigo/esei/xcs/domain/entities/Owner.java +++ b/domain/src/main/java/es/uvigo/esei/xcs/domain/entities/Owner.java @@ -79,9 +79,8 @@ public class Owner extends User implements Serializable { } /** - * Returns the pets that belongs to this owner. The collection returned is + * Returns the pets that belong to this owner. The collection returned is * unmodifiable and no order are guaranteed. - * If the pet already belongs to this owner, no action will be done. * * @return the pets that belongs to this owner. */ @@ -138,6 +137,8 @@ public class Owner extends User implements Serializable { /** * Adds a pet directly to the pets collection of this owner if the pet does * not already belongs to this owner. The pet's owner will not be updated. + * If the pet already belongs to this owner, no action will be done. + * * * @param pet the pet to add to this owner. {@code null} values not * supported. diff --git a/domain/src/main/java/es/uvigo/esei/xcs/domain/entities/Pet.java b/domain/src/main/java/es/uvigo/esei/xcs/domain/entities/Pet.java index 0fe3e20c64f9aa3f25fa10a8a4edce5e6091c4fc..d2338b27c6d2d3eb27c0c98e25be078957ba1933 100644 --- a/domain/src/main/java/es/uvigo/esei/xcs/domain/entities/Pet.java +++ b/domain/src/main/java/es/uvigo/esei/xcs/domain/entities/Pet.java @@ -103,6 +103,11 @@ public class Pet implements Serializable { this.setOwner(owner); } + /** + * Returns the identifier of this pet. + * + * @return the identifier of this pet. + */ public int getId() { return id; } @@ -195,7 +200,7 @@ public class Pet implements Serializable { } /** - * Sets the owner of this pet. The new owner can be {@code null}, meaining + * Sets the owner of this pet. The new owner can be {@code null}, meaning * that the pet has no owner. * * @param owner the new owner of the pet. {@code null} value is valid, diff --git a/rest/src/main/java/es/uvigo/esei/xcs/rest/OwnerResource.java b/rest/src/main/java/es/uvigo/esei/xcs/rest/OwnerResource.java index 6d92173c78d7c3983d70f81547270ce477541362..8d15c3159c08b253879203086482bbf62efb6c08 100644 --- a/rest/src/main/java/es/uvigo/esei/xcs/rest/OwnerResource.java +++ b/rest/src/main/java/es/uvigo/esei/xcs/rest/OwnerResource.java @@ -119,6 +119,7 @@ public class OwnerResource { * Deletes an owner. * * @param login the login of the owner to be deleted. + * @return an empty {@code OK} response. * @throws IllegalArgumentException if {@code login} is {@code null} or if * it does not identifies a valid owner. */ diff --git a/rest/src/main/java/es/uvigo/esei/xcs/rest/PetResource.java b/rest/src/main/java/es/uvigo/esei/xcs/rest/PetResource.java index 55ac0f1877aca55fe444a4dbd5ac5a1e7ad376c4..9194ef226126ba391a8f18865b118da7c5671d50 100644 --- a/rest/src/main/java/es/uvigo/esei/xcs/rest/PetResource.java +++ b/rest/src/main/java/es/uvigo/esei/xcs/rest/PetResource.java @@ -129,6 +129,7 @@ public class PetResource { * Deletes a pet. * * @param id the identifier of the pet to be deleted. + * @return an empty {@code OK} response. * @throws IllegalArgumentException if there is no pet with the provided * identifier. * @throws SecurityException if the pet's owner is not the current user.