1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.kuali.student.contract.model.util;
21
22 import java.io.PrintStream;
23
24 import org.kuali.student.contract.model.Service;
25
26
27
28
29
30 public class ServiceDumper {
31
32 private Service service;
33 private PrintStream out;
34
35 public ServiceDumper(Service service, PrintStream out) {
36 this.service = service;
37 this.out = out;
38 }
39
40 public void dump() {
41 out.println(service.getKey() + "." + service.getName() + "(" + service.getVersion() + ")");
42 }
43
44 public void writeTabbedHeader() {
45 out.print("Key");
46 out.print("\t");
47 out.print("Name");
48 out.print("\t");
49 out.print("Version");
50 out.print("\t");
51 out.print("url");
52 out.print("\t");
53 out.print("ImplProject");
54 out.print("\t");
55 out.print("status");
56 out.print("\t");
57 out.print("comments");
58 out.println("");
59 }
60
61 public void writeTabbedData() {
62 out.print(service.getKey());
63 out.print("\t");
64 out.print(service.getName());
65 out.print("\t");
66 out.print(service.getVersion());
67 out.print("\t");
68 out.print(service.getUrl());
69 out.print("\t");
70 out.print(service.getImplProject());
71 out.print("\t");
72 out.print(service.getStatus());
73 out.print("\t");
74 out.print(service.getComments());
75 out.println("");
76 }
77 }