source: ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/model/ComponentRegistryResponse.java @ 3960

Last change on this file since 3960 was 3960, checked in by George.Georgovassilis@mpi.nl, 11 years ago

#443: fixing CommentResponse? attribute order

File size: 1.7 KB
Line 
1package clarin.cmdi.componentregistry.model;
2
3import java.util.ArrayList;
4import java.util.List;
5
6import javax.xml.bind.annotation.XmlAccessType;
7import javax.xml.bind.annotation.XmlAccessorType;
8import javax.xml.bind.annotation.XmlAttribute;
9import javax.xml.bind.annotation.XmlElement;
10import javax.xml.bind.annotation.XmlElementWrapper;
11import javax.xml.bind.annotation.XmlElements;
12import javax.xml.bind.annotation.XmlRootElement;
13import javax.xml.bind.annotation.XmlSeeAlso;
14import javax.xml.bind.annotation.XmlType;
15
16/**
17 *
18 * @author jeafer
19 */
20@XmlRootElement(name = "response")
21@XmlAccessorType(XmlAccessType.FIELD)
22@XmlSeeAlso({RegisterResponse.class, CommentResponse.class})
23@XmlType(propOrder = {"registered","isInUserSpace","errors"})
24public class ComponentRegistryResponse {
25
26    @XmlAttribute(required = true)
27    private Boolean registered;
28   
29    @XmlAttribute(required = true)
30    private Boolean isInUserSpace;
31   
32    @XmlElementWrapper(name = "errors", required = false)
33    @XmlElements(
34    @XmlElement(name = "error", type = String.class))
35    private List<String> errors = new ArrayList<String>();
36
37    public ComponentRegistryResponse() {
38    }
39
40    public void addError(String error) {
41        getErrors().add(error);
42    }
43
44    public List<String> getErrors() {
45        return errors;
46    }
47
48    public boolean isRegistered() {
49        return registered;
50    }
51
52    public void setErrors(List<String> errors) {
53        this.errors = errors;
54    }
55
56    public void setRegistered(boolean registered) {
57        this.registered = registered;
58    }
59
60    public void setIsInUserSpace(Boolean isInUserSpace) {
61        this.isInUserSpace = isInUserSpace;
62    }
63
64    public Boolean isInUserSpace() {
65        return isInUserSpace;
66    }
67}
Note: See TracBrowser for help on using the repository browser.