01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.text;
05:
06: import com.tc.util.NonPortableDetail;
07:
08: /**
09: * An interface for classes that know how to format {@link com.tc.util.NonPortableReason}. Calling
10: * {@link com.tc.util.NonPortableReason#accept(NonPortableReasonFormatter)} will cause the reason to call
11: * back to this interface with first the reason type, then all of the details, and finally the instructions.
12: */
13: public interface NonPortableReasonFormatter {
14: /**
15: * Format the reason type code
16: * @param reasonType The type
17: */
18: public void formatReasonTypeName(byte reasonType);
19:
20: /**
21: * Format the reason text
22: * @param reasonText The reason message
23: */
24: public void formatReasonText(String reasonText);
25:
26: /**
27: * Format a detail item
28: * @param detail Detail in label/value form
29: */
30: public void formatDetail(NonPortableDetail detail);
31:
32: /**
33: * Format the instructions on how to fix
34: * @param instructionsText Instruction message
35: */
36: public void formatInstructionsText(String instructionsText);
37:
38: /**
39: * Flush results if necessary
40: */
41: public void flush();
42: }
|