Interface ShortViewService

  • All Known Implementing Classes:
    ShortViewServiceImpl

    public interface ShortViewService
    Define a service that will produce HTML snippets for short views on Individuals.
    • Method Detail

      • renderShortView

        String renderShortView​(Individual individual,
                               ShortViewService.ShortViewContext context,
                               Map<String,​Object> modelMap,
                               VitroRequest vreq)
        Render the short view template that applies to this individual in this context. The data in the modelMap can be used to populate the template, along with any additional data returned by custom data getters. If there are any problems, return a dummy piece of text that includes the label of the individual. Never return null or empty string. This method should not be called from within an ongoing Freemarker process. In that case, use getShortViewInfo() instead.
      • getShortViewInfo

        ShortViewService.TemplateAndSupplementalData getShortViewInfo​(Individual individual,
                                                                      ShortViewService.ShortViewContext svContext,
                                                                      VitroRequest vreq)
        What template should be used to render the short view of this individual in this context? What data is available from custom data getters? Ask the Application Ontology for short view specifications on each of the most specific classes for this individual. If more than one such class has an applicable short view, the class with with the first URI (alphabetically) will be used.