Class DefaultPdcSubscriptionService

    • Constructor Detail

      • DefaultPdcSubscriptionService

        public DefaultPdcSubscriptionService()
    • Method Detail

      • checkAxisOnDelete

        public void checkAxisOnDelete​(int axisId,
                                      String axisName)
        Remote inteface method Implements PdcSubscription check for axis deletion. It deletes all references to this axis from PdcSubscription module DB
        Specified by:
        checkAxisOnDelete in interface PdcSubscriptionService
        Parameters:
        axisId - the axis to be checked
        axisName - the name of the axis
      • checkValueOnDelete

        public void checkValueOnDelete​(int axisId,
                                       String axisName,
                                       List<String> oldPath,
                                       List<String> newPath,
                                       List<Value> pathInfo)
        Implements PdcSubscription check for value deletion. It deletes all references to the path containing this value from PdcSubscription module DB
        Specified by:
        checkValueOnDelete in interface PdcSubscriptionService
        Parameters:
        axisId - the axis to be checked
        axisName - the name of the axis
        oldPath - old path that would be removed soon
        newPath - new path. That will be places instead of old for this axis
        pathInfo - should contains PdcBm.getFullPath data structure
      • checkSubscriptions

        public void checkSubscriptions​(List<? extends Value> classifyValues,
                                       String componentId,
                                       int silverObjectid)
        This method check is any subscription that match criterias provided and sends notification if succeed
        Specified by:
        checkSubscriptions in interface PdcSubscriptionService
        Parameters:
        classifyValues - Linst of ClassifyValues to be checked
        componentId - component where classify event occures
        silverObjectid - object that was classified
      • checkSubscriptionRemove

        protected boolean checkSubscriptionRemove​(PdcSubscription subscription,
                                                  int axisId,
                                                  List<String> oldPath,
                                                  List<String> newPath)
        Parameters:
        subscription - PdcSubscription to check
        axisId - id of the axis value of which should be removed
        oldPath - list of original axis paths (before deletion)
        newPath - list new axis path to be places instead of old path
        Returns:
        true if subscription should be removed
      • checkValuesRemove

        protected boolean checkValuesRemove​(String originalPath,
                                            List<String> oldPath,
                                            List<String> newPath)
        Parameters:
        originalPath -
        oldPath -
        newPath -
        Returns:
        true if path provided was removed should be removed
      • checkValueInPath

        protected boolean checkValueInPath​(String value,
                                           List<String> pathList)
        Checks if values provided presented in provided path.
        Ex1: path /2/3/4/5/ value: /5/ result:true
        Ex2: path /2/3/4/5/ value: /3/ result true
        Ex2: path /2/3/4/5/ value: /8/ result false
      • isCorrespondingSubscription

        protected boolean isCorrespondingSubscription​(PdcSubscription subscription,
                                                      List<? extends Value> classifyValues)
        Parameters:
        subscription -
        classifyValues -
        Returns:
        true if subscription provided match the list of classify values
      • checkValues

        protected boolean checkValues​(Criteria criteria,
                                      Value searchValue)
        Parameters:
        criteria -
        searchValue -
        Returns:
        true if criteria provided match the searchValue provided