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