Interface CMObject

All Superinterfaces:
com.coremedia.objectserver.dataviews.AssumesIdentity, com.coremedia.objectserver.beans.ContentBean
All Known Subinterfaces:
CMAbstractCode, CMAction, CMArticle, CMAudio, CMChannel, CMCollection<T>, CMContext, CMCSS, CMDownload, CMDynamicList<T>, CMExternalLink, CMFolderProperties, CMGallery<T>, CMHasContexts, CMHTML, CMImage, CMImageMap, CMInteractive, CMJavaScript, CMLinkable, CMLocalized, CMLocTaxonomy, CMMedia, CMNavigation, CMPerson, CMPicture, CMPlaceholder, CMQueryList, CMResourceBundle, CMSettings, CMSite, CMSitemap, CMSpinner, CMSymbol, CMTaxonomy, CMTeasable, CMTeaser, CMTheme, CMVideo, CMViewtype, CMVisual

public interface CMObject extends com.coremedia.objectserver.beans.ContentBean

Root interface for all content beans.

Represents the document type CMObject.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Name of the ContentType 'CMObject'.

    Fields inherited from interface com.coremedia.objectserver.beans.ContentBean

    METADATA_PROPERTIES_PREFIX
  • Method Summary

    Modifier and Type
    Method
    Description
    Map<String,? extends com.coremedia.cae.aspect.Aspect<? extends CMObject>>
    Deprecated.
    since 1907.1; Implement optional features as extensions.
    List<? extends com.coremedia.cae.aspect.Aspect<? extends CMObject>>
    Deprecated.
    since 1907.1; Implement optional features as extensions.
    com.coremedia.cae.aspect.provider.AspectsProvider
    Deprecated.
    since 1907.1; Implement optional features as extensions.
    int
    Returns the CoreMedia internal id of the underlying Content.
    Returns the CoreMedia internal UUID of the underlying Content.

    Methods inherited from interface com.coremedia.objectserver.dataviews.AssumesIdentity

    assumeIdentity

    Methods inherited from interface com.coremedia.objectserver.beans.ContentBean

    getContent, getContentBeanFactory
  • Field Details

  • Method Details

    • getContentId

      int getContentId()

      Returns the CoreMedia internal id of the underlying Content.

      Usage:

      Add content id to meta information.

      Freemarker:
      
       <#if self.contentId?has_content>
         <meta name="coremedia_content_id" content="${self.contentId}"/>
       </#if>
       
      JSP:
      
       <c:if test="${not empty self.contentId}">
         <meta name="coremedia_content_id" content="${self.contentId}"/>
       </c:if>
       
      Returns:
      the id as int (without any prefix)
    • getUuid

      UUID getUuid()
      Returns the CoreMedia internal UUID of the underlying Content.
      Returns:
      the UUID of the content object; or null if the server version does not support UUIDs or if the content object was created without UUID on a live server
      Since:
      2404.1
    • getAspects

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

      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>
       
      Returns:
      a list of Aspects
    • getAspectByName

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

      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']}"/>
       
      Returns:
      a Map from aspectIDs to Aspects
    • getAspectsProvider

      @Deprecated com.coremedia.cae.aspect.provider.AspectsProvider getAspectsProvider()
      Deprecated.
      since 1907.1; Implement optional features as extensions.
      Provides access to the AspectsProvider which then offers access several Aspects for a bean
      Returns:
      the AspectsProvider