Interface CMHasContexts
- All Superinterfaces:
com.coremedia.objectserver.dataviews.AssumesIdentity,BelowRootNavigation,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,CMTeasable,CMTeaser,CMVideo,CMVisual
Actually, contexts are related to segment and link building and
thus belong to CMLinkable.
However, we want to enforce navigation trees (no arbitrary graphs),
therefore we don't want explicit contexts in CMNavigation
documents which are also derived from CMLinkable. In the content beans
we implement contexts in CMLinkable.
Represents the document type CMHasContexts.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName of the document property 'contexts'.static final StringName of the ContentType'CMHasContexts'.Fields inherited from interface com.coremedia.blueprint.common.contentbeans.CMLinkable
EXTERNALLY_DISPLAYED_DATE, HTML_DESCRIPTION, HTML_TITLE, KEYWORDS, LINKED_SETTINGS, LOCAL_SETTINGS, LOCATION_TAXONOMY, RESOURCE_BUNDLES2, SEGMENT, SUBJECT_TAXONOMY, TITLE, VALID_FROM, VALID_TO, VIEWTYPEFields inherited from interface com.coremedia.blueprint.common.contentbeans.CMLocalized
LOCALE, MASTER, MASTER_VERSIONFields inherited from interface com.coremedia.objectserver.beans.ContentBean
METADATA_PROPERTIES_PREFIX -
Method Summary
Modifier and TypeMethodDescriptionMap<String,? extends com.coremedia.cae.aspect.Aspect<? extends CMHasContexts>> Deprecated.since 1907.1; Implement optional features as extensions.List<? extends com.coremedia.cae.aspect.Aspect<? extends CMHasContexts>>Deprecated.since 1907.1; Implement optional features as extensions.Collection<? extends CMHasContexts>Returns theLocalespecific variants of thisCMLocalizedReturns the value of the document propertyCMLocalized.MASTER.Map<Locale,? extends CMHasContexts> Returns the variants of thisCMLocalizedindexed by theirLocaleMethods inherited from interface com.coremedia.objectserver.dataviews.AssumesIdentity
assumeIdentityMethods inherited from interface com.coremedia.blueprint.common.contentbeans.BelowRootNavigation
getRootNavigationsMethods inherited from interface com.coremedia.blueprint.common.contentbeans.CMLinkable
getContexts, getExternallyDisplayedDate, getHtmlDescription, getHtmlTitle, getKeywords, getLinkedSettings, getLocalSettings, getLocationTaxonomy, getResourceBundles2, getSubjectTaxonomy, getTitle, getValidFrom, getValidTo, getViewtype, isOpenInNewTabMethods inherited from interface com.coremedia.blueprint.common.contentbeans.CMLocalized
getCountry, getLang, getLocale, getMasterVersionMethods inherited from interface com.coremedia.blueprint.common.contentbeans.CMObject
getAspectsProvider, getContentId, getUuidMethods inherited from interface com.coremedia.objectserver.beans.ContentBean
getContent, getContentBeanFactoryMethods inherited from interface com.coremedia.blueprint.common.navigation.HasViewTypeName
getViewTypeNameMethods inherited from interface com.coremedia.blueprint.common.navigation.Linkable
getLocale, getSegment
-
Field Details
-
NAME
Name of the ContentType'CMHasContexts'.- See Also:
-
CONTEXTS
Name of the document property 'contexts'.- See Also:
-
-
Method Details
-
getMaster
CMHasContexts getMaster()Returns the value of the document propertyCMLocalized.MASTER.- Specified by:
getMasterin interfaceCMLinkable- Specified by:
getMasterin interfaceCMLocalized- Returns:
- a
CMHasContextsobject
-
getVariantsByLocale
Map<Locale,? extends CMHasContexts> getVariantsByLocale()Description copied from interface:CMLocalizedReturns the variants of thisCMLocalizedindexed by theirLocale- Specified by:
getVariantsByLocalein interfaceCMLinkable- Specified by:
getVariantsByLocalein interfaceCMLocalized- Returns:
- the variants of this
CMLocalizedindexed by theirLocale
-
getLocalizations
Collection<? extends CMHasContexts> getLocalizations()Description copied from interface:CMLocalizedReturns the
Localespecific variants of thisCMLocalized- Usage:
Add elements for each variant excluding self (self is of type
Pagein 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:
getLocalizationsin interfaceCMLinkable- Specified by:
getLocalizationsin interfaceCMLocalized- Returns:
- the
Localespecific variants of thisCMLocalized
-
getAspectByName
@Deprecated Map<String,? extends com.coremedia.cae.aspect.Aspect<? extends CMHasContexts>> getAspectByName()Deprecated.since 1907.1; Implement optional features as extensions.Description copied from interface:CMObjectReturns 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:
getAspectByNamein interfaceCMLinkable- Specified by:
getAspectByNamein interfaceCMLocalized- Specified by:
getAspectByNamein interfaceCMObject- Returns:
- a Map from aspectIDs to Aspects
-
getAspects
Deprecated.since 1907.1; Implement optional features as extensions.Description copied from interface:CMObjectReturns a list of all
Aspectfrom 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:
getAspectsin interfaceCMLinkable- Specified by:
getAspectsin interfaceCMLocalized- Specified by:
getAspectsin interfaceCMObject- Returns:
- a list of Aspects
-