public class OpenStoreAction extends org.eclipse.jface.action.Action implements IModelListener
Clients can get an instance of this action as follows :
IAction action = TelesalesActionFactory.getAction(TelesalesActionFactory.OPEN_STORE_ACTION); if (action != null) { action.run(); }
Constructor and Description |
---|
OpenStoreAction()
Creates a new open store action.
|
Modifier and Type | Method and Description |
---|---|
GenericGet | findStore()
Initiates the com.ibm.commerce.telesales.findStore request.
|
TelesalesProperties | getFindStoreParameters()
Constructs the parameters for the com.ibm.commerce.telesales.findStore service request.
|
java.lang.String | getHelpId()
Returns help ID.
|
Store | getStore()
Returns the selected store.
|
void | modelChanged(ModelObjectChangedEvent event)
Listens to model changed events and sets the enablement state.
|
void | run()
Performs this action.
|
void | setCustomer(Customer customer)
Set the customer.
|
void | setStoreId(java.lang.String storeId)
Set the store ID.
|
void | setStoreIdentifier(java.lang.String storeIdentifier)
Set the store identifier.
|
public OpenStoreAction()
This constructor sets the visible properties of the action such as action text, ToolTip text, description and enabled/disabled image.
public void setCustomer(Customer customer)
public void setStoreId(java.lang.String storeId)
public void setStoreIdentifier(java.lang.String storeIdentifier)
public Store getStore()
public java.lang.String getHelpId()
public void modelChanged(ModelObjectChangedEvent event)
public TelesalesProperties getFindStoreParameters()
public GenericGet findStore()
public void run()
If a store id is not set, then calls the findStore() method to retrieve the stores from the server, sets store id to the id of the first store.
If there is a store id set, then check if the store details are available locally. if not, retrieve the store details from the server by invoking the findStore() method.