Class FreeGoodSupportBackend


  • public class FreeGoodSupportBackend
    extends java.lang.Object
    Handles support of inclusive free goods for CRM, R/3 and DB backends.
    For this type of free good, handling in ISA differs from CRM and R/3: no free good sub items will be shown but all sub item related info will be condensed into the main item.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static void addScheduleLines​(Item item, Item parentItem)
      Transfers schedule lines from one item to another.
      static boolean adjustSalesDocument​(SalesDocument salesDocument)
      Checks all free good related sub items, removes them from the sales document and adjusts the corresponding main items.
      protected static Schedline getSchedlineForDate​(java.util.Date committedDate, java.util.List<Schedline> scheduleLines)
      Checks if a schedule line is present for a date.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • adjustSalesDocument

        public static boolean adjustSalesDocument​(SalesDocument salesDocument)
                                           throws BackendException
        Checks all free good related sub items, removes them from the sales document and adjusts the corresponding main items.
        Checks the exclusive free good sub items: they are set to be read- only.
        Called from all sales document backend implementations after item read.
        Parameters:
        salesDocument - the backend's view of the sales document
        Returns:
        true if there was a inclusive free good item
        Throws:
        BackendException - Is thrown if there is an exception in the back end.
      • addScheduleLines

        protected static void addScheduleLines​(Item item,
                                               Item parentItem)
        Transfers schedule lines from one item to another. If there is no entry for a commited date, a new record is appended, the quantities are accumulated otherwise.
        Parameters:
        item - the current item (source of schedule lines)
        parentItem - the target, gets new schedule lines
      • getSchedlineForDate

        protected static Schedline getSchedlineForDate​(java.util.Date committedDate,
                                                       java.util.List<Schedline> scheduleLines)
        Checks if a schedule line is present for a date. Searches via looping through the list of schedule lines.
        Parameters:
        committedDate - the date for which we do the check
        scheduleLines - the list of schedule lines we look into
        Returns:
        null if no schedule line was found for this date