Class DefaultDataSourceService

    • Constructor Detail

      • DefaultDataSourceService

        public DefaultDataSourceService()
    • Method Detail

      • fetch

        public String fetch​(Map<String,​String> parameters)
        Description copied from interface: DataSourceService
        Execute a query request and return the result as a json string.
        Parameters:
        parameters - the parameters often coming from the HTTP request
        Returns:
        the json result string
      • fetch

        protected String fetch​(Map<String,​String> parameters,
                               boolean shouldFilterOnRedeableOrganizations)
      • addFetchParameters

        protected void addFetchParameters​(Map<String,​String> parameters)
        Adds some extra parameters that will be used to fetch data.
      • remove

        public String remove​(Map<String,​String> parameters)
        Description copied from interface: DataSourceService
        Execute a delete action. The id of the deleted record is present in the parameters.
        Parameters:
        parameters - the parameters often coming from the HTTP request
        Returns:
        the result message as a json string
      • remove

        protected String remove​(Map<String,​String> parameters,
                                boolean shouldFilterOnRedeableOrganizations)
      • add

        public String add​(Map<String,​String> parameters,
                          String content)
        Description copied from interface: DataSourceService
        Execute an insert action.
        Parameters:
        parameters - the parameters often coming from the HTTP request
        content - , the request content, is assumed to be a json string
        Returns:
        the result message as a json string
      • update

        public String update​(Map<String,​String> parameters,
                             String content)
        Description copied from interface: DataSourceService
        Execute an update action.
        Parameters:
        parameters - the parameters often coming from the HTTP request
        content - , the request content, is assumed to be a json string
        Returns:
        the result message as a json string