Ignore:
Timestamp:
08/17/12 09:21:33 (12 years ago)
Author:
sherbold
Message:
  • rewrote replay decorator handling
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/plugin/guitar/eventcore/GUITARReplayable.java

    r556 r560  
     1 
    12package de.ugoe.cs.quest.plugin.guitar.eventcore; 
    23 
     4import de.ugoe.cs.quest.IReplayDecorator; 
    35import de.ugoe.cs.quest.eventcore.IReplayable; 
     6import de.ugoe.cs.quest.plugin.guitar.EFGReplayDecorator; 
    47import de.ugoe.cs.util.StringTools; 
    58 
     
    1417public class GUITARReplayable implements IReplayable { 
    1518 
    16         /** 
    17         * <p> 
    18         * EventId in the EFG and GUI files. 
    19         * </p> 
    20         */ 
    21         String eventId; 
     19    /** 
     20    * <p> 
     21    * EventId in the EFG and GUI files. 
     22    * </p> 
     23    */ 
     24    String eventId; 
    2225 
    23         /** 
    24         * <p> 
    25         * Id for object serialization. 
    26         * </p> 
    27         */ 
    28         private static final long serialVersionUID = 1L; 
     26    /** 
     27    * <p> 
     28    * Id for object serialization. 
     29    * </p> 
     30    */ 
     31    private static final long serialVersionUID = 1L; 
    2932 
    30         /** 
    31         * <p> 
    32         * Constructor. Creates a new {@link GUITARReplayable}. 
    33         * </p> 
    34         *  
    35         * @param eventId 
    36         */ 
    37         public GUITARReplayable(String eventId) { 
    38                 this.eventId = eventId; 
    39         } 
     33    /** 
     34    * <p> 
     35    * Constructor. Creates a new {@link GUITARReplayable}. 
     36    * </p> 
     37    *  
     38    * @param eventId 
     39    */ 
     40    public GUITARReplayable(String eventId) { 
     41        this.eventId = eventId; 
     42    } 
    4043 
    41         /* 
    42          * (non-Javadoc) 
    43          *  
    44          * @see de.ugoe.cs.quest.eventcore.IReplayable#getReplay() 
    45          */ 
    46         @Override 
    47         public String getReplay() { 
    48                 StringBuilder replay = new StringBuilder(); 
    49                 replay.append("<Step>" + StringTools.ENDLINE); 
    50                 replay.append("<EventId>" + eventId + "</EventId>" + StringTools.ENDLINE); 
    51                 replay.append("<ReachingStep>false</ReachingStep>" + StringTools.ENDLINE); 
    52                 replay.append("</Step>" + StringTools.ENDLINE); 
    53                 return replay.toString(); 
    54         } 
     44    /* 
     45     * (non-Javadoc) 
     46     *  
     47     * @see de.ugoe.cs.quest.eventcore.IReplayable#getReplay() 
     48     */ 
     49    @Override 
     50    public String getReplay() { 
     51        StringBuilder replay = new StringBuilder(); 
     52        replay.append("<Step>" + StringTools.ENDLINE); 
     53        replay.append("<EventId>" + eventId + "</EventId>" + StringTools.ENDLINE); 
     54        replay.append("<ReachingStep>false</ReachingStep>" + StringTools.ENDLINE); 
     55        replay.append("</Step>" + StringTools.ENDLINE); 
     56        return replay.toString(); 
     57    } 
     58 
     59    /* 
     60     * (non-Javadoc) 
     61     *  
     62     * @see de.ugoe.cs.quest.eventcore.IReplayable#getDecorator() 
     63     */ 
     64    @Override 
     65    public IReplayDecorator getDecorator() { 
     66        return EFGReplayDecorator.getInstance(); 
     67    } 
    5568 
    5669} 
Note: See TracChangeset for help on using the changeset viewer.