Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/server/auth/UserClient.java @ 3696:a050cb5f303f
Cosmetics
flys-client/trunk@5395 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Sat, 08 Sep 2012 11:26:30 +0000 |
parents | 5e4d91304484 |
children | 2e12518ff5b4 |
comparison
equal
deleted
inserted
replaced
3695:5e4d91304484 | 3696:a050cb5f303f |
---|---|
48 | 48 |
49 return account.equals(user.getAccount()); | 49 return account.equals(user.getAccount()); |
50 } | 50 } |
51 | 51 |
52 public boolean createUser(User user) throws ConnectionException { | 52 public boolean createUser(User user) throws ConnectionException { |
53 if(user == null) { | |
54 logger.warn("createUser: given user is null"); | |
55 return false; | |
56 } | |
57 | |
53 logger.debug("Creating new user " + user.getName()); | 58 logger.debug("Creating new user " + user.getName()); |
54 HttpClient client = new HttpClientImpl(this.url); | 59 HttpClient client = new HttpClientImpl(this.url); |
55 | 60 |
56 Document document = XMLUtils.newDocument(); | 61 Document document = XMLUtils.newDocument(); |
57 | 62 |
105 XPathConstants.NODESET, | 110 XPathConstants.NODESET, |
106 ArtifactNamespaceContext.INSTANCE); | 111 ArtifactNamespaceContext.INSTANCE); |
107 } | 112 } |
108 | 113 |
109 public Element findUser(User user) throws ConnectionException { | 114 public Element findUser(User user) throws ConnectionException { |
115 if(user == null) { | |
116 throw new IllegalArgumentException("user is null"); | |
117 } | |
118 | |
110 HttpClient client = new HttpClientImpl(this.url); | 119 HttpClient client = new HttpClientImpl(this.url); |
111 | 120 |
112 Document document = XMLUtils.newDocument(); | 121 Document document = XMLUtils.newDocument(); |
113 | 122 |
114 XMLUtils.ElementCreator creator = new XMLUtils.ElementCreator( | 123 XMLUtils.ElementCreator creator = new XMLUtils.ElementCreator( |