Ignore:
Timestamp:
12/08/11 12:53:53 (12 years ago)
Author:
jeafer
Message:

Jean-Charles branch ComponentRegistry commit5 (functionnal),
Changes regarding comment on the ComponentRegistry.

Modification of classes CommentsDao?
Response class has been split up. A general class ComponentRegistryResponse?
a abstractDescription response: RegisterResponse?
a comment response : CommentResponse?
Improvement of validation process for comments
Improvement of ComponentRegistryRestService?
New classes test CommentResponseTest? and CommentValidatorTest?

Documentation added to most classes
Clean up code in other classes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ComponentRegistry/branches/jeaferversion/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/model/RegisterResponse.java

    r1635 r1640  
    11package clarin.cmdi.componentregistry.model;
    2 
    3 import java.util.ArrayList;
    4 import java.util.List;
    52
    63import javax.xml.bind.annotation.XmlAccessType;
     
    85import javax.xml.bind.annotation.XmlAttribute;
    96import javax.xml.bind.annotation.XmlElement;
    10 import javax.xml.bind.annotation.XmlElementWrapper;
    11 import javax.xml.bind.annotation.XmlElements;
    127import javax.xml.bind.annotation.XmlRootElement;
    138
     
    1510@XmlAccessorType(XmlAccessType.FIELD)
    1611@XmlRootElement(name = "registerResponse")
    17 public class RegisterResponse {
    18 
    19     @XmlAttribute(required = true)
    20     private Boolean isInUserSpace;
     12public class RegisterResponse extends ComponentRegistryResponse {
    2113
    2214    @XmlAttribute(required = true)
    2315    private Boolean isProfile;
    2416
    25     @XmlAttribute(required = true)
    26     private Boolean registered;
    27 
    28 
    29     @XmlElementWrapper(name = "errors", required = false)
    30     @XmlElements(@XmlElement(name = "error", type = String.class))
    31     private List<String> errors = new ArrayList<String>();
    32 
    3317    @XmlElement
    3418    private AbstractDescription description;
    35     @XmlElement
    36     private Comment comment;
    37 
    38 
    39     public void setRegistered(boolean registered) {
    40         this.registered = registered;
    41     }
    42 
    43     public boolean isRegistered() {
    44         return registered;
    45     }
    46 
    47     public void setErrors(List<String> errors) {
    48         this.errors = errors;
    49     }
    50 
    51     public List<String> getErrors() {
    52         return errors;
    53     }
    54 
    55     public void addError(String error) {
    56         getErrors().add(error);
    57     }
    5819
    5920    public void setDescription(AbstractDescription description) {
    6021        this.description = description;
    61     }
    62    
    63     public void setComment(Comment comment) {
    64         this.comment = comment;
    65     }
    66    
    67     public Comment getComment() {
    68         return comment;
    6922    }
    7023
     
    8033        this.isProfile = isProfile;
    8134    }
    82 
    83     public void setIsInUserSpace(Boolean isInUserSpace) {
    84         this.isInUserSpace = isInUserSpace;
    85     }
    86 
    87     public Boolean isInUserSpace() {
    88         return isInUserSpace;
    89     }
    9035   
    9136}
Note: See TracChangeset for help on using the changeset viewer.