[434] | 1 | package de.ugoe.cs.quest.plugin.guitar;
|
---|
[204] | 2 |
|
---|
[432] | 3 | import de.ugoe.cs.quest.IReplayDecorator;
|
---|
[204] | 4 | import de.ugoe.cs.util.StringTools;
|
---|
| 5 |
|
---|
| 6 | /**
|
---|
| 7 | * <p>
|
---|
| 8 | * {@link IReplayDecorator} for replays generated for the GUITAR suite.
|
---|
| 9 | * </p>
|
---|
| 10 | *
|
---|
| 11 | * @author Steffen Herbold
|
---|
| 12 | * @version 1.0
|
---|
| 13 | */
|
---|
| 14 | public class EFGReplayDecorator implements IReplayDecorator {
|
---|
| 15 |
|
---|
| 16 | /**
|
---|
| 17 | * <p>
|
---|
| 18 | * Id for object serialization.
|
---|
| 19 | * </p>
|
---|
| 20 | */
|
---|
| 21 | private static final long serialVersionUID = 1L;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * <p>
|
---|
| 25 | * The instance of the {@link EFGReplayDecorator} (implemented as
|
---|
| 26 | * singleton).
|
---|
| 27 | * </p>
|
---|
| 28 | */
|
---|
| 29 | transient private static EFGReplayDecorator theInstance;
|
---|
| 30 |
|
---|
| 31 | /**
|
---|
| 32 | * <p>
|
---|
| 33 | * Constructor. Private to guarantee that only one instance of the replay
|
---|
| 34 | * generator exists.
|
---|
| 35 | * </p>
|
---|
| 36 | */
|
---|
| 37 | private EFGReplayDecorator() {
|
---|
| 38 | };
|
---|
| 39 |
|
---|
| 40 | /**
|
---|
| 41 | * <p>
|
---|
| 42 | * Returns the instance of the MFCReplayDecorator.
|
---|
| 43 | * </p>
|
---|
| 44 | *
|
---|
| 45 | * @return instance of the MFCReplayDecorator.
|
---|
| 46 | */
|
---|
| 47 | public static EFGReplayDecorator getInstance() {
|
---|
| 48 | if (theInstance == null) {
|
---|
| 49 | theInstance = new EFGReplayDecorator();
|
---|
| 50 | }
|
---|
| 51 | return theInstance;
|
---|
| 52 | }
|
---|
| 53 |
|
---|
| 54 | /*
|
---|
| 55 | * (non-Javadoc)
|
---|
| 56 | *
|
---|
[432] | 57 | * @see de.ugoe.cs.quest.IReplayDecorator#getHeader()
|
---|
[204] | 58 | */
|
---|
| 59 | @Override
|
---|
| 60 | public String getHeader() {
|
---|
| 61 | return "<?xml version=\"1.0\" encoding=\"UTF-16\"?>"
|
---|
| 62 | + StringTools.ENDLINE + "<TestCase>" + StringTools.ENDLINE;
|
---|
| 63 | }
|
---|
| 64 |
|
---|
| 65 | /*
|
---|
| 66 | * (non-Javadoc)
|
---|
| 67 | *
|
---|
[432] | 68 | * @see de.ugoe.cs.quest.IReplayDecorator#getFooter()
|
---|
[204] | 69 | */
|
---|
| 70 | @Override
|
---|
| 71 | public String getFooter() {
|
---|
| 72 | return "</TestCase>";
|
---|
| 73 | }
|
---|
| 74 |
|
---|
| 75 | /*
|
---|
| 76 | * (non-Javadoc)
|
---|
| 77 | *
|
---|
[432] | 78 | * @see de.ugoe.cs.quest.IReplayDecorator#getSessionHeader(int)
|
---|
[204] | 79 | */
|
---|
| 80 | @Override
|
---|
| 81 | public String getSessionHeader(int sessionId) {
|
---|
| 82 | return "";
|
---|
| 83 | }
|
---|
| 84 |
|
---|
| 85 | /*
|
---|
| 86 | * (non-Javadoc)
|
---|
| 87 | *
|
---|
[432] | 88 | * @see de.ugoe.cs.quest.IReplayDecorator#getSessionFooter(int)
|
---|
[204] | 89 | */
|
---|
| 90 | @Override
|
---|
| 91 | public String getSessionFooter(int sessionId) {
|
---|
| 92 | return "";
|
---|
| 93 | }
|
---|
| 94 |
|
---|
| 95 | }
|
---|