close

Filter

loading table of contents...

Site Manager Developer Manual / Version 2310

Table Of Contents

3.4 Defining XML Files For Configuration

The Site Manager can be configured using different XML files. The names of these files are defined in the editor.properties file. The files are a small bootstrap file (editor.startup.configuration) necessary for some settings before the actual start of the editor, and the XML files for the customization of the editor. The following use cases are supported:

  • Everyone uses the same configuration file. This file is defined by the property editor.configuration.

  • Everyone uses the same common configuration file with additional group (group.configuration) and/or user (user.configuration) specific configuration files.

  • Each group has its own configuration files defined by group.configuration and the <ConfigGroups> element in the editor startup file. Additional user specific configuration files can be used. The groups might share configuration files but they do not have to.

When a user is member of more than one group, for which specific configuration files exist, then the system chooses an arbitrary group for which the configuration file is taken. So, it is good practice, to have only one group for each user for which a configuration file exists. If this is no option, you can define your own selection scheme as described in this manual.

The files are evaluated in a specific order:

No <ConfigGroups> element used

  1. Bootstrap file defined by editor.startup.configuration,

  2. Common configuration file defined by editor.configuration

  3. Group specific files defined by group.configuration

  4. User specific files defined by user.configuration.

<ConfigGroups> element used

  1. Bootstrap file defined by editor.startup.configuration,

  2. Group specific files defined by group.configuration and in <ConfigGroups> in the editor-startup.xml file (see Section 3.5, “Defining Group Specific Configuration Files” for details).

  3. User specific files defined by user.configuration.

Be aware, that you need to define a file in editor.configuration in both cases, even if it will not be used in the second case, otherwise an error occurs.

Example for a configuration without a <ConfigGroups> element

You have made the following settings in editor.properties:

      editor.startup.configuration=editor-startup.xml
editor.configuration=editor.xml
group.configuration=editor-group-{0}.xml
user.configuration=editor-user-{0}.xml

    

A user named "Axel" who is only member of the group "editors" logs in and the following configuration files are applied in the shown order:

  1. editor-startup.xml

  2. editor.xml

  3. editor-group-editors.xml

  4. editor-user-Axel.xml

Example for a configuration with a <ConfigGroups> element

You have made the following settings in editor.properties:

      editor.startup.configuration=editor-startup.xml
editor.configuration=editor.xml
group.configuration=editor-group-{0}.xml
user.configuration=editor-user-{0}.xml

    

And these settings in editor-startup.xml:

      <ConfigGroups>
   <ConfigGroup name="editors">
      <Configuration name="common"/>
      <Configuration name="editor"/>
   </ConfigGroup>
</ConfigGroups>

    

The same user as before logs in and the following configuration files are applied in the shown order:

  1. editor-startup.xml

  2. editor-goup-common.xml

  3. editor-group-editor.xml

  4. editor-user-Axel.xml

How files merge

All elements which can occur only once - due to the coremedia-editor.dtd - will be overwritten by the settings of the succeeding configuration file. The following elements use inheritance:

  • Bundle and Explorer elements will be added.

  • Existing Document and Process definitions of Documents and Processes elements, will be overwritten, new definitions will be added.

  • Existing DocumentType definitions of DocumentTypes elements use inheritance on the PropertyType element level. That is, existing PropertyType definitions (for example a Validator set for the property Name) will be overwritten and new definitions will be added.

Example:

The interesting parts of the editor.xml look as follows:

      <Bundle name="first/bundle"/>
<SpellChecker enabled="true"/>
<Documents>
  <Document type="Article">
    <Property name="Headline" editorClass="FirstClass"/>
  </Document>
</Documents>
<DocumentTypes>
  <DocumentType name="Article">
    <PropertyType name="Editor">
      <Validator class="NotEmpty"/>
      <Initializer class="SetChiefEditor"/>
    <PropertyType/>
  </DocumentType>
</DocumentTypes>


    

The interesting parts of the group specific editor definition look as follows:

      <Bundle name="second/bundle"/>
<SpellChecker enabled="false"/>
<Documents>
  <Document type="Image">
    <Property name="Caption" editorClass="SecondClass"/>
  </Document>
</Documents>
<DocumentTypes>
  <DocumentType name="Article">
    <PropertyType name="Editor">
      <ModelClass class="MyModel"/>
      <Initializer class="SetEditor"/>
    <PropertyType/>
  </DocumentType>
</DocumentTypes>

    

Applying both editor definitions will result in the following behavior:

  • Both bundles will be used.

  • The spell checker will be disabled.

  • Article documents will use the property editor FirstClass with the property Headline and Image documents the property editor SecondClass with the property Caption.

  • Article documents will use the validator class NotEmpty, the initializer class SetEditor and the model class MyModel with the property Editor.

See Section 5.2, “Configuration Possibilities in the XML Files” for a detailed description of the properties.

You can either use locally stored files for each client or administrate these files centrally on the Content Server and deliver them to the clients.

  • For locally stored files adding the path relative to <CoreMediaHome>.

  • For centrally stored files adding the URL to the Content Server as described below.

Note

Note

Not mandatory: You only need to do this configuration if you want to use group or user specific configuration files or if you want to administrate the files centrally on the Content Server. Otherwise, the following files in the folder <CoreMediaInstall>/properties/corem are used by default:

  • editor-startup.xml

  • editor.xml

Caution

Caution

Configure in the following file:

  • editor.properties

Defining the XML configuration files
  1. Enter the name of the XML file with the path relative to <CoreMediaHome> into the appropriate properties.

  • editor.startup.configuration

  • editor.configuration

Defining user or group specific configuration files
  1. Enter the name of the XML files with the path relative to <CoreMediaHome> into the appropriate properties.

  • group.configuration

  • user.configuration

  • You must add the wildcard {0} to the name of the XML file. This wildcard will be replaced by the group name or the user name of the user. If the user belongs to multiple groups, the system will choose an arbitrary group.

  1. If required configure the <ConfigGroups> element in the editor startup file as described in Section 3.5, “Defining Group Specific Configuration Files”.

Example:
  • group.configuration=http://localhost:44441/coremedia/files/properties/corem/editor-{0}.xml.

  • The user belongs to the groups Editors and CvD. Thus, the files with the URL http://localhost:44441/coremedia/files/properties/corem/editor-Editors.xml and http://localhost:44441/coremedia/files/properties/corem/editor-CvD.xml will be loaded in an arbitrary order.

Note

Note

Note, that you can define multiple configuration files for a specific group, which will be evaluated in a specific order. See the Site Manager Developer Manual for a description of the XML element <ConfigGroups> for details.

Administrating the XML files on the server
  1. Store the XML files in the properties/corem directory of the Content Server.

  2. Enter the following URL into the configuration property of the XML file in the editor.properties file:

  • http://<ServerHost>:<ServerPort>/coremedia/files/properties/corem/<editor-xmlfilename>.

  • Replace <ServerHost> with the host name of the Content Server and <ServerPort> with the port of the Content Server.

  1. Enter the names of the XML files in the properties/policy/server.policy file of the server in order to allow the server to deliver the files. The entry must look as shown in the next code example:

        grant codeBase "http://localhost/servlets/fileservlet" {
    .
    .
    permission java.io.FilePermission 
    "properties${/}corem${/}editor.xml", "read";
    permission java.io.FilePermission 
    "properties${/}corem${/}editor-CVD.xml", "read";
}; 
      

Example 3.2. Add files to server.policy


Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.