src/main/java/pityoulish/msgboard/MixedMessageBoardImpl.java
public Message putSystemMessage(String slot, String text)
  {
    String problem = null;
    if (slot != null)
     {
       // The originator check is applied on the slot name rather than the
       // originator constructed from it below. That way, we can construct
       // system originators that wouldn't be accepted by putMessage.
       // Implementor's decision... could be handled differently as well.
       problem = sanityChecker.checkOriginator(slot);
     }
    if (problem == null)
       sanityChecker.checkText(text);
    if (problem != null)
       throw new IllegalArgumentException(problem);

    String originator = "_";
    if (slot != null)
     {
       originator = "_#"+slot;
       //@@@ if there is a message for the slot, remove it now
       throw new UnsupportedOperationException("@@@ slot not yet supported");
     }

    MTMsg msg = new MTMsg
      (originator, boardTimer.getTimestamp(), text, MT.SYSTEM);

    addMessageToBoard(msg);

    return msg;
  }
// non-javadoc, see interface SystemMessageBoard
non-javadoc, see interface SystemMessageBoard
non - javadoc see interface SystemMessageBoard
public Message putSystemMessage(String slot, String text)
  {
    String problem = null;
    if (slot != null)
     {
       problem = sanityChecker.checkOriginator(slot);
     }
    if (problem == null)
       sanityChecker.checkText(text);
    if (problem != null)
       throw new IllegalArgumentException(problem);
    String originator = "_";
    if (slot != null)
     {
       originator = "_#"+slot;
       throw new UnsupportedOperationException("@@@ slot not yet supported");
     }
    MTMsg msg = new MTMsg
      (originator, boardTimer.getTimestamp(), text, MT.SYSTEM);
    addMessageToBoard(msg);
    return msg;
  }
public Message putSystemMessage ( String slot , String text ) { String problem = null ; if ( slot != null ) { problem = sanityChecker . checkOriginator ( slot ) ; } if ( problem == null ) sanityChecker . checkText ( text ) ; if ( problem != null ) throw new IllegalArgumentException ( problem ) ; String originator = "_" ; if ( slot != null ) { originator = "_#" + slot ; throw new UnsupportedOperationException ( "@@@ slot not yet supported" ) ; } MTMsg msg = new MTMsg ( originator , boardTimer . getTimestamp ( ) , text , MT . SYSTEM ) ; addMessageToBoard ( msg ) ; return msg ; }
non-javadoc, see interface SystemMessageBoard
non - javadoc see interface SystemMessageBoard
// The originator check is applied on the slot name rather than the // originator constructed from it below. That way, we can construct // system originators that wouldn't be accepted by putMessage. // Implementor's decision... could be handled differently as well. //@@@ if there is a message for the slot, remove it now