Class AbstractContentReferenceParser<T extends ContentReference>

java.lang.Object
ch.tocco.nice2.dms.spi.reference.AbstractContentReferenceParser<T>
All Implemented Interfaces:
ContentReferenceParser<T>
Direct Known Subclasses:
EntityUriContentReferenceParser, WidgetConfigContentReferenceParser, WidgetTemplateContentReferenceParser

public abstract class AbstractContentReferenceParser<T extends ContentReference> extends Object implements ContentReferenceParser<T>
Abstract class for reference parsers with some helper methods.
  • Constructor Details

    • AbstractContentReferenceParser

      protected AbstractContentReferenceParser(Class<T> referenceClass, org.slf4j.Logger log, Context context)
  • Method Details

    • getReferenceClass

      public Class<T> getReferenceClass()
      Description copied from interface: ContentReferenceParser
      Get the class of the references this parser extracts.
      Specified by:
      getReferenceClass in interface ContentReferenceParser<T extends ContentReference>
      Returns:
      the class of the references.
    • getLog

      protected org.slf4j.Logger getLog()
    • getContext

      protected Context getContext()
    • select

      protected org.jsoup.select.Elements select(String html, String selector)
      Select DOM elements in html by using Jsoup (http://jsoup.org/).
      Parameters:
      html - The html content.
      selector - The selector for the elements to select.
      Returns:
      the selected elements.
    • getPrimaryKey

      protected PrimaryKey getPrimaryKey(String type, String pk)