Class PromotionValidator

    • Constructor Detail

      • PromotionValidator

        public PromotionValidator()
    • Method Detail

      • docValidate

        public String docValidate​(PO po,
                                  int timing)
        Description copied from interface: ModelValidator
        Validate Document. Called as first step of DocAction.prepareIt or at the end of DocAction.completeIt when you called addDocValidate for the table. Note that totals, etc. may not be correct before the prepare stage.
        Specified by:
        docValidate in interface ModelValidator
        Parameters:
        po - persistent object
        timing - see TIMING_ constants
        Returns:
        error message or null - if not null, the document will be marked as Invalid.
      • login

        public String login​(int AD_Org_ID,
                            int AD_Role_ID,
                            int AD_User_ID)
        Description copied from interface: ModelValidator
        User logged in Called before preferences are set
        Specified by:
        login in interface ModelValidator
        Parameters:
        AD_Org_ID - org
        AD_Role_ID - role
        AD_User_ID - user
        Returns:
        error message or null
      • modelChange

        public String modelChange​(PO po,
                                  int type)
                           throws Exception
        Description copied from interface: ModelValidator
        Model Change of a monitored Table. Called after PO.beforeSave/PO.beforeDelete when you called addModelChange for the table
        Specified by:
        modelChange in interface ModelValidator
        Parameters:
        po - persistent object
        type - TYPE_
        Returns:
        error message or null
        Throws:
        Exception - if the recipient wishes the change to be not accept.