Mercurial > hg > AnnotationManagerN4J
comparison src/main/java/de/mpiwg/itgroup/annotations/restlet/annotations_ui/PersonsResource.java @ 75:25eb2e1df106
change logging to java.util.logging.
author | casties |
---|---|
date | Fri, 21 Mar 2014 13:32:41 +0100 |
parents | 2b1e6df5e21a |
children | e3f0613b2f2d |
comparison
equal
deleted
inserted
replaced
74:e5ff09208c28 | 75:25eb2e1df106 |
---|---|
24 * <http://www.gnu.org/licenses/lgpl-3.0.html>. | 24 * <http://www.gnu.org/licenses/lgpl-3.0.html>. |
25 * #L% | 25 * #L% |
26 */ | 26 */ |
27 | 27 |
28 import java.util.List; | 28 import java.util.List; |
29 import java.util.logging.Logger; | |
29 | 30 |
30 import org.apache.log4j.Logger; | |
31 import org.restlet.data.Form; | 31 import org.restlet.data.Form; |
32 import org.restlet.data.MediaType; | 32 import org.restlet.data.MediaType; |
33 import org.restlet.data.Reference; | 33 import org.restlet.data.Reference; |
34 import org.restlet.data.Status; | 34 import org.restlet.data.Status; |
35 import org.restlet.representation.Representation; | 35 import org.restlet.representation.Representation; |
50 * @author casties | 50 * @author casties |
51 * | 51 * |
52 */ | 52 */ |
53 public class PersonsResource extends ServerResource { | 53 public class PersonsResource extends ServerResource { |
54 | 54 |
55 public static Logger logger = Logger.getLogger(PersonsResource.class); | 55 public static Logger logger = Logger.getLogger("de.mpiwg.itgroup.annotations.restlet.annotations_ui.PersonsResource"); |
56 | 56 |
57 private AnnotationStore store; | 57 private AnnotationStore store; |
58 | 58 |
59 @Override | 59 @Override |
60 protected void doInit() throws ResourceException { | 60 protected void doInit() throws ResourceException { |
112 * | 112 * |
113 * @return | 113 * @return |
114 */ | 114 */ |
115 @Post | 115 @Post |
116 public Representation doPost(Representation entity) { | 116 public Representation doPost(Representation entity) { |
117 logger.debug("PersonsResource doPost!"); | 117 logger.fine("PersonsResource doPost!"); |
118 // TODO: do authentication | 118 // TODO: do authentication |
119 Form form = new Form(entity); | 119 Form form = new Form(entity); |
120 String id = form.getFirstValue("id"); | 120 String id = form.getFirstValue("id"); |
121 if (id == null || id.isEmpty() || id.matches("\\W")) { | 121 if (id == null || id.isEmpty() || id.matches("\\W")) { |
122 // invalid id | 122 // invalid id |