Class SolutionsResourceImpl

  • All Implemented Interfaces:
    com.artisol.teneo.inquire.api.resources.SolutionsResource

    public class SolutionsResourceImpl
    extends AbstractResource
    implements com.artisol.teneo.inquire.api.resources.SolutionsResource
    • Field Summary

      • Fields inherited from interface com.artisol.teneo.inquire.api.resources.SolutionsResource

        DELETE_SOLUTION_PATH, DELETE_SOLUTION_SUMMARY, GET_SOLUTIONS_PATH, GET_SOLUTIONS_SUMMARY, PATH, POST_SOLUTION_CREATE_DESCRIPTION, POST_SOLUTION_CREATE_PATH, POST_SOLUTION_CREATE_SUMMARY, PUT_SOLUTION_UPDATE_DESCRIPTION, PUT_SOLUTION_UPDATE_PATH, PUT_SOLUTION_UPDATE_SUMMARY
    • Constructor Summary

      Constructors 
      Constructor Description
      SolutionsResourceImpl​(javax.ws.rs.client.WebTarget webTarget)  
    • Constructor Detail

      • SolutionsResourceImpl

        public SolutionsResourceImpl​(javax.ws.rs.client.WebTarget webTarget)
    • Method Detail

      • listSolutions

        public List<Map<String,​Object>> listSolutions​(String ldsName)
                                                     throws com.artisol.teneo.inquire.api.exceptions.InquireException
        Gets a list of uploaded solutions to Elasticsearch.
        Parameters:
        ldsName - Name of the LDS to get the solutions from
        Returns:
        A List of Maps containing the solutions representation
        Throws:
        com.artisol.teneo.inquire.api.exceptions.InquireException - if an unexpected error occurs during the method execution
      • publishSolution

        public boolean publishSolution​(String ldsName,
                                       String solutionName,
                                       InputStream solution,
                                       boolean overwrite)
                                throws com.artisol.teneo.inquire.api.exceptions.InquireException
        Serializes a solution war file and stores it in Elasticsearch.
        Parameters:
        solutionName - The name used in Elasticsearch to store the solution war file
        solution - Solution file to be stored. It must be .war file
        ldsName - Name of the LDS to upload the solution
        overwrite - True to overwrite, if exists, an uploaded solution with the same name False to abort the publishing by raising a NameNotUniqueException.
        Returns:
        True if the solution successfully uploaded, false otherwise
        Throws:
        com.artisol.teneo.inquire.api.exceptions.InquireException - if an unexpected error occurs during the method execution
      • deleteSolution

        public boolean deleteSolution​(String ldsName,
                                      String solutionName)
                               throws com.artisol.teneo.inquire.api.exceptions.InquireException
        Deletes a solution that has been stored in Elasticsearch. If solution not found throws SolutionNotFoundException.
        Parameters:
        solutionName - Name of the solution to be deleted
        ldsName - Name of the LDS where the solution is stored
        Returns:
        True if solution successfully deleted, false otherwise
        Throws:
        com.artisol.teneo.inquire.api.exceptions.InquireException - If an unexpected error occurs during the method execution