Site Manager Developer Manual / Version 2304
Table Of Contents
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.configurationand 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
Bootstrap file defined by
editor.startup.configuration,Common configuration file defined by
editor.configurationGroup specific files defined by
group.configurationUser specific files defined by
user.configuration.
<ConfigGroups> element used
Bootstrap file defined by
editor.startup.configuration,Group specific files defined by
group.configurationand in<ConfigGroups>in theeditor-startup.xmlfile (see Section 3.5, “Defining Group Specific Configuration Files” for details).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:
editor-startup.xmleditor.xmleditor-group-editors.xmleditor-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:
editor-startup.xmleditor-goup-common.xmleditor-group-editor.xmleditor-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:
BundleandExplorerelements will be added.Existing
DocumentandProcessdefinitions ofDocumentsandProcesseselements, will be overwritten, new definitions will be added.Existing
DocumentTypedefinitions ofDocumentTypeselements use inheritance on thePropertyTypeelement level. That is, existingPropertyTypedefinitions (for example aValidatorset 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.
Articledocuments will use the property editorFirstClasswith the propertyHeadlineandImagedocuments the property editorSecondClasswith the propertyCaption.Articledocuments will use the validator classNotEmpty, the initializer classSetEditorand the model classMyModelwith the propertyEditor.
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
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.xmleditor.xml
Caution
Configure in the following file:
editor.properties
Defining the XML configuration files
Enter the name of the XML file with the path relative to
<CoreMediaHome>into the appropriate properties.
editor.startup.configurationeditor.configuration
Defining user or group specific configuration files
Enter the name of the XML files with the path relative to
<CoreMediaHome>into the appropriate properties.
group.configurationuser.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.
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.xmlandhttp://localhost:44441/coremedia/files/properties/corem/editor-CvD.xmlwill be loaded in an arbitrary order.
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
Store the XML files in the
properties/coremdirectory of the Content Server.Enter the following URL into the configuration property of the XML file in the
editor.propertiesfile:
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.
Enter the names of the XML files in the
properties/policy/server.policy fileof 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


