Develop > Business logic layer
Name-value pair command framework
The name-value pair framework is the only command framework that existed in releases of WebSphere Commerce v6, prior to Feature Pack 3.0.1. This command framework uses name-value pairs as input to the business logic layer, and returns the responses as name-value pairs.
In WebSphere Commerce v6 Feature Pack 3.0.1, the WebSphere Commerce BOD command framework was introduced, which provides an alternate means to model and assemble the business logic layer. The name-value pair command framework was assigned a name to distinguish it from the new, noun-based, command framework.
- Command types
WebSphere Commerce commands are Java beans that contain the programming logic associated with handling a particular request. Commands perform a specific business process, such as adding a product to the shopping cart, processing an order, updating a customer's address book, or displaying a specific product page.
- WebSphere Commerce data beans
WebSphere Commerce and the WebSphere Commerce development environment include a set of Java beans, called WebSphere Commerce data beans, that access information from the tables in the database. Creating store pages using these beans allows you to display information that may change often, such as catalog groups and product lists, or product prices.
- Command error handling
WebSphere Commerce uses a well-defined command error handling framework that is simple to use in customized code. By design, the framework handles errors in a manner that supports multicultural stores. The following sections describe the types of exceptions that a command can throw, how the exceptions are handled, how message text is stored and used, how the exceptions are logged, and how to use the provided framework in the own commands.
- Command context
Commands can obtain information using the command context. Examples of information available include the user's ID, the user object, the language identifier, and the store identifier.
- Customize existing controller commands
A controller command encapsulates the business logic for a business process. Individual units of work within the business process may be performed by task commands. As such, there are several ways in which a controller command can be customized, some of which involve customizing task commands.
- Customize existing task commands
There are two standard ways to modify existing WebSphere Commerce task commands. You can add new business logic to a task command, or replace the business logic of an existing task command.
- Log and tracing
All WebSphere Commerce assets can use the LoggingHelper utility class provided in the com.ibm.commerce.foundation.common.util.logging package for tracing and logging. This utility helps to resolve the Java Logger ( java.util.logging.Logger) associated with the package of the calling class. Once the Logger is resolved, the library used to log messages is java.util.logging.Logger.