Interface ContentViewProvider

All Known Implementing Classes:
DefaultContentViewProvider, WebContentViewProvider

public interface ContentViewProvider
Component responsible to retrieve the view of a content
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Avalon Role
  • Method Summary

    Modifier and Type
    Method
    Description
    getView(String viewName, String[] contentTypeIds, String[] mixinIds)
    Get the view for view resulting of the concatenation of views of the given content.
    default View
    getView(String viewName, Content content)
    Get the view for view resulting of the concatenation of views of the given content.
    getViewWithFallback(String viewName, String fallbackViewName, String[] contentTypeIds, String[] mixinIds)
    Get the view for view resulting for a given content
    default View
    getViewWithFallback(String viewName, String fallbackViewName, Content content)
    Get the view for view resulting for a given content
  • Field Details

  • Method Details

    • getView

      default View getView(String viewName, Content content)
      Get the view for view resulting of the concatenation of views of the given content.
      Parameters:
      viewName - the name of the view to retrieve
      content - the given content
      Returns:
      The view or null if none matches.
    • getView

      View getView(String viewName, String[] contentTypeIds, String[] mixinIds)
      Get the view for view resulting of the concatenation of views of the given content.
      Parameters:
      viewName - the name of the view to retrieve
      contentTypeIds - the identifiers of the content types
      mixinIds - the identifiers of the mixins
      Returns:
      The view or null if none matches.
    • getViewWithFallback

      default View getViewWithFallback(String viewName, String fallbackViewName, Content content)
      Get the view for view resulting for a given content
      Parameters:
      viewName - the name of the view to retrieve. If null or empty, fallback view will be used.
      fallbackViewName - the name of the view to retrieve if the initial was not found. If null or empty, "main" view view will be used as fallback view.
      content - the content
      Returns:
      The view or null if none matches.
    • getViewWithFallback

      View getViewWithFallback(String viewName, String fallbackViewName, String[] contentTypeIds, String[] mixinIds)
      Get the view for view resulting for a given content
      Parameters:
      viewName - the name of the view to retrieve. If null or empty, fallback view will be used.
      fallbackViewName - the name of the view to retrieve if the initial was not found. If null or empty, "main" view view will be used as fallback view.
      contentTypeIds - the identifiers of the content types
      mixinIds - the identifiers of the mixins
      Returns:
      The view or null if none matches.