The assetManager.defaultBrowse activity is an abstract activity that maintains general settings that other activities will inherit. As you will see when you examine the settings assigned to it, this activity provides view-only access to items, which is useful when you want users to be able to view items in the UI without being permitted to edit them.

Defining General Activity Settings

The file begins as follows:

 <activity id="assetManager.defaultBrowse">
    <page>
      /assetManager.jsp
    </page>
    <asset-editor>
      <page>
        /assetEditor/editAsset.jsp
      </page>
    </asset-editor>
    <configuration>
      /atg/web/assetmanager/ConfigurationInfo
    </configuration>

The first set of tags, after the activity ID is specified, determine the page that provides the structure to the Asset Manager UI Framework, assetManager.jsp. Among other specifications, assetManager.jsp shapes the UI into a two-paned structure. The structure for the Details pane is determined by editAsset.jsp. The ConfigurationInfo component specifies the Task Configuration Manager as well as other resources used by the Asset Manager framework to generate the UI. Note that both AssetUI and DPS-UI files use the same Task Configuration Manager, which means an inheritance dependency can and does exist between them. Any other uses of a <configuration> tag in these files provide view-specific settings.

Defining View Mappings

The view mapping settings specify item mappings, which control the display of properties in the Details pane. They also let you override the view mapping mode. Specify one <view-mapping> tag per each <item mapping> tag you specify. These tags identify the UI resource (item mapping name) and type of access (view mapping mode) provided to properties of the specified item types.

Keep in mind that sometimes you may want to provide view-only access to some items and edit access to others. For example, you might want an activity to provide read-only access to items that are otherwise editable. To accommodate this complexity, the JSP relies on the task configuration file to re-evaluate the map mode based on the item type, giving you the option to pass a map mode to the JSP that’s different from the one the task configuration file received. The task configuration file uses this information to determine the item mapping name to use.

The following configurations are specified to assetManager.defaultBrowse:

  <view-mappings>
    <view-mapping mode="AssetManager.edit">
      <item-mapping>
        <item-type>*</item-type>
        <item-mapping-name>AssetManager</item-mapping-name>
        <view-mapping-mode-override>AssetManager.view</view-mapping-mode-override>
      </item-mapping>
    </view-mapping>
    <view-mapping mode="AssetManager.multiEdit">
      <item-mapping>
        <item-type>*</item-type>
        <item-mapping-name>AssetManager</item-mapping-name>
        <view-mapping-mode-override>AssetManager.view</view-mapping-mode-override>
      </item-mapping>
    </view-mapping>
    <view-mapping mode="AssetManager.view">
      <item-mapping>
        <item-type>*</item-type>
        <item-mapping-name>AssetManager</item-mapping-name>
      </item-mapping>
    </view-mapping>
    <view-mapping mode="AssetManager.diff">
      <item-mapping>
        <item-type>*</item-type>
        <item-mapping-name>AssetManager</item-mapping-name>
      </item-mapping>
    </view-mapping>
    <view-mapping mode="AssetManager.conflict">
      <item-mapping>
        <item-type>*</item-type>
        <item-mapping-name>AssetManager</item-mapping-name>
      </item-mapping>
    </view-mapping>
  </view-mappings>
</activity>

When AssetManager.edit or AssetManager.multiedit is passed from the JSP, the task configuration specifies the item mapping as Asset Manager and changes the mode from edit to view, which prevents buttons like Save from appearing in the UI. That way, the UI is in view-only mode regardless of the map mode initially received by the task configuration file. There’s no reason to change the modes for AssetManager.conflict and AssetManager.diff because only an editable JSP can pass these modes to the task configuration file, which is prevented by the change made to AssetManager.edit mode.

Note the use of * as a value indicates the inclusion of all items, such as all item types, as is the case here. Using an * in the context of the view mapping name in the view mapping repository has a different meaning.

 
loading table of contents...