The Configuration Files for the Details Views

The settings for the details views can be found in the following file: webapps/GUI/WEB-INF/inspectorRegistry.xml

The files are based on the Spring framework.

The contents of the individual details views (internally called inspectors) are displayed by means of Velocity templates that can be found in the inspectors directory below the directory mentioned above. If desired, the supplied Velocity templates can be modified or extended. For this the keywords listed in section Velocity Templates can be used.

In the file inspectorRegistry.xml a details view is called an inspector. What an inspector displayed is controlled by restrictions. An inspector can have several views.

<bean id="publication-inspector"
  class="com.infopark.cm.htmlgui.browse.inspector.Inspector">
<!-- restrictions:-->
  <property name="objType">
    <value>publication</value>
  </property>
<!-- views:-->
  <property name="overview">
    <ref bean="publication-overview"/>
  </property>
  <property name="details">
    <list>
      <ref bean="publication-details" />
      <ref bean="links" />
      <ref bean="publication-childData" />
      <ref bean="sourceCode" />
      <ref bean="publication-administration" />
      <ref bean="help" />
    </list>
  </property>
</bean>

In this example the inspector named publication-inspector is used if the type of the currently selected file is publication.

The following restrictions exist:

<property name="objType"><value>publication</value></property>
<property name="objClasses"><set>
  <value>referrer</value>
  <value>press</value></set>
</property>
<property name="roles"><set>
  <value>admin</value>
  <value>restricted</value></set>
</property>

The criteria available for deciding whether an inspector is used for displaying the properties of a file are file types, file formats and roles. However, it is not required to define restrictions. This is the case with the default inspector:

<bean id="default"
  class="com.infopark.cm.htmlgui.browse.inspector.Inspector">
<!-- no restrictions-->
<!-- views:-->
<property name="overview">
  <ref bean="default-overview"/></property>
</bean>

Restrictions for file formats and file types are mutually exclusive because the file format includes the definition of the file type.

The order of the inspectors in the configuration file is meaningless. Instead the inspectors are examined according to the following criteria. The first inspector that meets a criterion is selected and the search process is terminated.

  • The inspectors in which file format restrictions are defined are examined first.
  • The inspectors defining file type restrictions are examined next.
  • The inspectors defining no restrictions are examined.
  • The inspector with the ID default is searched for.
  • No inspector is used and an error message is written into the log.

If ambiguous inspector configurations exist, a corresponding message is written to the log.

For each inspector at least one view, overview, must be configured:

<property name="overview">
  <ref bean="default-overview"/>
</property>

Optionally, additional details views can be configured. In an inspector configuration references to such views can be made:

<property name="details">
  <list>
    <ref bean="publication-details" />
    <ref bean="links" />
    <ref bean="publication-childData" />
    <ref bean="sourceCode" />
    <ref bean="publication-administration" />
    <ref bean="help" />
  </list>
</property>

The order of the references to views determines the order of the tabs displayed for them in the Content Navigator. Of course, the referenced views must be present, i. e. for each of them a view configuration must exist:

<bean id="publication-overview"
    class="com.infopark.cm.htmlgui.browse.inspector.View">
  <property name="titles">
    <map>
      <entry key="de"><value>Überblick</value></entry>
      <entry key="en"><value>Overview</value></entry>
    </map>
  </property>
  <property name="template">
    <value>publication-overview.vm</value>
  </property>
</bean>
<bean id="publication-details"
    class="com.infopark.cm.htmlgui.browse.inspector.View">
  <property name="titles">
    <map>
      <entry key="de"><value>Details</value></entry>
      <entry key="en"><value>Details</value></entry>
    </map>
  </property>
  <property name="template">
    <value>publication-details.vm</value>
  </property>
</bean>
[etc.]

A view configuration determines exactly one Velocity template. The referenced template files are searched for in the webapps/GUI/WEB-INF/config/inspectors directory.