close

Filter

loading table of contents...

Site Manager Developer Manual / Version 2207

Table Of Contents

5.2.1 General Configuration

Using these elements, some general features can be configured.

<Editor>

Child elements: <AuthenticationFactory>, <DocumentTableLayout>?, <Locale>?, <Preview>, <PropertyModelFactory>?, <RemoteControl>? <DocumentTypes>?, <Documents>?, <Explorer>*, <ResourceChooser>?, <Query>?, <Search>?, <SpellChecker>, <PropertyLanguageResolverFactory>, <ResourceNamingFactory>?, <Workflow>?, <Processes>?, <FrameFactory>?, <WebBrowsers>, <WebContext>*

Parent elements:

 <Editor loginName="test" loginDomain="test"  loginPassword="test" 
  loginImmediate="true">
        .
        .
        .
</Editor>

Example 5.11. Example for the Editor element in editor-startup.xml


You can enter user name and password using the element <Editor>. The login window of the Site Manager is automatically filled with these data. If you set the attribute loginImmediate="true", this login info will immediately accepted and the login will proceed. The settings for the Editor element must be located in editor-startup.xml.

Attribute Description
class This attribute is used to enter the editor class to use. Default is hox.corem.editor.generic.GenericEditor.
loginName This attribute is used to enter the default name for login. If no name is entered, the name from the environment is used. You can always change the name during login, it is just a preset. If a login name should be predefined, it must be set in the editor-startup.xml file. If a global editor.xml file is used for all users it might be sensible to set the login name in the editor.properties file.
loginPassword This attribute is used to enter the default password for login. If no password is entered, the login name is used. You can always change the password during login, it is just a preset. If a login password should be predefined, it must be set in the editor-startup.xml file. If a global editor.xml file is used for all users it might be sensible to set the login password in the editor.properties file.
loginDomain This attribute is used to enter the default domain for login. You can always change the domain during login, it is just a preset. If a login domain should be predefined, it must be set in the editor-startup.xml file.
loginImmediate If this attribute is set to "true", an attempt is made to connect directly to the server with the login data given above. The login window does not appear. The default value is "false".
showCurrentUser If this attribute is set to "true", the name of the current user of the editor is shown at the top of the window. Default is "false", that is, the user name is not shown.
startup This attribute defines the Site Manager window to start with. Possible values are "OpenExplorer" "OpenQuery", "OpenWorkflow", "OpenUserManager" which will open the respective window. By default, the Site Manager starts with the Explorer window ("normal" user) or with the user manager window ("administrator" user).
startupMode

This attribute defines the start-up mode for administrators. If set to "4.2", the super user with ID "0" always starts with the User Manager window. All other users will start with the window defined using "startup".

If set to "5.0", the super user with ID "0" and all members of the administration group start with the User Manager window. All other users will start with the window defined using "startup". Default setting is "5.0".

enableExplorer This attribute is used to disable the Explorer window of the Site Manager (false). Default is "true", so the Explorer window can be opened.
enableDirectPublication This attribute is used to enable direct publication ("true"). Default is "false", so no direct publication icons and menu items are shown.
enableWorkflow This attribute is used to disable all workflow related menu items and icons ("false"). Default is "true", therefore workflow features are enabled.
removeEmptyParagraphs

The Site Manager adds empty paragraphs around tables in order to enable the user to enter content before or after the table (this circumvents a Swing problem). By default, ("false") these empty paragraphs are saved on the server. If you set this attribute to "true", empty paragraphs without attributes will be removed in the following cases when writing rich text back to the server:

  • At the beginning of rich text, if a table follows: <div><p/><table>

  • At the end of rich text following a table: </table><p/></div>

  • At the beginning of a table cell, if a table follows: <td><p/><table>

  • At the end of a table cell following a table: </table><p/></td>

Warning: If enabled, the representation of rich text on the server will be changed, if a document is saved in the Site Manager.

mayChooseMemberFromOtherDomain If set to "false" (default) only members of the administrator group are allowed to search for users in other domains using the User Manager window. Non administrators can only search in their own domain. If set to "true", every user may choose a domain for search.

Table 5.32. The attributes of the element Editor


<AuthenticationFactory>

Child elements:

Parent element: <Editor>

You can use this element in order to set your own authentication factory. The element needs to be located in the editor-startup.xml file.

<Editor>
  <AuthenticationFactory class="com.myFactory.OwnAuthenticationFactory"/>
.
.
.
</Editor>

This factory circumvents the standard login dialog and fetches principal and credentials by custom means.

Attribute Description
class The fully qualified name of your authentication factory. Your class must implement hox.corem.editor.AuthenticationFactory and needs a public no-argument constructor. See the Javadoc for details.

Table 5.33. Attribute of element <AuthenticationFactory>


<DocumentTableLayout>

Child elements:

Parent elements: <Editor>

You can globally define the appearance of document tables used in the explorer view, query view, publication view and resource choosers. By default, the tables are plain white without separators. See Section 5.2.5, “Configuring Table Views” for more specific table configuration.

<Editor>
   <DocumentTableLayout horizontalLines="true"
     evenBgColor="FFFFFF" oddBgColor="FFCCCC"/>
   .
   .
   .
</Editor>

Example 5.12. Example of the DocumentTableLayout element


The background color settings do not apply to publication views, because the background colors of this view visualize the result categories of the publication

Attribute Description
horizontalLines With this attribute set to "true", you can enable horizontal separator lines between the table rows. Default is "false".
verticalLines With this attribute set to "true", you can enable vertical separator lines between the table columns. Default is "false".
evenBgColor With this attribute, you can set a background color for even table rows. Use hexadecimal values, representing RGB values, such as FFCCCC for a light red. Default is white. The numbering of rows starts with "0", so the first row is even.
oddBgColor With this attribute, you can set a background color for odd table rows. Use hexadecimal values, representing RGB values, such as FFCCCC for a light red. Default is white.

Table 5.34. Attributes of the DocumentTableLayout element.


<Locale>

Child elements:

Parent elements: <Editor>

You can select the language and country settings which should be used by the Site Manager with the element <Locale>. These settings determine the language used in the GUI of the Site Manager. The locale that you set in editor-startup.xml will be used for the Login screen you can overwrite this setting with a <Locale> element in the editor.xml file. So you can define group specific localizations for example.

<Editor>
        <Locale language="de" country="DE"/>
        .
        .
        .
</Editor>

Example 5.13. Example for the Locale element


Using this element of the XML file, details of the localization of the Site Manager are given. If the element is not used, the environment settings are used. As a default, this element is used in the editor-startup.xml file.

Attribute

Description

language

The language used in the program. At present, there are locales for English ("en") and German ("de"). The locales follow the usage in java.util.Locale.

country

Country-specific settings. At present, there are locales for the United States ("US") and Germany ("DE"). The locales follow the usage in java.util.Locale.

Table 5.35. Attributes of element <Locale>


<Bundle>

Child elements:

Parent elements: <Editor>

<Editor>
        <Bundle name="my/bundle"/>
        .
        .
        .
</Editor>

Example 5.14. Example for the Bundle element


The Bundle element of the XML file defines the bundle file to use for localizing the Site Manager and for user defined properties. The file defined in the Bundle element, will be looked up by the Site Manager and will overwrite the default values. For the bundle shown in the example above, the following file has to be created in the classpath (<CMInstallationDirectory>/classes):

  • my/bundle.properties for German localization

  • my/bundle_en.properties for English localization

In this file, name/value pairs in the format my-column-title=My Column title are used. If "my-column-title" matches the value of an attribute name in the element <ColumnDefinition>, then "My Column title" would be the name of a column shown in the Site Manager. It is also possible to store bundle files for other languages simultaneously. For example, you can store the English names in a file bundle_en.properties. More details can be found in Section 4.10, “Localization”. As a default, this element is used in the editor-startup.xml file.

Attribute

Description

name

With this attribute, the name of the bundle file is entered. The name must correspond to a file in the Classpath. You must obtain the name of the bundle from your developers.

Table 5.36. Attribute of the <Bundle> element


<Preview>

Child elements: <Browser>*

Parent elements: <Editor>

Note

Note

The <Preview> element is deprecated, use <WebContext> instead.

<Editor>
        <Preview host="zeus" port="8001" 
          uriPath="coremedia/generator/goto"/>
        .
        .
        .
</Editor>

Example 5.15. Example for the Preview element


This element of the XML file is used to configure the Content Application Engine used for preview. The request to the generator then occurs via the URL (if no user defined pattern has been defined):

http://<host>:<port>/<uriPath>

Attribute Description
host The computer on which the Content Application Engine runs.
port The port via which the CAE is accessed.
uriPath The URI prefix for accessing the preview CAE. Default is coremedia/generator/goto.
pattern

You might configure individual URLs via a custom pattern. The following strings are replaced within the pattern:

  • %p the protocol to use

  • %h the host with the preview server

  • %n the port on the host with the preview server

  • %u the URI prefix of the resource locator URI

  • %i the numeric id of the resource locator URI

  • %v the version of the resource locator URI

  • %f combines %u and ?id=%i&Version=%v

  • %s combines %u and ?id=%i

  • %I returns the URL-encoded string id of the previewed resource

Default setting is: %p://%h:%n/%f

Table 5.37. Attributes of the element Preview


<Browser>

Child elements:

Parent elements: <Preview>

Note

Note

The <Browser> element is deprecated. Use <WebBrowsers> instead.

<Preview host="zeus" port="8000" 
                  uriPath="coremedia/generator/goto">
        <Browser name="Netscape Navigator" 
                 command="c:\\Programme\\Netscape\\Communicator
                          \\Program\\netscape.exe %s"/>
        .
        .
</Preview>        

Example 5.16. Example for the Browser element


You can select the browser for the preview using the element Browser. Multiple browsers can be entered. You can choose the browser to use from the File|Preview menu of the overview window. If you do not define any browser, the preview cannot be executed.

Attribute

Description

name

Name of the browser to start.

Any number of names can be entered here.

command

Command for starting the browser.

The string %s in the example is replaced by the URL of the document for display.

pattern

This attribute describes how the URL passed to the browser is constructed.

%p Protocol

%h Computer name

%n Port number

%u URI prefix

%i URI postfix

%f combined %u and %i

Example: pattern="wap://%h:%n/wap/%f"

Default: %p://%h:%n/%f

optional

Specifies whether this browser is optional when doing a preview with all configured browsers (for example by clicking the Preview button in the toolbar or by selecting File|Preview|All). The Editor only shows errors for non-optional browsers or if no browser could be started at all.

Allowed values are true and false. Default is false.

Table 5.38. Attributes of the element Browser


<RemoteControl>

Child elements:

Parent elements: <Editor>

<Editor>
        <RemoteControl enabled="true" port="44444"/>
        .
        .
</Editor>

Example 5.17. Example for the RemoteControl element


This element is used to configure whether the CoreMedia can be remote controlled or not and to set the port where to listen for requests.

The remote control of the Site Manager allows you to execute

  • all commands which may be executed on resources in the explorer view,

  • all commands which may be executed on process and task instances in the workflow view and

  • custom commands, which may be executed on resources, process and task instances, or external parameters given to the command.

Technically, the remote control is realized via HTTP by an embedded web server inside the Editor, which listens to remote control requests. Note that if you start two editors on the same computer which use the same configuration, remote control is disabled for the second editor, since it tries to use the same port. You could use custom configuration files for different users, specifying different ports, though.

Attribute

Description

enabled

This attribute controls whether the Site Manager can be remote controlled ("true") or not ("false"). Default is "false".

port

This attribute determines the port which will be used for the remote requests. Default is "44444".

Table 5.39. Attributes of the element RemoteControl


Editor Remote Control URLs

Requests have to be addressed to an URL of the pattern

http://localhost:<port>/coremedia/control?<parameters>

The port has to be the same as in the XML configuration.

The parameters determine, which command to execute and on which data to execute it. There are some well-known parameters which ease the usage:

Parameter Description
command Allows you to specify the name of the command class, which is executed upon the request. Custom command classes have to implement the interface hox.corem.editor.toolkit.Command or one of its subinterfaces. If there is no dot in the command name, hox.corem.editor.commands is prepended.
resourceId or documentId Allows you to specify one or more resources or documents, on which a hox.corem.editor.commands.ResourceCommand is executed.
processInstanceId Allows you to specify one process instance ID, on which a hox.corem.editor.commands.ProcessInstanceCommand is executed.
taskInstanceId In conjunction with a processInstanceId, it allows you to specify one task instance by its id, on which a hox.corem.editor.commands.TaskInstanceCommand is executed.

Table 5.40. Parameters of the remote control URI


If the command class is a hox.corem.editor.commands.MapCommand, all the parameters are passed to the command as a Map.

Examples for remote control URLs are:

http://localhost:44444/coremedia/control?command=OpenResourceInExplorer&resourceId=4712

Opens the document with the id 4712 in the explorer view

http://localhost:44444/coremedia/control?command=OpenDocument&resourceId=4712

Opens the document with the id 4712 in a document view

http://localhost:44444/coremedia/control?command=ShowResourceInformation&resourceId=4712

Opens the resource information view for the resource with the id 4712

http://localhost:44444/coremedia/control?command=OpenWfInstanceInWorkflow&processInstanceId=1&taskInstanceId=2

Opens the task instance 2 from the process instance 1 in the workflow view

http://localhost:44444/coremedia/control?command=StoreProperties&documentId=4712&Text=Test

Stores "Test" in the property Text of the document with id 4712

http://localhost:44444/coremedia/control?command=CreateDocument&parentId=4711&type=Article&name=NewDocument&Text=Test

Creates a new document named NewDocument with the document type Article below the folder with id 4711 and stores "Test" in the property Text of the document.

http://localhost:44444/coremedia/control?command=CreateFolder&parentId=4711&name=NewFolder

Creates a new folder named NewFolder below the folder with id 4711

Prior to using the commands, you have to check the access control. Requests are only accepted, if

  • their origin is the same computer as the one the Editor is running on and

  • their command is activated in the remote control policy file.

The remote control policy file $INSTALL_DIR/properties/policy/editor.policy is a standard Java policy file and may be edited with the Java policy tool. It grants execute rights to commands by specifying the name and the package of the command.

<FrameFactory>

Parent elements: <Editor>

<Editor>
  <FrameFactory explorerViewClass="my.ExplorerView"
  publishViewClass="my.PublishView"
  workflowViewClass="my.WorkflowView"/>
  .
  .
</Editor>

Example 5.18. Example of the FrameFactory element


You can use this element to add your own ExplorerView, PublishView, QueryView or WorkflowView classes to the editor.

Attribute

Description

explorerViewClass

Use this attribute to define your own explorer view for the editor.

publishViewClass

Use this attribute to define your own publication view for the editor.

queryViewClass Use this attribute to define your own query view for the editor.

workflowViewClass

Use this attribute to define your own workflow view for the editor.

Table 5.41. Attributes of element <FrameFactory>


<PropertyModelFactory>

Child elements: %varies;

Parent elements: <Editor>

<Editor>
  . 
  <PropertyModelFactory class="my.propertyModelFactory"/>
  .
</Editor>

Example 5.19. Example for the PropertyModelFactory element


This element of the XML file is used to specify a class which implements the interface hox.corem.editor.proxy.PropertyModelFactory and which should be used in the Site Manager. Here an own PropertyModelFactory class can be programmed (see the API documentation) and invoked by the attribute class.

Attribute

Description

class

This attribute is used for selecting a PropertyModelFactory for use with the Site Manager.

Table 5.42. Attribute of element <PropertyModelFactory>


<ResourceNamingFactory>

Parent elements: <Editor>

<Editor>
	<ResourceNamingFactory class="MyResourceNames"/>
	.
	.
</Editor>

Example 5.20. Example of the ResourceNamingFactory element


You can use this element to define your own ResourceNamingFactory. This factory creates and modifies names of resources and folders. This is intended to enable customization of how resources and folders are named or renamed in different projects or to check for allowed resource names (see the API documentation for details). Own resource naming factory classes must implement ResourceNamingFactory or extend BasicResourceNamingFactory.

Attribute Description
class This attribute is used to enter the ResourceNamingFactory to use.

Table 5.43. The attributes of the <ResourceNamingFactory> element


<WebBrowsers>

Parent elements: <Editor>

Child elements: <WebBrowser>

<Editor>
  ..
    <WebBrowsers>
      ..
    </WebBrowsers>
..
</Editor>

You can use the <WebBrowsers> element to configure web browser definitions for Web Extensions such as the preview with the <WebBrowser> child element. The <WebBrowsers> element has no attributes.

<WebBrowser>

Parent elements: <WebBrowsers>

<WebBrowsers>
  <!-- Standard Windows IE installation -->
  <WebBrowser id="Internet Explorer" os="win" 
  command="c:\\Program Files\\Internet Explorer\\Iexplore.exe %s"/>

  <!-- IE installation in german locale on Windows -->
  <WebBrowser id="Internet Explorer" os="win" language="de" 
  command="c:\\Programme\\Internet Explorer\\Iexplore.exe %s"/>
</WebBrowsers>

This element configures web browser installations for a given locale of the Site Manager and operating system. Web extensions (see <WebExtension>) may open several web browsers (Preview) or the first matching web browser. Therefore, the order of <WebBrowser> elements is important.

The example above configures two Windows web browsers, one with language attribute set to ‘de’. If a web extension running on German locale wants to select a browser, it should open the German browser. A precedence list defines which browser is selected.

  1. os

  2. language

  3. country

  4. no attribute

In the example above, for both browsers the os attribute has been set but the German browser is selected because it has a language attribute that matches the language of the German locale. If you delete the os attribute in the German browser configuration, the other browser will be opened.

In rare conditions a matching browser can not be opened. Take, for example, the configuration above and call a preview web browser from a Site Manager with a German locale on a French Windows system. The command c:\\Programme\\Internet Explorer\\Iexplore.exe %s can not be executed on the French system because "Programme" will not be found. In this case, the first browser is taken that can be opened, independently of any os or language settings.

Attribute Description
id The name of the browser, for example Internet Explorer. Use the same id for the same browser application, like FireFox for all Firefox configurations.
os The name of the operating system. This string must be a substring of the value of the Java system property os.name (case-insensitive). This attribute is optional. If not set, the command must be executable on all operating systems your Site Manager runs on.
language The language of the locale. The value must conform to a valid language in a Java java.util.Locale instance. For the English language the valid value is ‘en’ for the German language the valid value is ‘de’. This attribute is optional.
country The country of the locale. The value must conform to a valid country in a Java java.util.Locale instance. For the USA the valid value is ‘US’ for Germany the valid value is ‘DE’. This attribute is optional.
command

The command to start a browser with a given URL on the configured operating system. For the Internet Explorer on an English Windows installation the command looks as follows:

c:\\Program Files\\Internet Explorer\\ Iexplore.exe %s

The suffix %s is the placeholder for the URL to load in to the browser.

optional

Specifies whether this browser is optional. This feature is used by the Preview web extension when doing a preview with all configured browsers (for example by clicking the Preview button in the toolbar or by selecting File|Preview|All). The Site Manager only shows errors for non-optional browsers or if no browser could be started at all.

Allowed values are true and false. Default is false

Table 5.44. The attributes of the <WebBrowser> element


Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

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