Command, view, and URL registries
A Supported Units of Measure package. Supported units of measure are specific to a particular Store, and thus the Supported Units of Measure package is shown as dependent on the Store.
The command, view, and URL registries are part of the WebSphere Commerce command framework. The WebSphere Commerce command framework determines how a command executes and then returns a response that is based on the view that is returned by the executed command. The command execution and response is store dependent. The same command can be implemented differently for each store, and return different responses for each store.
The following diagram illustrates the command, view, and URL registry structure in the WebSphere Commerce Server.
- URL registry
- The URL registry maps a command name to the actual interface of the command to be executed. Each
URL registry entry is store sensitive, that is, each store can define a different interface for the
same URL value. If the store version of the URL registry cannot be found, then the URL registry that
is defined for the site (store 0) is used. By default, all URL registries are defined for the site.
URLs defined and registered in one store can be used by other stores. In order for one store to use URLs defined in another store, a store relationship of type com.ibm.commerce.URL must be created between the stores.
- Command registry
- Every command, whether it is a controller or task command, can be defined in the command
registry. If a command is defined in the command registry, that definition is used as the command
implementation when the command is executed. If the command is not defined in the command registry,
a default implementation is used instead. Every command interface is assigned a default
implementation that is used if the command is not defined the command registry.
If a command is defined in the command registry as a site level command (store 0), the site level implementation is used. This implementation is not used when the command is executed for a store with a different implementation of the command defined.
The command registry allows different stores to use the same commands. The stores can extend part or all of the implementations without changing the original flow of the command.
Commands that are defined and registered in one store can be used by other stores. In order for one store to use commands that are defined in another store a store relationship of type com.ibm.commerce.command must be created between the stores.
- View registry
- After a command is executed, in most cases, the requester of the command requires a response to
be returned. When the command framework determines the response, the framework considers the
following factors:
- The view found in the response properties after the command is executed.
- The store on whose behalf the command was executed.
- The device format of the request when the request was made.
Views that are defined and registered in one store can be used by other stores. In order for one store to use views that are defined in another store a store relationship of type com.ibm.commerce.view must be created between the stores.