Class GenericMediaItemUploadPanelRenderer
- java.lang.Object
-
- com.hybris.cockpitng.widgets.common.AbstractWidgetComponentRenderer<org.zkoss.zk.ui.Component,T,K>
-
- com.hybris.cockpitng.widgets.editorarea.renderer.impl.AbstractEditorAreaComponentRenderer<com.hybris.cockpitng.core.config.impl.jaxb.editorarea.AbstractPanel,K>
-
- com.hybris.cockpitng.widgets.editorarea.renderer.impl.AbstractEditorAreaPanelRenderer<java.lang.Object>
-
- de.hybris.platform.platformbackoffice.renderers.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 Summary
Fields Modifier and Type Field Description protected static java.lang.String
CLEAR_CONTENT_BTN_SCLASS
protected java.lang.String
currentlyDisplayedMediaInfo
protected java.lang.String
currentlyDisplayedMode
protected static java.lang.String
DATA_MODEL_ATTRIBUTE
protected static java.lang.String
DATA_MODEL_PROPERTY
protected static java.lang.String
DATE_FORMAT
protected static long
DEFAULT_MAX_FILE_SIZE_KB
protected static java.lang.String
DOWNLOAD_BTN_SCLASS
protected static java.lang.String
FILE_UPLOAD_MAX_SIZE
protected static java.lang.String
FILEUPLOAD_SCLASS
protected static java.lang.String
IMAGE
protected static java.lang.String
IMG_STYLE
protected java.lang.String
initiallyDisplayedMediaModelInfo
protected static java.lang.String
LABEL_KEY_PK
protected static java.lang.String
LABEL_KEY_TIME_CREATED
protected static java.lang.String
LABEL_KEY_TIME_MODIFIED
protected static java.lang.String
MAX_SIZE
protected static java.lang.String
MEDIA_INFO_CNT
protected static java.lang.String
MEDIA_INFO_HEADER
protected static java.lang.String
MEDIA_INFO_NOT_AVAILABLE
protected static java.lang.String
MEDIA_INFO_VALUE
protected static java.lang.String
MEDIA_PREVIEW
protected static java.lang.String
MEDIA_PREVIEW_CNT
protected static java.lang.String
MEDIA_TYPE_CODE
protected java.lang.String
MODEL_DISPLAY_FROM_MODEL
protected java.lang.String
MODEL_MEDIA_CANCELED
protected java.lang.String
MODEL_MEDIA_SAVED
protected java.lang.String
MODEL_RENDER_PARAMETER_MAP
protected java.lang.String
MODEL_ZK_MEDIA_CLEARED
protected java.lang.String
MODEL_ZK_MEDIA_MODEL_KEY
protected static java.lang.String
ON_UPLOAD_LATER
static java.lang.String
PROPERTY_SRC
protected static java.lang.String
SHOW_CONTENT_BUTTONS
protected static java.lang.String
SMALL_IMAGE_PREVIEW_CNT
protected static java.lang.String
VIEW_MODE_ACTIVE
protected static java.lang.String
VIEW_MODE_INACTIVE
protected static java.lang.String
Y_WARNING_BTN_SCLASS
-
Fields inherited from class com.hybris.cockpitng.widgets.editorarea.renderer.impl.AbstractEditorAreaComponentRenderer
ATTR_NOT_SAVED_OBJECT, attributeDescriptionIconRenderer, CURRENT_OBJECT, CURRENT_OBJECT_DOTLESS, MISSING_RENDERER_ERROR_MSG, SCLASS_CELL_READ_RESTRICTED, SCLASS_CUSTOM_CONTAINER, SCLASS_DESCRIPTION, SCLASS_DESCRIPTION_LABEL, SCLASS_EDITOR, SCLASS_EDITOR_CONTAINER, SCLASS_LABEL, SCLASS_READONLY_EDITOR
-
-
Constructor Summary
Constructors Constructor Description GenericMediaItemUploadPanelRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
adjustView(org.zkoss.zk.ui.Component rendererPanel, com.hybris.cockpitng.dataaccess.facades.type.DataType type)
protected boolean
areButtonsVisible()
protected void
cleanupModel()
protected org.zkoss.zul.Label
createMediaInfoHeaderLabel(java.lang.String initialValue)
protected org.zkoss.zul.Label
createMediaInfoValueLabel(java.lang.String infoLabel, java.lang.String initialValue)
protected org.zkoss.zul.Label
getAttributeLabel(com.hybris.cockpitng.dataaccess.facades.type.DataAttribute attribute)
com.hybris.cockpitng.core.util.CockpitProperties
getCockpitProperties()
protected java.lang.String
getEntityId(java.lang.Object data, com.hybris.cockpitng.core.config.impl.jaxb.editorarea.AbstractPanel panel)
protected MediaModel
getMediaModel()
protected MediaService
getMediaService()
protected MediaStorageConfigService
getMediaStorageConfigService()
protected ModelService
getModelService()
protected com.hybris.cockpitng.dataaccess.facades.object.ObjectFacade
getObjectFacade()
protected com.hybris.cockpitng.services.media.ObjectPreviewService
getObjectPreviewService()
protected com.hybris.cockpitng.dataaccess.facades.permissions.PermissionFacadeStrategy
getPermissionFacadeStrategy()
protected com.hybris.cockpitng.engine.WidgetInstanceManager
getWidgetInstanceManager()
protected org.zkoss.util.media.Media
getZkMedia()
protected void
initializeActiveView(org.zkoss.zk.ui.Component rendererPanel, com.hybris.cockpitng.dataaccess.facades.type.DataType type)
protected void
initializeInactiveView(org.zkoss.zk.ui.Component rendererPanel, com.hybris.cockpitng.dataaccess.facades.type.DataType type)
protected void
initMediaInfoLabels()
protected org.zkoss.zul.Vlayout
initMediaInfoPanel()
protected void
initPreRenderModelConstants(java.lang.String suffix)
protected boolean
isDisplayable(MediaModel media)
protected boolean
isInSecureFolder(MediaModel mediaModel)
protected void
refreshActiveView(com.hybris.cockpitng.dataaccess.facades.type.DataType type)
protected void
refreshModelAndViewAfterSaveListeners(com.hybris.cockpitng.dataaccess.facades.type.DataType type)
protected void
refreshWidgetModelAfterSaveListeners()
protected void
removeAfterSaveAndCancelListeners()
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)
void
setCockpitProperties(com.hybris.cockpitng.core.util.CockpitProperties cockpitProperties)
protected void
setLimitOnMaxFileSize(org.zkoss.zul.Fileupload fileupload)
void
setMediaService(MediaService mediaService)
void
setMediaStorageConfigService(MediaStorageConfigService mediaStorageConfigService)
void
setModelService(ModelService modelService)
void
setObjectFacade(com.hybris.cockpitng.dataaccess.facades.object.ObjectFacade objectFacade)
void
setObjectPreviewService(com.hybris.cockpitng.services.media.ObjectPreviewService objectPreviewService)
void
setPermissionFacadeStrategy(com.hybris.cockpitng.dataaccess.facades.permissions.PermissionFacadeStrategy permissionFacadeStrategy)
-
Methods inherited from class com.hybris.cockpitng.widgets.editorarea.renderer.impl.AbstractEditorAreaComponentRenderer
buildEditor, canChangeProperty, createCustom, createEditor, createNotReadableAttributeLabelRenderer, evaluateCustomDefinition, extractParameterName, extractParameterValue, extractPropertiesList, getAttributeDescription, getCockpitLocaleService, getCockpitUserService, getEditAvailabilityProviderFactory, getEditorBuilder, getLabelService, getPermissionFacade, getPropertyValueService, getWidgetRenderingUtils, processEditorBeforeComposition, renderNotReadableLabel, resolveAttributeLabel, resolveAttributePath, resolveCustomComponentRenderer, resolveEditorType, resolveLabel, setAttributeDescriptionIconRenderer, setCockpitLocaleService, setCockpitUserService, setEditAvailabilityProviderFactory, setLabelService, setPermissionFacade, setPropertyValueService, setWidgetRenderingUtils, validateCustomElement
-
Methods inherited from class com.hybris.cockpitng.widgets.common.AbstractWidgetComponentRenderer
addRendererListener, fireComponentRendered, fireComponentRendered, fireComponentRendered, removeRendererListener
-
-
-
-
Field Detail
-
PROPERTY_SRC
public static final java.lang.String PROPERTY_SRC
- See Also:
- Constant Field Values
-
LABEL_KEY_PK
protected static final java.lang.String LABEL_KEY_PK
- See Also:
- Constant Field Values
-
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
-
IMAGE
protected static final java.lang.String IMAGE
- 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
-
MAX_SIZE
protected static final java.lang.String MAX_SIZE
- See Also:
- Constant Field Values
-
FILE_UPLOAD_MAX_SIZE
protected static final java.lang.String FILE_UPLOAD_MAX_SIZE
- See Also:
- Constant Field Values
-
IMG_STYLE
protected static final java.lang.String IMG_STYLE
- 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
protected static final java.lang.String MEDIA_PREVIEW
- See Also:
- Constant Field Values
-
MEDIA_PREVIEW_CNT
protected static final java.lang.String MEDIA_PREVIEW_CNT
- See Also:
- Constant Field Values
-
MEDIA_INFO_CNT
protected static final java.lang.String MEDIA_INFO_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
-
DATE_FORMAT
protected static final java.lang.String DATE_FORMAT
- 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
-
-
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)
-
getMediaStorageConfigService
protected MediaStorageConfigService getMediaStorageConfigService()
-
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()
-
-