Class MediaEditorSectionConfiguration
java.lang.Object
de.hybris.platform.cockpit.services.config.impl.DefaultEditorSectionConfiguration
de.hybris.platform.cockpit.services.config.impl.MediaEditorSectionConfiguration
- All Implemented Interfaces:
CustomEditorSectionConfiguration,EditorSectionConfiguration,Cloneable
public class MediaEditorSectionConfiguration
extends DefaultEditorSectionConfiguration
implements CustomEditorSectionConfiguration
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSpecial class that holds all necessary media informationclassMedia editor section custom renderer - renders whole section -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidallInitialized(EditorConfiguration config, ObjectType objectType, TypedObject currentObject) clone()protected org.zkoss.zul.ImageconvertByteStreamToImage(byte[] byteStream, String name) Converts given byte sequence to regular ZK Imageprotected org.zkoss.zul.ImageconvertToImage(org.zkoss.image.AImage imageContent) Converts given AImage object to regular ZK Imageprotected org.zkoss.zul.ButtoncreateDownloadButton(TypedObject typedObject) protected org.zkoss.zul.ButtoncreatePreviewButton(TypedObject typedObject) protected org.zkoss.zul.ButtoncreateUploadButton(TypedObject typedObject, org.zkoss.zul.Div previewContainer, SectionPanelModel sectionModel) protected byte[]extractMediaBytesFromMedia(org.zkoss.util.media.Media uploadedMedia) Method extracts byte sequence from given Media objectprotected MediaInfoServiceprotected MediaUpdateServiceprotected ModelServicevoidinitialize(EditorConfiguration config, ObjectType objectType, TypedObject object) voidloadValues(EditorConfiguration config, ObjectType type, TypedObject object, ObjectValueContainer objectValues) voidsaveValues(EditorConfiguration config, ObjectType type, TypedObject object, ObjectValueContainer objectValues) protected org.zkoss.zk.ui.ComponentwrapButton(org.zkoss.zul.Button aButton) Puts given button to prepared containerMethods inherited from class de.hybris.platform.cockpit.services.config.impl.DefaultEditorSectionConfiguration
copyValues, getAllLabel, getLabel, getLabel, getLabelWithFallback, getLabelWithFallback, getPosition, getQualifier, getSectionRows, getXmlDataProvider, isInitiallyOpened, isPrintable, isTabbed, isVisible, setAllLabel, setInitiallyOpened, setPosition, setPrintable, setQualifier, setSectionRows, setShowIfEmpty, setShowInCreateMode, setTabbed, setVisible, setXmlDataProvider, setXmlDataProvider, showIfEmpty, showInCreateModeMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.cockpit.services.config.EditorSectionConfiguration
getAllLabel, getLabel, getLabel, getPosition, getQualifier, getSectionRows, getXmlDataProvider, isInitiallyOpened, isPrintable, isTabbed, isVisible, setAllLabel, setInitiallyOpened, setPosition, setPrintable, setQualifier, setSectionRows, setShowIfEmpty, setVisible, setXmlDataProvider, showIfEmpty, showInCreateMode
-
Constructor Details
-
MediaEditorSectionConfiguration
public MediaEditorSectionConfiguration() -
MediaEditorSectionConfiguration
-
-
Method Details
-
allInitialized
public void allInitialized(EditorConfiguration config, ObjectType objectType, TypedObject currentObject) - Specified by:
allInitializedin interfaceCustomEditorSectionConfiguration
-
clone
- Specified by:
clonein interfaceEditorSectionConfiguration- Overrides:
clonein classDefaultEditorSectionConfiguration- Throws:
CloneNotSupportedException
-
convertByteStreamToImage
protected org.zkoss.zul.Image convertByteStreamToImage(byte[] byteStream, String name) throws IOException Converts given byte sequence to regular ZK Image- Parameters:
byteStream- data streamname- current name- Returns:
- return a regular ZK image
Image - Throws:
IOException
-
convertToImage
protected org.zkoss.zul.Image convertToImage(org.zkoss.image.AImage imageContent) Converts given AImage object to regular ZK Image- Parameters:
imageContent- image content- Returns:
- return a regular ZK image
Image - See Also:
-
AImage
-
createDownloadButton
-
createPreviewButton
-
extractMediaBytesFromMedia
protected byte[] extractMediaBytesFromMedia(org.zkoss.util.media.Media uploadedMedia) Method extracts byte sequence from given Media object- Parameters:
uploadedMedia- given media object- Returns:
- byte sequence
-
createUploadButton
protected org.zkoss.zul.Button createUploadButton(TypedObject typedObject, org.zkoss.zul.Div previewContainer, SectionPanelModel sectionModel) -
getAdditionalSections
- Specified by:
getAdditionalSectionsin interfaceCustomEditorSectionConfiguration
-
getCustomRenderer
- Specified by:
getCustomRendererin interfaceCustomEditorSectionConfiguration
-
getMediaUpdateService
-
getSystemService
-
getModelService
-
getMediaInfoService
-
initialize
- Specified by:
initializein interfaceCustomEditorSectionConfiguration
-
loadValues
public void loadValues(EditorConfiguration config, ObjectType type, TypedObject object, ObjectValueContainer objectValues) - Specified by:
loadValuesin interfaceCustomEditorSectionConfiguration
-
saveValues
public void saveValues(EditorConfiguration config, ObjectType type, TypedObject object, ObjectValueContainer objectValues) - Specified by:
saveValuesin interfaceCustomEditorSectionConfiguration
-
wrapButton
protected org.zkoss.zk.ui.Component wrapButton(org.zkoss.zul.Button aButton) Puts given button to prepared container- Parameters:
aButton- given button- Returns:
- wrapped button
-