Oracle ATG Web Commerce has several components for creating a connection to an Endeca Workbench application. Similar to the MDEX connection components, the Workbench connection components vary depending on whether your environment has a single Workbench application or multiple applications (for example, to support multiple languages).

WorkbenchContentSource

The /atg/endeca/assembler/cartridge/manager/WorkbenchContentSource component represents a connection to a single Workbench application. The NucleusAssembler class uses this component to connect to the correct application for content.

DefaultWorkbenchContentSource

Out of the box, the WorkbenchContentSource component, which is of class atg.nucleus.GenericReference, references the /atg/endeca/assembler/cartridge/manager/DefaultWorkbenchContentSource component. DefaultWorkbenchContentSource is a globally-scoped component that includes a number of properties for connecting to a single Workbench application. The properties you are most likely to have to configure are:

PerLanguageWorkbenchContentSourceResolver

The WorkbenchContentSource component also includes configuration for referencing the request-scoped /atg/endeca/assembler/cartridge/manager/PerLanguageWorkbenchContentSourceResolver component which has been commented out:

#$scope=request
#loggingInfo=false
#useRequestNameResolver=true
#componentPath=/atg/endeca/assembler/cartridge/manager/\
               PerLanguageWorkbenchContentSourceResolver

This configuration exists for environments that have multiple Workbench applications for multiple languages. The PerLanguageWorkbenchContentSourceResolver component works similarly to and is of the same class as the PerLanguageMdexResourceResolver component, which is the atg.endeca.assembler.navigation.PerLanguageGenericReference class. The PerLanguageWorkbenchContentSourceResolver component resolves the correct WorkbenchContentSource component to use based on the appropriate language for the current request and it also defines a default WorkbenchContentSource component to use if a language-specific version cannot be resolved. To perform these tasks, the PerLanguageWorkbenchContentSourceResolver component sets the following properties:

# The default WorkbenchContentSource to use if a language-specific
# WorkbenchContentSource cannot be found.
defaultComponentPath=\
          /atg/endeca/assembler/cartridge/manager/DefaultWorkbenchContentSource

# The base path for language specific WorkbenchContentSource components. This
# will have suffixes like "_en" and "_es" tacked on.
componentBasePath=/atg/endeca/assembler/cartridge/manager/WorkbenchContentSource

The PerLanguageWorkbenchContentSourceResolver component is request-scoped so that it will resolve a new language-specific WorkbenchContentSource component for each request.

Additional Multi-Language Configuration Requirements

It is an Endeca requirement that the WorkbenchContentSource component used to communicate with any given Workbench application be globally scoped and started up front, before any requests are made. This situation is fine for the single language/single Workbench application case, where the cartridges only need to communicate with one application. For the multi-language case, however, a language-specific WorkbenchContentSource component should be resolved for each request. To accommodate this requirement, you create .properties files for each language-specific WorkbenchContentSource component, for example, the following shows a language-specific WorkbenchContentSource properties file for German:

$basedOn=DefaultWorkbenchContentSource

# Arg1 - Workbench app name
$constructor.param[1].value=ATGde

# Arg3 - Workbench host
$constructor.param[3].value=localhost

# AuthoringContentSource params

# Arg 4 - Workbench port
$constructor.param[4].value=8006

After creating the language-specific WorkbenchContentSource components, add them to the intialServices property of the /initial component so that they are started on application start-up, for example:

initialServices+=\
   /atg/endeca/assembler/AssemblerPipelineServlet,\
   /atg/endeca/assembler/cartridge/manager/DefaultWorkbenchContentSource
   /atg/endeca/assembler/cartridge/manager/WorkbenchContentSource_es
   /atg/endeca/assembler/cartridge/manager/WorkbenchContentSource_de

To understand how the globally-scoped language-specific WorkbenchContentSource components that exist on application start up are re-resolved on a per-request basis, we return to the WorkbenchContentSource configuration, which is:

$scope=request
loggingInfo=false
useRequestNameResolver=true
componentPath=\
             /atg/endeca/assembler/cartridge/manager/\
              PerLanguageWorkbenchContentSourceResolver

Specifying $scope=request in this configuration causes the globally-scoped WorkbenchContentSource component that is resolved by the PerLanguageWorkbenchContentSourceResolver component to be inserted into the request scope as an alias. This effectively allows the application to resolve the WorkbenchContentSource_[language] component on a per-request basis.


Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved.

Legal Notices