def call_method(self, user, body):
        """Reads the collection the message needs to reach and then calls the
        process method of that collection. It returns the response built by the
        collection.
        """
        response = {}

        # Check if the message body contains filters.
        filters = body.get('filters')

        if filters:
            if not self._check_filters(filters):
                raise ResourceException("Filters did not match")

        try:
            # Get a reference to the corresponding resource object.
            instance = self.locator.get_instance(body['collection'])

            # Call the resource's generic process method
            response = instance.process(body)

        except ResourceException, err:
            self.logger.debug("Resource exception: %s" % err)
            response['error'] = '%s' % err

        except Exception, e:
            raise ResourceException("There's a problem with your %s plugin: %s"
                                    % (body['collection'], e))

        # Return the response
        return response
dataset/ETHPy150Open comodit/synapse-agent/synapse/controller.py/Controller.call_method/original