Interface SegmentsCriteriaContributor


public interface SegmentsCriteriaContributor
Provides an interface for extending the segment's Criteria by adding more filters.
  • Method Details

    • contribute

      static void contribute(Criteria criteria, String filterString, Criteria.Conjunction conjunction, String key, Criteria.Type type)
    • contribute

      default void contribute(Criteria criteria, String filterString, Criteria.Conjunction conjunction)
      Contributes the criterion to a segment's criteria.
      Parameters:
      criteria - the segment's criteria
      filterString - the criterion's filter as a string
      conjunction - the criterion's conjunction
    • getCriteriaJSONObject

      com.liferay.portal.kernel.json.JSONObject getCriteriaJSONObject(Criteria criteria) throws Exception
      Returns a criteria as a JSONObject.
      Parameters:
      criteria - the segment's criteria
      Returns:
      the JSONObject from the segment's criteria
      Throws:
      Exception
    • getCriterion

      default Criteria.Criterion getCriterion(Criteria criteria)
      Returns the contributed criterion from the criteria.
      Parameters:
      criteria - the segment's criteria
      Returns:
      the contributed criterion
    • getEntityModel

      com.liferay.portal.odata.entity.EntityModel getEntityModel()
      Returns the entity model associated with the contributor.
      Returns:
      the entity model associated with the contributor
    • getEntityName

      String getEntityName()
      Returns the name of the entity model associated with the contributor.
      Returns:
      the name of the entity model associated with the contributor
    • getFields

      List<Field> getFields(javax.portlet.PortletRequest portletRequest)
      Returns the list of fields that are supported by this contributor.
      Parameters:
      portletRequest - the portlet request
      Returns:
      the list of fields that are supported by this contributor
    • getKey

      String getKey()
      Returns the contributor's unique key.
      Returns:
      the contributor's unique key
    • getLabel

      default String getLabel(Locale locale)
      Returns the label displayed in the user interface based on the locale.
      Parameters:
      locale - the locale to apply for the label
      Returns:
      the label displayed in the user interface
    • getType

      Criteria.Type getType()
      Returns the contributor's type.
      Returns:
      the contributor's type
      See Also: