Interface CMLinkable

All Superinterfaces:
com.coremedia.objectserver.dataviews.AssumesIdentity, BelowRootNavigation, 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>, CMHasContexts, CMHTML, CMImageMap, CMInteractive, CMLocTaxonomy, CMMedia, CMNavigation, CMPerson, CMPicture, CMPlaceholder, CMQueryList, CMSitemap, CMSpinner, CMTaxonomy, CMTeasable, CMTeaser, CMVideo, CMVisual

public interface CMLinkable extends Linkable, CMLocalized, BelowRootNavigation, com.coremedia.blueprint.common.datevalidation.ValidityPeriod

CMLinkable is the base type for each document which can be referenced as standalone content or navigation unit.

Represents the document type CMLinkable.

  • Field Details

  • Method Details

    • getMaster

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

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

      Collection<? extends CMLinkable> 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 CMLocalized
      Returns:
      the Locale specific variants of this CMLocalized
    • getAspectByName

      @Deprecated Map<String,? extends com.coremedia.cae.aspect.Aspect<? extends CMLinkable>> 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 CMLocalized
      Specified by:
      getAspectByName in interface CMObject
      Returns:
      a Map from aspectIDs to Aspects
    • getAspects

      @Deprecated List<? extends com.coremedia.cae.aspect.Aspect<? extends CMLinkable>> 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 CMLocalized
      Specified by:
      getAspects in interface CMObject
      Returns:
      a list of Aspects
    • getViewtype

      CMViewtype getViewtype()

      Returns the first value of the document property VIEWTYPE.

      Usage:

      Use given layout as view.

      Freemarker:
      
       <#assign recursiveInclude=cm.localParameter("recursiveInclude", false) />
       <#assign layout=(self.viewtype.layout)!"" />
       <#if layout?has_content && !recursiveInclude>
         <@cm.include self=self view="[${layout}]"
                      params={"recursiveInclude": true} />
         <!-- ... --->
       </#if>
       
      Returns:
      first value of document property of type CMViewtype
    • getKeywords

      String getKeywords()

      Returns the value of the document property KEYWORDS.

      Usage:

      Add keywords to meta information. self is of type Page.

      Freemarker:
      
       <#if self.content.keywords?has_content>
         <meta name="keywords" content="${self.content.keywords}" />
       </#if>
       
      JSP:
      
       <c:set var="keywordsList" value="${self.content.keywords}"/>
       <c:if test="${not empty keywordsList}">
         <meta name="keywords" content="<c:out value='${keywordsList}'/>"/>
       </c:if>
       
      Specified by:
      getKeywords in interface Linkable
      Returns:
      the value of the document property KEYWORDS
    • getHtmlDescription

      String getHtmlDescription()

      Returns the value of the document property HTML_DESCRIPTION.

      Usage:

      Add description to page's meta information in head.

      Freemarker:
      
       <#if self.htmlDescription?has_content>
         <meta name="description" content="${self.htmlDescription}" />
       </#if>
       
      Returns:
      the value of the document property HTML_DESCRIPTION
    • getHtmlTitle

      String getHtmlTitle()

      Returns the value of the document property HTML_TITLE.

      Usage:

      Add title to meta information in head.

      Freemarker:
      
       <title>${self.htmlTitle!"CoreMedia CMS - No Page Title"}</title>
       
      Returns:
      the value of the document property HTML_TITLE
    • getTitle

      String getTitle()
      Returns the title to be used in the head meta data.
      Specified by:
      getTitle in interface Linkable
      Returns:
      the value of the document property TITLE
    • getContexts

      List<CMContext> getContexts()
      Returns the contexts of this CMLinkable.
      Returns:
      a list of CMContext objects
    • getLocalSettings

      com.coremedia.cap.struct.Struct getLocalSettings()
      Return local settings as a Struct.
      Returns:
      local settings. May return null if no settings are found.
    • getLinkedSettings

      List<CMSettings> getLinkedSettings()
      Returns all CMSettings linked settings.
      Returns:
      a List of CMSettings objects
    • getValidFrom

      Calendar getValidFrom()
      Returns the value of the document property VALID_FROM.
      Specified by:
      getValidFrom in interface com.coremedia.blueprint.common.datevalidation.ValidityPeriod
      Returns:
      the value of the document property VALID_FROM
    • getValidTo

      Calendar getValidTo()
      Returns the value of the document property VALID_TO.
      Specified by:
      getValidTo in interface com.coremedia.blueprint.common.datevalidation.ValidityPeriod
      Returns:
      the value of the document property VALID_TO
    • getExternallyDisplayedDate

      Calendar getExternallyDisplayedDate()

      Returns the value of the document property EXTERNALLY_DISPLAYED_DATE.

      Usage:

      Display configured external date if available.

      Freemarker:
      
       <#if self.externallyDisplayedDate?has_content>
         <div class="__date">
           <@bp.renderDate self.externallyDisplayedDate.time "__time" />
         </div>
       </#if>
       
      Returns:
      the value of the document property EXTERNALLY_DISPLAYED_DATE
    • getSubjectTaxonomy

      List<CMTaxonomy> getSubjectTaxonomy()

      Returns the value of the document property SUBJECT_TAXONOMY.

      Usage:

      Add links to subject taxonomy overviews.

      Freemarker:
      
       <#assign tags=self.subjectTaxonomy![] />
      
       <#if (tags?size > 0)>
         <ul>
           <#list tags as taxonomy>
             <li>
               <@cm.include self=taxonomy view="asLink"/>
             </li>
           </#list>
         </ul>
       </#if>
       
      JSP:
      
       <c:set var="subjectTaxonomy" value="${self.subjectTaxonomy}"/>
       <c:if test="${not empty subjectTaxonomy}">
         <ul>
           <c:forEach items="${subjectTaxonomy}" var="taxonomy" varStatus="forEachStatus">
             <li><cm:include self="${taxonomy}" view="asLink"/></li>
           </c:forEach>
         </ul>
       </c:if>
       
      Returns:
      a list of CMTaxonomy objects
    • getLocationTaxonomy

      List<CMLocTaxonomy> getLocationTaxonomy()

      Returns the value of the document property LOCATION_TAXONOMY.

      Usage:

      Add links to location taxonomy overviews.

      Freemarker:
      
       <#assign tags=self.locationTaxonomy![] />
      
       <#if (tags?size > 0)>
         <ul>
           <#list tags as taxonomy>
             <li>
               <@cm.include self=taxonomy view="asLink"/>
             </li>
           </#list>
         </ul>
       </#if>
       
      JSP:
      
       <c:set var="locationTaxonomy" value="${self.locationTaxonomy}"/>
       <c:if test="${not empty locationTaxonomy}">
         <ul>
           <c:forEach items="${locationTaxonomy}" var="taxonomy" varStatus="forEachStatus">
             <li><cm:include self="${taxonomy}" view="asLink"/></li>
           </c:forEach>
         </ul>
       </c:if>
       
      Returns:
      a list of CMLocTaxonomy objects
    • getResourceBundles2

      List<CMResourceBundle> getResourceBundles2()
      Returns the value of the document property RESOURCE_BUNDLES2.
      Returns:
      a list of CMResourceBundle objects
    • isOpenInNewTab

      boolean isOpenInNewTab()
      Always returns false. This method only serves the purpose to simplify template development. The actual functionality is part of CMExternalLink.
      Returns:
      always false