View Javadoc

1   /*
2    * To change this template, choose Tools | Templates
3    * and open the template in the editor.
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   * @author nwright
14   */
15  public class ServiceDumper {
16  
17      private Service service;
18      private PrintStream out;
19  
20      public ServiceDumper(Service service, PrintStream out) {
21          this.service = service;
22          this.out = out;
23      }
24  
25      public void dump() {
26          out.println(service.getKey() + "." + service.getName() + "(" + service.getVersion() + ")");
27      }
28  
29      public void writeTabbedHeader() {
30          out.print("Key");
31          out.print("\t");
32          out.print("Name");
33          out.print("\t");
34          out.print("Version");
35          out.print("\t");
36          out.print("url");
37          out.print("\t");
38          out.print("ImplProject");
39          out.print("\t");
40          out.print("status");
41          out.print("\t");
42          out.print("comments");
43          out.println("");
44      }
45  
46      public void writeTabbedData() {
47          out.print(service.getKey());
48          out.print("\t");
49          out.print(service.getName());
50          out.print("\t");
51          out.print(service.getVersion());
52          out.print("\t");
53          out.print(service.getUrl());
54          out.print("\t");
55          out.print(service.getImplProject());
56          out.print("\t");
57          out.print(service.getStatus());
58          out.print("\t");
59          out.print(service.getComments());
60          out.println("");
61      }
62  }