comparison artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifact.java @ 42:5fbd8e65bdf5

Added debug output to DefaultArtifact tracing of artifact lifecyle easier. artifacts/trunk@121 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 24 Sep 2009 08:45:23 +0000
parents c2d53bd30ab8
children 4ae4dc99127d
comparison
equal deleted inserted replaced
41:5e4bc24ea438 42:5fbd8e65bdf5
23 23
24 public DefaultArtifact() { 24 public DefaultArtifact() {
25 } 25 }
26 26
27 public String identifier() { 27 public String identifier() {
28 if (logger.isDebugEnabled()) {
29 logger.debug("DefaultArtifact.identifier: " + identifier);
30 }
28 return this.identifier; 31 return this.identifier;
29 } 32 }
30 33
31 public String hash() { 34 public String hash() {
32 return String.valueOf(hashCode()); 35 String hash = String.valueOf(hashCode());
36 if (logger.isDebugEnabled()) {
37 logger.debug("DefaultArtifact.hashCode: "
38 + identifier + " (" + hash + ")");
39 }
40 return hash;
33 } 41 }
34 42
35 public Document describe(CallContext context) { 43 public Document describe(CallContext context) {
44 if (logger.isDebugEnabled()) {
45 logger.debug("DefaultArtifact.describe: " + identifier);
46 }
36 return XMLUtils.newDocument(); 47 return XMLUtils.newDocument();
37 } 48 }
38 49
39 public Document advance(Document target, CallContext context) { 50 public Document advance(Document target, CallContext context) {
51 if (logger.isDebugEnabled()) {
52 logger.debug("DefaultArtifact.advance: " + identifier);
53 }
40 return XMLUtils.newDocument(); 54 return XMLUtils.newDocument();
41 } 55 }
42 56
43 public Document feed(Document target, CallContext context) { 57 public Document feed(Document target, CallContext context) {
58 if (logger.isDebugEnabled()) {
59 logger.debug("DefaultArtifact.feed: " + identifier);
60 }
44 return XMLUtils.newDocument(); 61 return XMLUtils.newDocument();
45 } 62 }
46 63
47 public void out( 64 public void out(
48 Document format, 65 Document format,
49 OutputStream out, 66 OutputStream out,
50 CallContext context 67 CallContext context
51 ) 68 )
52 throws IOException 69 throws IOException
53 { 70 {
71 if (logger.isDebugEnabled()) {
72 logger.debug("DefaultArtifact.out: " + identifier);
73 }
54 } 74 }
55 75
56 public void setup(String identifier, ArtifactFactory factory, Object context) { 76 public void setup(String identifier, ArtifactFactory factory, Object context) {
77 if (logger.isDebugEnabled()) {
78 logger.debug("DefaultArtifact.setup: " + identifier);
79 }
57 this.identifier = identifier; 80 this.identifier = identifier;
58 } 81 }
59 82
60 public void endOfLife(Object context) { 83 public void endOfLife(Object context) {
84 if (logger.isDebugEnabled()) {
85 logger.debug("DefaultArtifact.endOfLife: " + identifier);
86 }
61 } 87 }
62 } 88 }
63 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8: 89 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

http://dive4elements.wald.intevation.org