comparison flys-client/src/main/java/de/intevation/flys/client/server/SetCollectionTTLServiceImpl.java @ 1367:ab8eb2f544f2

Replaced stdout and stderr logging with log4j loggers in server classes. flys-client/trunk@3069 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 25 Oct 2011 12:31:15 +0000
parents 1dbffe4c6d12
children bc06a671ef60
comparison
equal deleted inserted replaced
1366:d0eb2202ffbe 1367:ab8eb2f544f2
1 package de.intevation.flys.client.server; 1 package de.intevation.flys.client.server;
2 2
3 import org.w3c.dom.Document; 3 import org.w3c.dom.Document;
4
5 import org.apache.log4j.Logger;
4 6
5 import de.intevation.artifacts.common.utils.ClientProtocolUtils; 7 import de.intevation.artifacts.common.utils.ClientProtocolUtils;
6 8
7 import de.intevation.flys.client.shared.exceptions.ServerException; 9 import de.intevation.flys.client.shared.exceptions.ServerException;
8 import de.intevation.flys.client.shared.model.Collection; 10 import de.intevation.flys.client.shared.model.Collection;
14 */ 16 */
15 public class SetCollectionTTLServiceImpl 17 public class SetCollectionTTLServiceImpl
16 extends DoCollectionAction 18 extends DoCollectionAction
17 implements SetCollectionTTLService 19 implements SetCollectionTTLService
18 { 20 {
21 private static final Logger logger =
22 Logger.getLogger(SetCollectionTTLServiceImpl.class);
23
24
19 public static final String XPATH_RESULT = "/art:result/text()"; 25 public static final String XPATH_RESULT = "/art:result/text()";
20 public static final String OPERATION_FAILURE = "FAILED"; 26 public static final String OPERATION_FAILURE = "FAILED";
21 27
22 public void setTTL(Collection c, String url) 28 public void setTTL(Collection c, String url)
23 throws ServerException 29 throws ServerException
24 { 30 {
25 System.out.println("Set ttl of collection: " + c.identifier()); 31 logger.info("Set ttl of collection: " + c.identifier());
26 32
27 long ttl = c.getTTL(); 33 long ttl = c.getTTL();
28 String value = null; 34 String value = null;
29 35
30 if (ttl == 0) { 36 if (ttl == 0) {

http://dive4elements.wald.intevation.org