Class OrderHandler

    • Field Detail

      • valid

        protected boolean valid
    • Constructor Detail

      • OrderHandler

        protected OrderHandler​(OrderParser abstractOrderParser)
        Parameters:
        abstractOrderParser -
    • Method Detail

      • read

        public boolean read​(OrderToken token,
                            java.lang.String text)
        Reads an order.
        Parameters:
        token - First token of the order ("GIB", "LERNE" or the like) that must match the concrete OrderHandler class.
        Returns:
        true if the order is valid
      • init

        protected void init​(OrderToken token,
                            java.lang.String text)
        Called before readIt. Initialize state here, i.e., all fields that are set while the order is parsed.
      • postProcess

        protected void postProcess()
      • readIt

        protected abstract boolean readIt​(OrderToken token)
        Reads an order.
        Parameters:
        token - First token of the order ("GIB", "LERNE" or the like) that must match the concrete OrderHandler class.
        Returns:
        true if the order is valid
      • getOrder

        public SimpleOrder getOrder()
        Returns:
        The order