Class AbstractSynchronizationAction
- java.lang.Object
-
- de.hybris.platform.cockpit.components.listview.AbstractListViewAction
-
- de.hybris.platform.cockpit.components.listview.impl.AbstractSynchronizationAction
-
- All Implemented Interfaces:
AdvancedListViewAction
,ListViewAction
- Direct Known Subclasses:
ProductSynchronizationStatus
,PullSynchronizationAction
public abstract class AbstractSynchronizationAction extends AbstractListViewAction
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.hybris.platform.cockpit.components.listview.ListViewAction
ListViewAction.Context
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
CURRENT_STATUS_KEY
protected static java.lang.String
SOURCE_CATALOG_VERSION_KEY
protected static java.lang.String
SOURCE_ITEMS_KEY
protected static java.lang.String
SYNC_JOBS_KEY
protected SynchronizationService
syncService
protected TypeService
typeService
-
Fields inherited from class de.hybris.platform.cockpit.components.listview.AbstractListViewAction
alwaysEnabled, IN_EDITOR_AREA_SECTION_PANEL
-
Fields inherited from interface de.hybris.platform.cockpit.components.listview.ListViewAction
AFFECTED_ITEMS_KEY
-
-
Constructor Summary
Constructors Constructor Description AbstractSynchronizationAction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected boolean
containsBaseProduct(java.util.Collection<TypedObject> updatedObjects)
Method checks whether passed collection contains at least one object which is baseProduct (has variants)protected abstract void
doCreateContext(ListViewAction.Context context)
org.zkoss.zul.Menupopup
getContextPopup(ListViewAction.Context context)
Gets the context popup of the action button.protected int
getCurrentStatus(ListViewAction.Context context)
java.lang.String
getImageURI(ListViewAction.Context context)
Gets the image URI which represents the action button.org.zkoss.zul.Menupopup
getPopup(ListViewAction.Context context)
Gets the popup of the action button.protected java.util.Set<TypedObject>
getPossiblyAffectedObjects(java.util.Collection<TypedObject> sourceObjects)
Gets all objects that could be affected by synchronization process.java.lang.String
getStatusCode(ListViewAction.Context context)
Get a status code for this action.protected java.lang.String
getSyncBusyImg()
protected SynchronizationService
getSynchronizationService()
protected abstract java.lang.String
getSyncInitImg()
protected java.util.List<SyncItemJobModel>[]
getSyncJobs(ListViewAction.Context context)
protected abstract java.lang.String
getSyncNotOKImg()
protected abstract java.lang.String
getSyncOKImg()
java.lang.String
getTooltip(ListViewAction.Context context)
Gets the tooltip of the action button.protected java.lang.String
getTypeRestriction()
protected TypeService
getTypeService()
protected void
sendItemChangeEvents(java.util.Collection<TypedObject> updatedObjects)
-
Methods inherited from class de.hybris.platform.cockpit.components.listview.AbstractListViewAction
createContext, createContext, getItem, getMultiSelectEventListener, getMultiSelectImageURI, getMultiSelectPopup, getSelectedItems, isAlwaysEnabled, sendEvent, sendUpdateItemsEvent, setAlwaysEnabled
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.cockpit.components.listview.ListViewAction
getEventListener
-
-
-
-
Field Detail
-
typeService
protected TypeService typeService
-
syncService
protected SynchronizationService syncService
-
SYNC_JOBS_KEY
protected static final java.lang.String SYNC_JOBS_KEY
- See Also:
- Constant Field Values
-
SOURCE_CATALOG_VERSION_KEY
protected static final java.lang.String SOURCE_CATALOG_VERSION_KEY
- See Also:
- Constant Field Values
-
CURRENT_STATUS_KEY
protected static final java.lang.String CURRENT_STATUS_KEY
- See Also:
- Constant Field Values
-
SOURCE_ITEMS_KEY
protected static final java.lang.String SOURCE_ITEMS_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSyncOKImg
protected abstract java.lang.String getSyncOKImg()
-
getSyncNotOKImg
protected abstract java.lang.String getSyncNotOKImg()
-
getSyncInitImg
protected abstract java.lang.String getSyncInitImg()
-
getSyncBusyImg
protected java.lang.String getSyncBusyImg()
-
getTypeRestriction
protected java.lang.String getTypeRestriction()
-
getSyncJobs
protected java.util.List<SyncItemJobModel>[] getSyncJobs(ListViewAction.Context context)
-
getCurrentStatus
protected int getCurrentStatus(ListViewAction.Context context)
-
getImageURI
public java.lang.String getImageURI(ListViewAction.Context context)
Description copied from interface:ListViewAction
Gets the image URI which represents the action button.- Returns:
- URI of the image to represent the action button
-
doCreateContext
protected abstract void doCreateContext(ListViewAction.Context context)
- Specified by:
doCreateContext
in classAbstractListViewAction
-
getContextPopup
public org.zkoss.zul.Menupopup getContextPopup(ListViewAction.Context context)
Description copied from interface:ListViewAction
Gets the context popup of the action button.- Returns:
- the popup which should appear when the user right-clicks the action button or
null
if no popup is available
-
getSynchronizationService
protected SynchronizationService getSynchronizationService()
-
getTypeService
protected TypeService getTypeService()
-
getPossiblyAffectedObjects
protected java.util.Set<TypedObject> getPossiblyAffectedObjects(java.util.Collection<TypedObject> sourceObjects)
Gets all objects that could be affected by synchronization process.
-
sendItemChangeEvents
protected void sendItemChangeEvents(java.util.Collection<TypedObject> updatedObjects)
-
containsBaseProduct
protected boolean containsBaseProduct(java.util.Collection<TypedObject> updatedObjects)
Method checks whether passed collection contains at least one object which is baseProduct (has variants)- Parameters:
updatedObjects
- collection of updated objects- Returns:
- true if at least one object is baseProduct
-
getTooltip
public java.lang.String getTooltip(ListViewAction.Context context)
Description copied from interface:ListViewAction
Gets the tooltip of the action button.- Returns:
- the tooltip string which should appear when the user hovers over the action button
-
getPopup
public org.zkoss.zul.Menupopup getPopup(ListViewAction.Context context)
Description copied from interface:ListViewAction
Gets the popup of the action button.- Returns:
- the popup which should appear when the user clicks the action button or
null
if no popup is available
-
getStatusCode
public java.lang.String getStatusCode(ListViewAction.Context context)
Description copied from interface:ListViewAction
Get a status code for this action. This is used e.g. by the id generator.- Specified by:
getStatusCode
in interfaceListViewAction
- Overrides:
getStatusCode
in classAbstractListViewAction
- Parameters:
context
- the Context- Returns:
- a custom string defined by the instance of listviewaction
-
-