Class PrivacyConstraintLoaderMock

  • public class PrivacyConstraintLoaderMock
    extends PrivacyConstraintLoader
    This class is a mockup of the PrivacyConstraintLoader which replaces the call to loadFederatedPrivacyConstraints. This means that instead of loading the privacy constraints from the federated workers, the constraint returned for each federated DataOp will have the privacy level specified in the constructor, without sending any federated requests.
    • Constructor Detail

      • PrivacyConstraintLoaderMock

        public PrivacyConstraintLoaderMock​(String mockLevel)
        Creates a mock of PrivacyConstraintLoader where the given privacy level is given to all federated data.
        mockLevel - string representing the privacy level used for the setting of privacy constraints
    • Method Detail

      • loadFederatedPrivacyConstraints

        public void loadFederatedPrivacyConstraints​(Hop hop)
        Set privacy constraint of given hop to mocked privacy level. This mocks the behavior of the privacy constraint loader by setting the privacy constraint to a specific level for all federated data objects instead of retrieving the privacy constraints from the workers.
        loadFederatedPrivacyConstraints in class PrivacyConstraintLoader
        hop - for which privacy constraint is set