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.StringCURRENT_STATUS_KEYprotected static java.lang.StringSOURCE_CATALOG_VERSION_KEYprotected static java.lang.StringSOURCE_ITEMS_KEYprotected static java.lang.StringSYNC_JOBS_KEYprotected SynchronizationServicesyncServiceprotected TypeServicetypeService-
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 booleancontainsBaseProduct(java.util.Collection<TypedObject> updatedObjects)Method checks whether passed collection contains at least one object which is baseProduct (has variants)protected abstract voiddoCreateContext(ListViewAction.Context context)org.zkoss.zul.MenupopupgetContextPopup(ListViewAction.Context context)Gets the context popup of the action button.protected intgetCurrentStatus(ListViewAction.Context context)java.lang.StringgetImageURI(ListViewAction.Context context)Gets the image URI which represents the action button.org.zkoss.zul.MenupopupgetPopup(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.StringgetStatusCode(ListViewAction.Context context)Get a status code for this action.protected java.lang.StringgetSyncBusyImg()protected SynchronizationServicegetSynchronizationService()protected abstract java.lang.StringgetSyncInitImg()protected java.util.List<SyncItemJobModel>[]getSyncJobs(ListViewAction.Context context)protected abstract java.lang.StringgetSyncNotOKImg()protected abstract java.lang.StringgetSyncOKImg()java.lang.StringgetTooltip(ListViewAction.Context context)Gets the tooltip of the action button.protected java.lang.StringgetTypeRestriction()protected TypeServicegetTypeService()protected voidsendItemChangeEvents(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:ListViewActionGets 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:
doCreateContextin classAbstractListViewAction
-
getContextPopup
public org.zkoss.zul.Menupopup getContextPopup(ListViewAction.Context context)
Description copied from interface:ListViewActionGets the context popup of the action button.- Returns:
- the popup which should appear when the user right-clicks the action button or
nullif 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:ListViewActionGets 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:ListViewActionGets the popup of the action button.- Returns:
- the popup which should appear when the user clicks the action button or
nullif no popup is available
-
getStatusCode
public java.lang.String getStatusCode(ListViewAction.Context context)
Description copied from interface:ListViewActionGet a status code for this action. This is used e.g. by the id generator.- Specified by:
getStatusCodein interfaceListViewAction- Overrides:
getStatusCodein classAbstractListViewAction- Parameters:
context- the Context- Returns:
- a custom string defined by the instance of listviewaction
-
-