Class ExcelExportAction

  • All Implemented Interfaces:
    com.hybris.cockpitng.actions.CockpitAction<java.lang.String,​com.hybris.cockpitng.search.data.pageable.Pageable<? extends ItemModel>>, com.hybris.cockpitng.engine.ComponentWidgetAdapterAware

    public class ExcelExportAction
    extends com.hybris.cockpitng.engine.impl.AbstractComponentWidgetAdapterAware
    implements com.hybris.cockpitng.actions.CockpitAction<java.lang.String,​com.hybris.cockpitng.search.data.pageable.Pageable<? extends ItemModel>>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canPerform​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)  
      com.hybris.cockpitng.util.type.BackofficeTypeUtils getBackofficeTypeUtils()  
      java.lang.String getConfirmationMessage​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)  
      protected int getConfirmationThresholdValue​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)  
      java.util.Optional<com.hybris.cockpitng.search.data.pageable.Pageable<ItemModel>> getData​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)
      Returns data related with collection browser's pageable.
      protected int getExportMaxRows​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)  
      protected com.hybris.cockpitng.search.data.pageable.Pageable<ItemModel> getPageable​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)  
      protected java.lang.String getPageableModelProperty​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)  
      com.hybris.cockpitng.dataaccess.facades.permissions.PermissionFacade getPermissionFacade()  
      protected java.util.Optional<com.hybris.cockpitng.search.data.pageable.Pageable<ItemModel>> getSelectedItems​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)  
      protected java.util.Collection<java.lang.Object> getSelectedItemsFromModel​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)  
      protected java.lang.String getSelectedItemsModelProperty​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)  
      protected java.util.Optional<java.lang.String> getSelectedItemsType​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)  
      int getSize​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)  
      TypeService getTypeService()  
      protected com.hybris.cockpitng.core.model.WidgetModel getWidgetModel​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)  
      protected boolean isMaxRowsExceeded​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx, int rows)  
      boolean needsConfirmation​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)  
      com.hybris.cockpitng.actions.ActionResult<com.hybris.cockpitng.search.data.pageable.Pageable<? extends ItemModel>> perform​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)  
      protected void showMaxRowsExceeded​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx, int rows)  
      • Methods inherited from class com.hybris.cockpitng.engine.impl.AbstractComponentWidgetAdapterAware

        addSocketInputEventListener, getComponentID, handleSocketInputEvent, initialize, initializeDefaultEventListeners, registerStubInstance, sendOutput, setComponentID, unregisterStubInstance
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • SOCKET_OUT_ITEMS_TO_EXPORT

        protected static final java.lang.String SOCKET_OUT_ITEMS_TO_EXPORT
        See Also:
        Constant Field Values
      • LABEL_EXCEL_EXPORT_ACTION_CONFIRMATION

        protected static final java.lang.String LABEL_EXCEL_EXPORT_ACTION_CONFIRMATION
        See Also:
        Constant Field Values
      • PARAM_CONFIRMATION_THRESHOLD

        protected static final java.lang.String PARAM_CONFIRMATION_THRESHOLD
        See Also:
        Constant Field Values
      • MODEL_SELECTED_OBJECTS

        protected static final java.lang.String MODEL_SELECTED_OBJECTS
        See Also:
        Constant Field Values
    • Constructor Detail

      • ExcelExportAction

        public ExcelExportAction()
    • Method Detail

      • perform

        public com.hybris.cockpitng.actions.ActionResult<com.hybris.cockpitng.search.data.pageable.Pageable<? extends ItemModel>> perform​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)
        Specified by:
        perform in interface com.hybris.cockpitng.actions.CockpitAction<java.lang.String,​com.hybris.cockpitng.search.data.pageable.Pageable<? extends ItemModel>>
      • showMaxRowsExceeded

        protected void showMaxRowsExceeded​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx,
                                           int rows)
      • isMaxRowsExceeded

        protected boolean isMaxRowsExceeded​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx,
                                            int rows)
      • needsConfirmation

        public boolean needsConfirmation​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)
        Specified by:
        needsConfirmation in interface com.hybris.cockpitng.actions.CockpitAction<java.lang.String,​com.hybris.cockpitng.search.data.pageable.Pageable<? extends ItemModel>>
      • getExportMaxRows

        protected int getExportMaxRows​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)
      • getConfirmationMessage

        public java.lang.String getConfirmationMessage​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)
        Specified by:
        getConfirmationMessage in interface com.hybris.cockpitng.actions.CockpitAction<java.lang.String,​com.hybris.cockpitng.search.data.pageable.Pageable<? extends ItemModel>>
      • canPerform

        public boolean canPerform​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)
        Specified by:
        canPerform in interface com.hybris.cockpitng.actions.CockpitAction<java.lang.String,​com.hybris.cockpitng.search.data.pageable.Pageable<? extends ItemModel>>
      • getData

        public java.util.Optional<com.hybris.cockpitng.search.data.pageable.Pageable<ItemModel>> getData​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)
        Returns data related with collection browser's pageable. If no items are selected then the all items for specific typeCode are returned. Otherwise, only selected items are returned.
        Parameters:
        ctx - context of the ExcelExportAction
        Returns:
        optional of pageable
      • getSelectedItems

        protected java.util.Optional<com.hybris.cockpitng.search.data.pageable.Pageable<ItemModel>> getSelectedItems​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)
      • getSelectedItemsFromModel

        protected java.util.Collection<java.lang.Object> getSelectedItemsFromModel​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)
      • getSelectedItemsType

        protected java.util.Optional<java.lang.String> getSelectedItemsType​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)
      • getPageable

        protected com.hybris.cockpitng.search.data.pageable.Pageable<ItemModel> getPageable​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)
      • getWidgetModel

        protected com.hybris.cockpitng.core.model.WidgetModel getWidgetModel​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)
      • getSize

        public int getSize​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)
      • getPageableModelProperty

        protected java.lang.String getPageableModelProperty​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)
      • getSelectedItemsModelProperty

        protected java.lang.String getSelectedItemsModelProperty​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)
      • getConfirmationThresholdValue

        protected int getConfirmationThresholdValue​(com.hybris.cockpitng.actions.ActionContext<java.lang.String> ctx)
      • getPermissionFacade

        public com.hybris.cockpitng.dataaccess.facades.permissions.PermissionFacade getPermissionFacade()
      • getBackofficeTypeUtils

        public com.hybris.cockpitng.util.type.BackofficeTypeUtils getBackofficeTypeUtils()