public class CustomerEditor extends TelesalesMultiPageEditor implements org.eclipse.ui.ISelectionListener
This class can be extended.
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field
|
static java.lang.String | CREATE_CUSTOMER_EDITOR_PAGES_ID
Create Customer editor pages ID.
|
static int | CREATE_MODE
Mode constant (value 0) which identifies create mode, or a new customer.
|
static java.lang.String | EDIT_CUSTOMER_EDITOR_PAGES_ID
Customer Editor pages ID.
|
static int | EDIT_MODE
Mode constant (value 1) which identifies edit mode, or an existing customer.
|
static java.lang.String | GET_DETAILS
The find criteria details key (value "GetDetails").
|
static java.lang.String | PROP_REFRESH_ADDRESS_COMPOSITE
This property is used to set the state if the refresh of the address composite is required(value "refreshAddressComposite")
|
static java.lang.String | STATUS_CODE_CUSTOMER_EXISTS
This is the Commerce code returned in the IStatus to indicate the Customer User Name already exists.
|
Constructor and Description |
---|
CustomerEditor() |
Modifier and Type | Method and Description |
---|---|
protected boolean | activatePageOnStartup(java.lang.String pageId)
The method decides if the editor page needs to be activated.
|
void | addAddress(Address address)
This method issues an Add action.
|
protected void | clearCustomerEditor()
This implementation removes the customer from stores view for all customer objects that is not yet saved to the server.
|
TelesalesRequestStatus | create(Customer customer)
This method issues a Create action.
|
protected void | createPages()
This method creates and activates all the pages to pre populate the fields of pages.
|
void | deleteAddress(Address address)
This method issues a Delete action.
|
void | dispose()
This implementation ensures that the context is deactivated before calling the parent's dispose method.
|
boolean | doSave()
This method performs the editor save.
|
void | doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
This method performs the editor save.
|
java.lang.Object | getAdapter(java.lang.Class key)
This method returns an object which is an instance of the given class associated with this object.
|
protected TelesalesProperties | getAddAddressParameters(Address address)
Deprecated.
Do not use this method for any customization, rather use action class.
|
protected TelesalesProperties | getCreateCustomerParameters()
Deprecated.
Do not use this method for any customization, rather use action class.
|
protected TelesalesProperties | getDeleteAddressParameters(Address address)
Deprecated.
Do not use this method for any customization, rather use action class.
|
java.lang.String | getEditorId()
This method returns the identifier of this editor.
|
java.lang.String | getEditorPagesId()
This method returns the editor pages ID for this editor.
|
protected com.ibm.commerce.telesales.ui.impl.views.promotions.MarketingPromotionsPage | getMarketingPromotionsPage()
This method creates the marketing promotions page used with this editor.
|
int | getMode()
This method returns the edit mode.
|
protected TelesalesProperties | getSalesContainerParameters(SalesContainer salesContainer)
This method constructs the parameters for the com.ibm.commerce.telesales.findOrder or code>com.ibm.commerce.telesales.findQuote action.
|
java.lang.String | getTitle()
This method returns the title of the editor.
|
org.eclipse.swt.graphics.Image | getTitleImage()
This method returns the title image for the editor.
|
java.lang.String | getTitleToolTip()
This method returns the title tool tip for the editor.
|
protected TelesalesProperties | getUpdateAddressParameters(Address address)
Deprecated.
Do not use this method for any customization, rather use action class.
|
protected TelesalesProperties | getUpdateCustomerParameters()
Deprecated.
Do not use this method for any customization, rather use action class.
|
WidgetManagerInputProperties | getWidgetManagerInputProperties()
This method gets the widget manager input properties.
|
boolean | hasRequiredInput()
This method returns whether the required input for all pages has been entered.
|
void | init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput editorInput)
This method initializes the state of the editor.
|
void | initializeWidgetManagerInputProperties()
This method initializes the widget manager input properties.
|
boolean | isB2B()
This method returns true if the customer is a B2B customer, false otherwise.
|
protected CustomerIdentityPage | lookupCustomerIdentityPage()
This method returns the customer identity Page if found, null otherwise.
|
void | modelChanged(ModelObjectChangedEvent event)
This method handles changes to the customer model object.
|
void | selectionChanged(org.eclipse.ui.IWorkbenchPart part, org.eclipse.jface.viewers.ISelection selection)
This method responds to selections within viewers.
|
protected void | setMarketingPromotionPageInput(MarketingPromotion[] promotions)
This method sets the input of the editor's association page.
|
void | setMode(int mode)
This method sets the edit mode.
|
TelesalesRequestStatus | update(Customer customer)
This method issues an Update action.
|
void | updateAddress(Address address)
This method issues an Update action.
|
void | updateOKButtonEnablement()
This method updates the OK button enablement.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String EDIT_CUSTOMER_EDITOR_PAGES_ID
public static final java.lang.String CREATE_CUSTOMER_EDITOR_PAGES_ID
public static final java.lang.String STATUS_CODE_CUSTOMER_EXISTS
public static final java.lang.String PROP_REFRESH_ADDRESS_COMPOSITE
public static final java.lang.String GET_DETAILS
public static final int CREATE_MODE
public static final int EDIT_MODE
public void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput editorInput) throws org.eclipse.ui.PartInitException
public void dispose()
protected void clearCustomerEditor()
public void addAddress(Address address)
The TelesalesCustomerPage implementation of this framework method sends a new address request to WebSphere Commerce issuing the action ID of com.ibm.commerce.telesales.addAddress to the TelesalesJobScheduler.
Subclasses may override this method.
protected com.ibm.commerce.telesales.ui.impl.views.promotions.MarketingPromotionsPage getMarketingPromotionsPage()
protected void setMarketingPromotionPageInput(MarketingPromotion[] promotions)
public TelesalesRequestStatus create(Customer customer)
The TelesalesCustomerPage implementation of this framework method sends a new customer request to WebSphere Commerce issuing the action Id of com.ibm.commerce.telesales.createCustomer to the TelesalesJobScheduler.
Subclasses may override this method.
protected CustomerIdentityPage lookupCustomerIdentityPage()
public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
Note: If an error occurs, the editor stays marked dirty.
public boolean doSave()
Note: If an error occurs, the editor stays marked dirty.
public void deleteAddress(Address address)
The TelesalesCustomerPage implementation of this framework method sends a delete address request to WebSphere Commerce issuing the action Id of com.ibm.commerce.telesales.deleteAddress to the TelesalesJobScheduler.
Subclasses may override this method.
public java.lang.Object getAdapter(java.lang.Class key)
protected TelesalesProperties getAddAddressParameters(Address address)
protected TelesalesProperties getDeleteAddressParameters(Address address)
protected TelesalesProperties getUpdateAddressParameters(Address address)
protected TelesalesProperties getCreateCustomerParameters()
protected TelesalesProperties getUpdateCustomerParameters()
protected TelesalesProperties getSalesContainerParameters(SalesContainer salesContainer)
public java.lang.String getTitle()
public int getMode()
public java.lang.String getTitleToolTip()
public org.eclipse.swt.graphics.Image getTitleImage()
public boolean hasRequiredInput()
public void selectionChanged(org.eclipse.ui.IWorkbenchPart part, org.eclipse.jface.viewers.ISelection selection)
public void updateOKButtonEnablement()
public void setMode(int mode)
public TelesalesRequestStatus update(Customer customer)
The TelesalesCustomerPage implementation of this framework method requests a new customer to WebSphere Commerce issuing the action Id of com.ibm.commerce.telesales.updateCustomer to the TelesalesJobScheduler.
Subclasses may override this method.
public void updateAddress(Address address)
The TelesalesCustomerPage implementation of this framework method requests a new address to WebSphere Commerce issuing the action Id of com.ibm.commerce.telesales.updateAddress to the TelesalesJobScheduler.
Subclasses may override this method
public java.lang.String getEditorPagesId()
public java.lang.String getEditorId()
public WidgetManagerInputProperties getWidgetManagerInputProperties()
public void initializeWidgetManagerInputProperties()
public boolean isB2B()
public void modelChanged(ModelObjectChangedEvent event)
protected void createPages()
protected boolean activatePageOnStartup(java.lang.String pageId)
Return true for all pages of the CustomerEditor. Subclasses can override to selectively activate the pages.
For example: To prevent activation of "Order's" page in Customer Editor, return false for "com.ibm.commerce.telesales.customerOrdersPage".