Class GenericMediaItemUploadPanelRenderer

  • All Implemented Interfaces:
    com.hybris.cockpitng.widgets.common.NotifyingWidgetComponentRenderer<org.zkoss.zk.ui.Component,​com.hybris.cockpitng.core.config.impl.jaxb.editorarea.AbstractPanel,​java.lang.Object>, com.hybris.cockpitng.widgets.common.WidgetComponentRenderer<org.zkoss.zk.ui.Component,​com.hybris.cockpitng.core.config.impl.jaxb.editorarea.AbstractPanel,​java.lang.Object>

    public class GenericMediaItemUploadPanelRenderer
    extends com.hybris.cockpitng.widgets.editorarea.renderer.impl.AbstractEditorAreaPanelRenderer<java.lang.Object>
    • Field Detail

      • LABEL_KEY_TIME_CREATED

        protected static final java.lang.String LABEL_KEY_TIME_CREATED
        See Also:
        Constant Field Values
      • LABEL_KEY_TIME_MODIFIED

        protected static final java.lang.String LABEL_KEY_TIME_MODIFIED
        See Also:
        Constant Field Values
      • DEFAULT_MAX_FILE_SIZE_KB

        protected static final long DEFAULT_MAX_FILE_SIZE_KB
        See Also:
        Constant Field Values
      • MEDIA_TYPE_CODE

        protected static final java.lang.String MEDIA_TYPE_CODE
        See Also:
        Constant Field Values
      • FILE_UPLOAD_MAX_SIZE

        protected static final java.lang.String FILE_UPLOAD_MAX_SIZE
        See Also:
        Constant Field Values
      • MEDIA_INFO_HEADER

        protected static final java.lang.String MEDIA_INFO_HEADER
        See Also:
        Constant Field Values
      • MEDIA_INFO_VALUE

        protected static final java.lang.String MEDIA_INFO_VALUE
        See Also:
        Constant Field Values
      • MEDIA_PREVIEW_CNT

        protected static final java.lang.String MEDIA_PREVIEW_CNT
        See Also:
        Constant Field Values
      • FILEUPLOAD_SCLASS

        protected static final java.lang.String FILEUPLOAD_SCLASS
        See Also:
        Constant Field Values
      • CLEAR_CONTENT_BTN_SCLASS

        protected static final java.lang.String CLEAR_CONTENT_BTN_SCLASS
        See Also:
        Constant Field Values
      • Y_WARNING_BTN_SCLASS

        protected static final java.lang.String Y_WARNING_BTN_SCLASS
        See Also:
        Constant Field Values
      • DOWNLOAD_BTN_SCLASS

        protected static final java.lang.String DOWNLOAD_BTN_SCLASS
        See Also:
        Constant Field Values
      • ON_UPLOAD_LATER

        protected static final java.lang.String ON_UPLOAD_LATER
        See Also:
        Constant Field Values
      • SMALL_IMAGE_PREVIEW_CNT

        protected static final java.lang.String SMALL_IMAGE_PREVIEW_CNT
        See Also:
        Constant Field Values
      • DATA_MODEL_PROPERTY

        protected static final java.lang.String DATA_MODEL_PROPERTY
        See Also:
        Constant Field Values
      • DATA_MODEL_ATTRIBUTE

        protected static final java.lang.String DATA_MODEL_ATTRIBUTE
        See Also:
        Constant Field Values
      • SHOW_CONTENT_BUTTONS

        protected static final java.lang.String SHOW_CONTENT_BUTTONS
        See Also:
        Constant Field Values
      • VIEW_MODE_ACTIVE

        protected static final java.lang.String VIEW_MODE_ACTIVE
        See Also:
        Constant Field Values
      • VIEW_MODE_INACTIVE

        protected static final java.lang.String VIEW_MODE_INACTIVE
        See Also:
        Constant Field Values
      • MEDIA_INFO_NOT_AVAILABLE

        protected static final java.lang.String MEDIA_INFO_NOT_AVAILABLE
        See Also:
        Constant Field Values
      • MODEL_MEDIA_SAVED

        protected java.lang.String MODEL_MEDIA_SAVED
      • MODEL_MEDIA_CANCELED

        protected java.lang.String MODEL_MEDIA_CANCELED
      • MODEL_RENDER_PARAMETER_MAP

        protected java.lang.String MODEL_RENDER_PARAMETER_MAP
      • MODEL_ZK_MEDIA_MODEL_KEY

        protected java.lang.String MODEL_ZK_MEDIA_MODEL_KEY
      • MODEL_ZK_MEDIA_CLEARED

        protected java.lang.String MODEL_ZK_MEDIA_CLEARED
      • MODEL_DISPLAY_FROM_MODEL

        protected java.lang.String MODEL_DISPLAY_FROM_MODEL
      • currentlyDisplayedMode

        protected java.lang.String currentlyDisplayedMode
      • currentlyDisplayedMediaInfo

        protected java.lang.String currentlyDisplayedMediaInfo
      • initiallyDisplayedMediaModelInfo

        protected java.lang.String initiallyDisplayedMediaModelInfo
    • Constructor Detail

      • GenericMediaItemUploadPanelRenderer

        public GenericMediaItemUploadPanelRenderer()
    • Method Detail

      • render

        public void render​(org.zkoss.zk.ui.Component parent,
                           com.hybris.cockpitng.core.config.impl.jaxb.editorarea.AbstractPanel panel,
                           java.lang.Object data,
                           com.hybris.cockpitng.dataaccess.facades.type.DataType type,
                           com.hybris.cockpitng.engine.WidgetInstanceManager widgetInstanceManager)
      • adjustView

        protected void adjustView​(org.zkoss.zk.ui.Component rendererPanel,
                                  com.hybris.cockpitng.dataaccess.facades.type.DataType type)
      • initializeInactiveView

        protected void initializeInactiveView​(org.zkoss.zk.ui.Component rendererPanel,
                                              com.hybris.cockpitng.dataaccess.facades.type.DataType type)
      • initializeActiveView

        protected void initializeActiveView​(org.zkoss.zk.ui.Component rendererPanel,
                                            com.hybris.cockpitng.dataaccess.facades.type.DataType type)
      • getAttributeLabel

        protected org.zkoss.zul.Label getAttributeLabel​(com.hybris.cockpitng.dataaccess.facades.type.DataAttribute attribute)
      • refreshActiveView

        protected void refreshActiveView​(com.hybris.cockpitng.dataaccess.facades.type.DataType type)
      • cleanupModel

        protected void cleanupModel()
      • initPreRenderModelConstants

        protected void initPreRenderModelConstants​(java.lang.String suffix)
      • removeAfterSaveAndCancelListeners

        protected void removeAfterSaveAndCancelListeners()
      • getEntityId

        protected java.lang.String getEntityId​(java.lang.Object data,
                                               com.hybris.cockpitng.core.config.impl.jaxb.editorarea.AbstractPanel panel)
      • areButtonsVisible

        protected boolean areButtonsVisible()
      • getMediaModel

        protected MediaModel getMediaModel()
      • refreshModelAndViewAfterSaveListeners

        protected void refreshModelAndViewAfterSaveListeners​(com.hybris.cockpitng.dataaccess.facades.type.DataType type)
      • refreshWidgetModelAfterSaveListeners

        protected void refreshWidgetModelAfterSaveListeners()
      • isInSecureFolder

        protected boolean isInSecureFolder​(MediaModel mediaModel)
      • initMediaInfoPanel

        protected org.zkoss.zul.Vlayout initMediaInfoPanel()
      • initMediaInfoLabels

        protected void initMediaInfoLabels()
      • createMediaInfoHeaderLabel

        protected org.zkoss.zul.Label createMediaInfoHeaderLabel​(java.lang.String initialValue)
      • createMediaInfoValueLabel

        protected org.zkoss.zul.Label createMediaInfoValueLabel​(java.lang.String infoLabel,
                                                                java.lang.String initialValue)
      • setLimitOnMaxFileSize

        protected void setLimitOnMaxFileSize​(org.zkoss.zul.Fileupload fileupload)
      • isDisplayable

        protected boolean isDisplayable​(MediaModel media)
      • getZkMedia

        protected org.zkoss.util.media.Media getZkMedia()
      • getModelService

        protected ModelService getModelService()
      • setModelService

        public void setModelService​(ModelService modelService)
      • getMediaService

        protected MediaService getMediaService()
      • setMediaService

        public void setMediaService​(MediaService mediaService)
      • setMediaStorageConfigService

        public void setMediaStorageConfigService​(MediaStorageConfigService mediaStorageConfigService)
      • getCockpitProperties

        public com.hybris.cockpitng.core.util.CockpitProperties getCockpitProperties()
      • setCockpitProperties

        public void setCockpitProperties​(com.hybris.cockpitng.core.util.CockpitProperties cockpitProperties)
      • getPermissionFacadeStrategy

        protected com.hybris.cockpitng.dataaccess.facades.permissions.PermissionFacadeStrategy getPermissionFacadeStrategy()
      • setPermissionFacadeStrategy

        public void setPermissionFacadeStrategy​(com.hybris.cockpitng.dataaccess.facades.permissions.PermissionFacadeStrategy permissionFacadeStrategy)
      • getObjectPreviewService

        protected com.hybris.cockpitng.services.media.ObjectPreviewService getObjectPreviewService()
      • setObjectPreviewService

        public void setObjectPreviewService​(com.hybris.cockpitng.services.media.ObjectPreviewService objectPreviewService)
      • getObjectFacade

        protected com.hybris.cockpitng.dataaccess.facades.object.ObjectFacade getObjectFacade()
      • setObjectFacade

        public void setObjectFacade​(com.hybris.cockpitng.dataaccess.facades.object.ObjectFacade objectFacade)
      • getWidgetInstanceManager

        protected com.hybris.cockpitng.engine.WidgetInstanceManager getWidgetInstanceManager()