package org.fedorahosted.flies.rest.dto.v1;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import org.fedorahosted.flies.common.Namespaces;

@XmlType(name="personType", namespace=Namespaces.FLIES, propOrder={})
@XmlRootElement(name="person", namespace=Namespaces.FLIES)
public class Person {

	private String id;
	private String name;
	
	public Person() {
	}
	public Person(String id, String name) {
		this.id = id;
		this.name = name;
	}
	
	@XmlAttribute(name="id", required=true)
	public String getId() {
		return id;
	}
	
	public void setId(String id) {
		this.id = id;
	}
	
	@XmlAttribute(name="name", required=true)
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
}

@@ -225,16 +225,135 @@
 espaces;
+%0Aimport org.hibernate.validator.Email;%0Aimport org.hibernate.validator.NotEmpty;%0Aimport org.hibernate.validator.NotNull;
 %0A%0A@XmlTy
@@ -514,18 +514,21 @@
  String 
-id
+email
 ;%0A%09priva
@@ -567,16 +567,18 @@
 () %7B%0A%09%7D%0A
+%09%0A
 %09public 
@@ -591,18 +591,21 @@
 (String 
-id
+email
 , String
@@ -620,23 +620,29 @@
 %0A%09%09this.
-id = id
+email = email
 ;%0A%09%09this
@@ -681,18 +681,21 @@
 e(name=%22
-id
+email
 %22, requi
@@ -696,32 +696,50 @@
  required=true)%0A
+%09@Email%0A%09@NotNull%0A
 %09public String g
@@ -740,18 +740,21 @@
 ring get
-Id
+Email
 () %7B%0A%09%09r
@@ -759,18 +759,21 @@
 %09return 
-id
+email
 ;%0A%09%7D%0A%09%0A%09
@@ -791,18 +791,21 @@
  set
-Id
+Email
 (String 
 id) 
@@ -800,18 +800,21 @@
 (String 
-id
+email
 ) %7B%0A%09%09th
@@ -820,15 +820,21 @@
 his.
-id = id
+email = email
 ;%0A%09%7D
@@ -879,16 +879,27 @@
 d=true)%0A
+%09@NotEmpty%0A
 %09public 

use email and name as person resource in the REST api