Interface CMTeasable

All Superinterfaces:
com.coremedia.objectserver.dataviews.AssumesIdentity, BelowRootNavigation, CMHasContexts, CMLinkable, CMLocalized, CMObject, com.coremedia.objectserver.beans.ContentBean, HasViewTypeName, Linkable, com.coremedia.blueprint.common.datevalidation.ValidityPeriod
All Known Subinterfaces:
CMAction, CMArticle, CMAudio, CMChannel, CMCollection<T>, CMContext, CMDownload, CMDynamicList<T>, CMExternalLink, CMGallery<T>, CMHTML, CMImageMap, CMInteractive, CMLocTaxonomy, CMMedia, CMNavigation, CMPerson, CMPicture, CMPlaceholder, CMQueryList, CMSitemap, CMSpinner, CMTaxonomy, CMTeaser, CMVideo, CMVisual

public interface CMTeasable extends CMHasContexts

Each content has an embedded Teaser and a detailText for the page view.

If you need different teasers for the document, you can use additional CMTeaser documents.

Represents the document type CMTeasable.

  • Field Details

    • NAME

      static final String NAME
      Name of the ContentType 'CMTeasable'.
      See Also:
    • AUTHORS

      static final String AUTHORS
      Name of the document property 'authors'.
      See Also:
    • TEASER_TITLE

      static final String TEASER_TITLE
      Name of the document property 'teaserTitle'.
      See Also:
    • TEASER_TEXT

      static final String TEASER_TEXT
      Name of the document property 'teaserText'.
      See Also:
    • DETAIL_TEXT

      static final String DETAIL_TEXT
      Name of the document property 'detailText'.
      See Also:
    • PICTURES

      static final String PICTURES
      Name of the document property 'pictures'.

      Meanwhile the type of the pictures linklist has been widened to CMMedia, but we kept the name "pictures" for compatibility reasons.

      See Also:
    • NOT_SEARCHABLE

      static final String NOT_SEARCHABLE
      Name of the document property 'searchable'.
      See Also:
    • TEASER_SETTINGS_STRUCT_NAME

      static final String TEASER_SETTINGS_STRUCT_NAME
      The name of the teaser options settings struct.
      See Also:
    • TEASER_OVERLAY_SETTINGS_STRUCT_NAME

      static final String TEASER_OVERLAY_SETTINGS_STRUCT_NAME
      The name of the teaser overlay settings struct.
      See Also:
    • TEASER_OVERLAY_SETTINGS_STYLE_SUB_STRUCT_NAME

      static final String TEASER_OVERLAY_SETTINGS_STYLE_SUB_STRUCT_NAME
      The name of the style settings in the teaser overlay settings sub struct.
      See Also:
  • Method Details

    • getMaster

      CMTeasable getMaster()
      Returns the value of the document property CMLocalized.MASTER.
      Specified by:
      getMaster in interface CMHasContexts
      Specified by:
      getMaster in interface CMLinkable
      Specified by:
      getMaster in interface CMLocalized
      Returns:
      a CMTeasable object
    • getVariantsByLocale

      Map<Locale,? extends CMTeasable> getVariantsByLocale()
      Description copied from interface: CMLocalized
      Returns the variants of this CMLocalized indexed by their Locale
      Specified by:
      getVariantsByLocale in interface CMHasContexts
      Specified by:
      getVariantsByLocale in interface CMLinkable
      Specified by:
      getVariantsByLocale in interface CMLocalized
      Returns:
      the variants of this CMLocalized indexed by their Locale
    • getLocalizations

      Collection<? extends CMTeasable> getLocalizations()
      Description copied from interface: CMLocalized

      Returns the Locale specific variants of this CMLocalized

      Usage:

      Add elements for each variant excluding self (self is of type Page in this example).

      Freemarker:
      
       <#if (self.content.localizations)?has_content>
         <#assign localizations=self.content.localizations![] />
         <#list localizations as localization>
           <#if localization.locale != self.content.locale>
             <link rel="alternate" ... />
           </#if>
         </#list>
       </#if>
       
      JSP:
      
       <c:set var="locales" value="${self.content.localizations}"/>
       <c:if test="${not empty locales}">
         <c:forEach var="localization" items="${locales}">
           <c:if test="${localization.locale != self.content.locale}">
             <cm:link var="localitationLink" target="${localization}"/>
             <link rel="alternate" ... />
           </c:if>
         </c:forEach>
       </c:if>
       
      Specified by:
      getLocalizations in interface CMHasContexts
      Specified by:
      getLocalizations in interface CMLinkable
      Specified by:
      getLocalizations in interface CMLocalized
      Returns:
      the Locale specific variants of this CMLocalized
    • getAspectByName

      @Deprecated Map<String,? extends com.coremedia.cae.aspect.Aspect<? extends CMTeasable>> getAspectByName()
      Deprecated.
      since 1907.1; Implement optional features as extensions.
      Description copied from interface: CMObject

      Returns a Map from aspectIDs to Aspects. AspectIDs consists of an aspectname with a prefix which identifies the plugin provider.

      Usage:

      Access an aspect named osmPlugin.

      Freemarker:
      
       <#assign osmSocialPlugin=self.aspectByName['osmPlugin'] />
       
      JSP:
      
       <c:set var="osmSocialPlugin" value="${self.aspectByName['osmPlugin']}"/>
       
      Specified by:
      getAspectByName in interface CMHasContexts
      Specified by:
      getAspectByName in interface CMLinkable
      Specified by:
      getAspectByName in interface CMLocalized
      Specified by:
      getAspectByName in interface CMObject
      Returns:
      a Map from aspectIDs to Aspects
    • getAspects

      @Deprecated List<? extends com.coremedia.cae.aspect.Aspect<? extends CMTeasable>> getAspects()
      Deprecated.
      since 1907.1; Implement optional features as extensions.
      Description copied from interface: CMObject

      Returns a list of all Aspect from all available PlugIns that are registered to this contentbean.

      Usage:

      Add all aspects with view asHead.

      Freemarker:
      
       <#list self.aspects as aspect>
         <@cm.include self=aspect view="asHeader"/>
       </#list>
       
      JSP:
      
       <c:forEach items="${self.aspects}" var="aspect">
         <cm:include self="${aspect}" view="asHeader"/>
       </c:forEach>
       
      Specified by:
      getAspects in interface CMHasContexts
      Specified by:
      getAspects in interface CMLinkable
      Specified by:
      getAspects in interface CMLocalized
      Specified by:
      getAspects in interface CMObject
      Returns:
      a list of Aspects
    • getTeaserTitle

      String getTeaserTitle()

      Returns the value of the document property TEASER_TITLE.

      Returns:
      the value of the document property TEASER_TITLE
    • getTeaserText

      com.coremedia.xml.Markup getTeaserText()
      Returns the value of the document property TEASER_TEXT.
      Returns:
      the value of the document property TEASER_TEXT
    • getDetailText

      com.coremedia.xml.Markup getDetailText()
      Returns the value of the document property DETAIL_TEXT.
      Returns:
      the value of the document property DETAIL_TEXT
    • getPictures

      List<CMPicture> getPictures()
      Returns the pictures of the Teasable.
      Returns:
      the CMPicture subset of getMedia()
    • getMedia

      @NonNull List<CMMedia> getMedia()
      Returns the media of the Teasable.
    • fetchMediaWithRecursionDetection

      @NonNull default List<CMMedia> fetchMediaWithRecursionDetection(Collection<CMTeasable> visited)
      Functionally equivalent to getMedia()

      If your contentbean delegates to other contentbeans in order to accumulate more media objects, it should support this method in order to prevent infinite recursions.

    • getPicture

      CMPicture getPicture()
      Returns the first CMPicture stored in the document property PICTURES.
      Returns:
      the first CMPicture stored in the document property PICTURES
    • getFirstMedia

      CMMedia getFirstMedia()
      Returns the first element of document property PICTURES.
      Returns:
      the first element of the document property PICTURES
    • getTarget

      CMLinkable getTarget()
      Returns this. Overridden by standalone teasers.
      Returns:
      a CMLinkable object
    • isNotSearchable

      boolean isNotSearchable()
      Returns the value of the document property NOT_SEARCHABLE.
      Returns:
      the value of the document property NOT_SEARCHABLE
    • getRelated

      List<? extends CMTeasable> getRelated()
      Returns the value of the document property RELATED.
      Returns:
      a list of CMTeasable objects
    • getRelatedByReferrers

      List<? extends CMTeasable> getRelatedByReferrers()
      Returns the CMTeasables referring to this CMTeasable in their RELATED property.
      Returns:
      a list of CMTeasable objects
    • getRelatedBySimilarTaxonomies

      List<? extends CMTeasable> getRelatedBySimilarTaxonomies()
      Returns CMTeasables that are related to this item because they have a similar set of taxonomies linked.
      Returns:
      a list of CMTeasable objects
    • getRelatedAll

      List<? extends CMTeasable> getRelatedAll()
      Returns a list of related CMTeasables which is a merge of getRelated(), getRelatedByReferrers(), getRelatedBySimilarTaxonomies().
      Returns:
      a list of CMTeasable objects
    • getRelatedImplicitly

      List<? extends CMTeasable> getRelatedImplicitly()
      Returns a list of related CMTeasables which is a merge of getRelatedByReferrers(), getRelatedBySimilarTaxonomies().
      Returns:
      a list of CMTeasable objects
    • getRelatedAllByType

      Map<String,List<CMTeasable>> getRelatedAllByType()
      Returns a map where the keys are document type names and the values are Lists of CMTeasables dynamically related to this object.
      Returns:
      a Map of String to Lists of CMTeasable
      See Also:
    • getRelatedImplicitlyByType

      Map<String,List<CMTeasable>> getRelatedImplicitlyByType()
      Returns a map where the keys are document type names and the values are Lists of CMTeasables explicitly related to this object.
      Returns:
      a Map of String to Lists of CMTeasable
      See Also:
    • getTextAsParagraphs

      List<com.coremedia.xml.Markup> getTextAsParagraphs()
      Returns the detail text splitted at each paragraph.
      Returns:
      the detail text splitted at each paragraph.the detail text splitted at each paragraph.
    • getTeaserSettings

      com.coremedia.blueprint.common.teaser.TeaserSettings getTeaserSettings()
      Returns the teaser settings.
      Returns:
      the teaser settings.
    • getTeaserOverlaySettings

      com.coremedia.blueprint.common.teaserOverlay.TeaserOverlaySettings getTeaserOverlaySettings()
      Returns the settings for the teaser overlay feature.
      Returns:
      the settings for the teaser overlay feature.
    • getTeaserOverlayStyle

      com.coremedia.blueprint.common.teaserOverlay.TeaserOverlayStyle getTeaserOverlayStyle()
      Returns the style for the teaser overlay feature.
      Returns:
      the style for the teaser overlay feature.
    • getCallToActionSettings

      List<com.coremedia.blueprint.common.cta.CallToActionButtonSettings> getCallToActionSettings()
      Returns the settings for all Call-To-Action buttons.
      Returns:
      the settings for all Call-To-Action buttons.
    • getAuthors

      List<CMPerson> getAuthors()

      Returns the value of the document property AUTHORS.

      Returns:
      the value of the document property AUTHORS