chenejac / VIVOTestMigration

0 stars 0 forks source link

VIVO-437: Refactor IndividualListController #426

Open chenejac opened 10 years ago

chenejac commented 10 years ago

Jim Blake (Migrated from VIVO-437) said:

Once you get past the top level, IndividualListController consists of a number of small methods that are intertwined with the methods in these classes: JsonServlet IndividualListResults IndividualListQueryResults IndividualListResultsUtils SolrQueryUtils SolrIndividualsDataGetter How can this best be organized? What are the separate pieces of functionality? Do they all involve restrictions by VClass? Are they all paginated? Do they all produce Individuals as results? Do the Individuals differ from Vitro to VIVO?

chenejac commented 10 years ago

Jim Blake said:

PageRecord stuff -- put it into IndividualListResults, and only invoke it on "toMap" or "toJSon"

IndividualListController.PageRecord class Created in IndividualListController.makePagesList Referenced in IndividualListResults IndividualListResultsUtils Almost certainly the methods are used by name in Freemarker templates

IndividualListController.getResultsForVClassQuery() used in IndividualListController.getResultsForVClass() IndividualListController.getResultsForVClassIntersections() IndividualListController.getRandomResultsForVClass()

IndividualListController.getResultsForVClass() used in IndividualListController.processRequest() SolrIndividualsDataGetter.populateSolrQueryResults() uses SolrQueryUtils.buildAndExecuteVClassQuery()

IndividualListController.getResultsForVClassIntersections() used in JsonServlet.getSolrVClassIntersectionResults() uses SolrQueryUtils.buildAndExecuteVClassQuery()

IndividualListController.getRandomResultsForVClass() used in JsonServlet.getRandomSolrVClassResults() uses SolrQueryUtils.buildAndExecuteRandomVClassQuery()

SolrIndividualsDataGetter.populateSolrQueryResults() used in private doSolrQuery() SolrIndividualsDataGetter.getData() uses IndividualListController.getResultsForVClass() ?

SolrQueryUtils.buildAndExecuteVClassQuery() used in IndividualListController.getResultsForVClass IndividualListController.getResultsForVClassIntersections()

SolrQueryUtils.buildAndExecuteRandomVClassQuery()

IndividualListQueryResults should be IndividualListQueryRunner?