public abstract class AbstractGetBusinessObjectDocumentCmdImpl extends MeasuredCacheableCommandImpl implements BusinessObjectDocumentCmd
Constructor and Description |
---|
AbstractGetBusinessObjectDocumentCmdImpl()
Creates an instance of the get business object document command.
|
Modifier and Type | Method and Description |
---|---|
protected BusinessObjectDocumentType | buildShowBusinessObjectDocument(ShowType show, java.util.List nouns)
This method constructs the responding Show business object document for the given get request.
|
protected boolean | canPerformExpression(SearchExpression selectionExpression)
This method determines whether the current identity can perform the expression.
|
protected void | filterNouns(java.util.List nouns)
This method performs an authorization check to ensure each noun returned by the get request can be read by the current user.
|
protected CommerceFoundationFactory | getCommerceFoundationFactory()
This method returns an instance of the commerce foundation factory to create Java objects defined in the Commerce foundation.
|
java.lang.String | getFetchCommandInterface()
This method returns the fetch command interface that has been specified on the command configuration.
|
protected GetType | getGetVerb()
Gets the GetType object created in the validateExpression() method.
|
java.lang.String | getInsertMoreDataCommandInterface()
This method returns the insert more data command interface to instantiate the command implementation.
|
protected java.util.List | getNouns()
Gets the list of nouns created in performExpression() method.
|
protected Oagis9Factory | getOagis9Factory()
This method returns an instance of the factory to create the OAGIS 9 Java objects.
|
protected BusinessObjectDocumentType | getRequestBusinessObjectDocument()
This method returns the request business object document that represents the request.
|
BusinessObjectDocumentType | getResultBusinessObjectDocument()
This method returns the response business object document that represents the result of executing the request.
|
SearchExpression | getSearchExpression()
Gets the SearchExpression object created in the validateExpression() method.
|
protected ShowType | getShow()
Gets the ShowType object created in performExpression() method.
|
java.util.Collection | getUniqueID()
This method returns a collection of unique IDs of the nouns involved with this change request.
|
void | handleException(java.lang.Exception exception)
This method sets the exception as the result of executing the request.
|
boolean | isReadyToCallExecute()
This method always indicates the command is ready to execute.
|
void | performExecute()
This method will execute the get command by calling validateExpression and performExpression.
|
protected void | performExpression()
This method performs the Get request by delegating to the defined fetch command implementation to execute the search expression.
|
void | setFetchCommandInterface(java.lang.String fetchCommandInterface)
This method sets the fetch command interface that is used to resolve the fetch command implementation.
|
protected void | setGetVerb(GetType verb)
Sets the GetType object created in the validateExpression() method.
|
void | setInsertMoreDataCommandInterface(java.lang.String insertMoreDataCommand)
This method sets the insert more data command interface which is used to instantiate the insert more data command.
|
protected void | setNouns(java.util.List nouns)
Sets the list of nouns created in performExpression() method.
|
void | setOutputProperties(com.ibm.websphere.command.TargetableCommand targetableCommand)
This method is used for setting the command response variables from the specified target command.
|
void | setRequestBusinessObjectDocument(BusinessObjectDocumentType businessObjectDocument)
This method sets the request business object document of the business logic to execute.
|
protected void | setResultBusinessObjectDocument(BusinessObjectDocumentType businessObjectDocument)
This method sets the response business object document that represents the result of executing the request.
|
protected void | setSearchExpression(SearchExpression searchExpression)
Sets the SearchExpression object created in the validateExpression() method.
|
protected void | setShow(ShowType show)
Sets the ShowType object created in performExpression() method.
|
void | setUniqueIDXPath(java.lang.String uniqueIDXPath)
This method sets the XPath expression from the noun to use to retrieve the unique ID of the noun.
|
protected void | validateExpression()
This method parses the Get verb from the Get business object document and creates the appropriate SearchExpression object.
|
public AbstractGetBusinessObjectDocumentCmdImpl()
public BusinessObjectDocumentType getResultBusinessObjectDocument()
protected void setResultBusinessObjectDocument(BusinessObjectDocumentType businessObjectDocument)
public void setRequestBusinessObjectDocument(BusinessObjectDocumentType businessObjectDocument)
protected BusinessObjectDocumentType getRequestBusinessObjectDocument()
protected Oagis9Factory getOagis9Factory()
protected CommerceFoundationFactory getCommerceFoundationFactory()
public boolean isReadyToCallExecute()
public final void performExecute() throws java.lang.Exception
public void handleException(java.lang.Exception exception)
public java.lang.String getFetchCommandInterface()
public void setFetchCommandInterface(java.lang.String fetchCommandInterface)
public java.lang.String getInsertMoreDataCommandInterface()
public void setInsertMoreDataCommandInterface(java.lang.String insertMoreDataCommand)
protected void performExpression() throws java.lang.Exception
This method performs the Get request by delegating to the defined fetch command implementation to execute the search expression. Optionally if the insert more data command interface is defined and a insert more data command implementation is found for the specified access profile, the command is executed to add more data. The purpose of the fetch command is to return the Show response and the initial list of nouns based on the contained by the component. The insert more data command is used to perform additional business logic computation or querying external system to add additional data that cannot be resolved by the fetch command and is specific to a particular access profile.
Before the insert more data command is invoked, the filterNouns() method will be invoke to remove any noun the current user cannot read. The purpose of the filter is to ensure only authorized nouns are returned by the service.
The insert more command can be registered using the .index notation in order to register more then one insert more command per access profile. For example, com.ibm.commerce.catalog.facade.server.commands.InsertMoreCatalogEntryCmd+AccessProfile.0 can be used to register one insert more command for a particular access profile and another can be registered using com.ibm.commerce.catalog.facade.server.commands.InsertMoreCatalogEntryCmd+AccessProfile.1. Because the data to include in the response could come from many different data sources and insert more implementations can be reused for different access profiles, this .index notation allows the reuse of commands. If not using the .index notation, then only one insert more command can be used for a particular access profile. To support using many insert more commands for a particular access profile, the .index notation is used to register the many insert more commands to execute and the order they should execute in. The index starts at 0 and for each command the index is incremented by one and will stop as soon no insert command is found for that index. In the case where the index is defined for 0, 1 and 3 the insert more command with index of 3 will not execute because nothing was found for index 2.
After the insert more data command is the buildShowBusinessObjectDocument() is invoked passing the Show verb and list of nouns that has been returned by the fetch command. The insert more data command is given this list of nouns to add more data and perform any additional modification on the list.
protected BusinessObjectDocumentType buildShowBusinessObjectDocument(ShowType show, java.util.List nouns)
protected void filterNouns(java.util.List nouns)
protected void validateExpression() throws java.lang.Exception
protected boolean canPerformExpression(SearchExpression selectionExpression)
public SearchExpression getSearchExpression()
protected void setSearchExpression(SearchExpression searchExpression)
protected GetType getGetVerb()
protected void setGetVerb(GetType verb)
protected java.util.List getNouns()
protected void setNouns(java.util.List nouns)
protected ShowType getShow()
protected void setShow(ShowType show)
public java.util.Collection getUniqueID()
This method returns a collection of unique IDs of the nouns involved with this change request. This list of unique IDs is to indicate which nouns have been involved with the request and requires to be invalidated. An example of defining the invalidation configuration is as follows.
<invalidation>catalog <component id="getUniqueID" type="method" multipleIDs="true"> <required>true</required> </component> </invalidation>
public void setUniqueIDXPath(java.lang.String uniqueIDXPath)
public void setOutputProperties(com.ibm.websphere.command.TargetableCommand targetableCommand)