Blueprint Developer Manual / Version 2107
Table Of ContentsThe site model and the sites service are strongly connected with each other. While the site model consists of properties defining the site structure, the sites service uses this model to work with sites programmatically.
Sites Service
The sites service is designed to access the available sites and to determine the relation between sites and contents. The site model configures the behavior of the sites service.
For developing multi-site features the main entry point is the sites service.
Site Model
The site model is the centralized configuration of the CoreMedia Multi-Site behavior. Its configuration is required in several applications which are listed below. While section Site Model Properties lists the configurable properties (exception: CoreMedia Site Manager with an extra description in Site Model in CoreMedia Site Manager) the different configuration locations are explained per application:
Site Model Properties
The following table illustrates the configurable site model properties. To get to know more about the properties and patterns used, consult the Javadoc of com.coremedia.cap.multisite.SiteModel.
sitemodel.site.indicator.documentType
| |
Description |
Specifies the content type of the site indicator document. Each site must only have one instance of that content type. |
Default Value | CMSite
|
sitemodel.site.indicator.depth
| |
Description |
Defines the depth under the root of the site folder, where the site indicator document resides. |
Deprecated |
Setting will phase out. First it will default to 0 and will be removed completely someday. In the end, the site indicator will always be located in the site root folder. |
Default Value | 0 |
sitemodel.site.indicator.namePattern
| |
Description |
Name pattern, which will be used for the name of the site indicator document when
deriving a site. Only placeholder |
Default Value | {0} [Site]
|
sitemodel.site.rootdocument.namePattern
| |
Description |
Defines the pattern for the site's home page document name, used while deriving a
site. Only placeholder |
Default Value | {0}
|
sitemodel.site.manager.groupPattern
| |
Description |
Defines the pattern for responsible default site manager group name when deriving a site. For available placeholders see Table 5.21, “Placeholders for Site Model Configuration” |
Default Value | manager-{4}
|
sitemodel.siteManagerGroupProperty
| |
Description |
Defines the property of the site indicator document holding the site manager group names. |
Default Value | siteManagerGroup
|
sitemodel.groupPropertyDelimitingRegEx
| |
Description |
Defines the separator (as regular expression) how to split group names into elements, as for example for the site-manager-groups. |
Default Value | comma, including trailing space characters
|
sitemodel.translationManagerRole
| |
Description |
Defines the group name denoting the role which permits a user to start a translation workflow. |
Default Value | translation-manager-role
|
sitemodel.idProperty
| |
Description |
Defines the property of the site indicator document which contains the site id. |
Default Value | id
|
sitemodel.nameProperty
| |
Description |
Defines the property of the site indicator document which contains the site name. |
Default Value | name
|
sitemodel.localeProperty
| |
Description |
Defines the property of translatable content and the site indicator document, which holds the locale of the content. |
Default Value | locale
|
sitemodel.masterProperty
| |
Description |
Defines the property of translatable content and the site indicator, which contains the link the master document. |
Default Value | master
|
sitemodel.masterVersionProperty
| |
Description |
Defines the property of translatable content, which contains the version the corresponding master document. |
Default Value | masterVersion
|
sitemodel.rootProperty
| |
Description |
Defines the property of the site indicator document, which refers to the home page document of this site. |
Default Value | root
|
sitemodel.uriSegmentProperty
| |
Description |
Defines the property of the site's home page content type, which defines the root URI segment of the site. |
Default Value | segment
|
sitemodel.uriSegmentPattern
| |
Description |
Defines the pattern for the default root URI segment when deriving a site. For available placeholders see Table 5.21, “Placeholders for Site Model Configuration”. |
Default Value | {0}-{4}
|
sitemodel.rootFolderPathPattern
| |
Description |
Defines the pattern to determine the site folder for a new derived site. For available placeholders see Table 5.21, “Placeholders for Site Model Configuration”. |
Default Value | /Sites/{0}/{6}/{5}
|
sitemodel.rootFolderPathDefaultCountry
| |
Description |
Defines the folder name for the country folder, if the locale chosen while deriving a site defines no country explicitly. |
Default Value | NO_COUNTRY
|
sitemodel.translationWorkflowRobotUser
| |
Description |
Defines the user name of the user responsible for creating derived content during a translation workflow.
|
Default Value | translation-workflow-robot
|
Table 5.20. Properties of the Site Model
Site Model Placeholders
Placeholder | Description | Example |
---|---|---|
{0}
| site name | MySite
|
{1}
| site locale's language code | en
|
{2}
| site locale's country code (defaults to language code, if not available) | US
|
{3}
| site locale's variant (defaults to country or language code, if not available); using BCP 47 Extensions | u-cu-usd
|
{4}
| site locale's IETF BCP 47 language tag | en-US-u-cu-usd
|
{5}
|
site locale's language display name (localized in U.S. English); only available for
sitemodel.rootFolderPathPattern
| English
|
{6}
|
site locale's country display name (localized in U.S. English); only available for
sitemodel.rootFolderPathPattern
| United States
|
{7}
|
site locale's variant with the prefix variantPrefix configured in site model's
Spring context; defaults to empty String; only available for
sitemodel.rootFolderPathPattern . See
IANA Language Subtag Registry
for valid registered variants.
| _arevela
|
Table 5.21. Placeholders for Site Model Configuration
Application Configurations
For details of the configuration in every application, please read the documentation below.
CoreMedia Studio
The site model default properties can be adjusted in the
application.properties
file in the src/main/resources
directory of the studio-server
module. See
Chapter 3, Deployment in Studio Developer Manual for further information.
Content Management Server
The site model default properties can be adjusted in the
application.properties
file in the src/main/resources
directory of the content-management-server-app
module. See
???? for further
information.
Content Application Engine
The site model default properties can be adjusted in the
component-blueprint-cae.properties
file in the
src/main/resources/coremedia
directory of the
cae-base-component
module. Thus, the configuration applies to the Live
CAE as well as to the Preview CAE. See
Content Application Developer Manual for further information.
Command Line Tools
The site model default properties can be adjusted in the
commandline-tools-sitemodel.properties
file in the
properties/corem
directory of the
cms-tools-application
module.
CoreMedia Site Manager
The Site Manager provides only rudimentary support of the multi-site features especially for backwards compatibility to old CoreMedia systems. For the full set of features please use CoreMedia Studio.
To migrate from existing multi-site features of Site Manager you need to adapt
the editor.xml
for example by adding a SiteModel
.
Example 5.10, “SiteModel in editor.xml
” shows an example for adding the
SiteModel
to editor.xml
.
<Editor> <!-- ... --> <SiteModel siteIndicatorDocumentType="CMSite" siteIndicatorDepth="0" idProperty="id" rootProperty="root" masterProperty="master" localeProperty="locale"/> <!-- ... --> </Editor>
Example 5.10. SiteModel in editor.xml
Mind that for changing property names of master
and masterVersion
you
also need to adapt property editors for the versioned master reference as shown in
Example 5.11, “Versioned Master Link in editor.xml
”.
<Document type="..." viewClass="..."> <!-- ... --> <Property name="master" editorClass="hox.corem.editor.toolkit.property.VersionLinkEditor" versionProperty="masterVersion"/> <Property name="masterVersion" editorClass="hox.corem.editor.toolkit.property.InvisibleEditor"/> <!-- ... --> </Document>
Example 5.11. Versioned Master Link in editor.xml