Class DefaultLiveEditViewModel
java.lang.Object
de.hybris.platform.cmscockpit.components.liveedit.impl.DefaultLiveEditViewModel
- All Implemented Interfaces:
LiveEditViewModel
Default implementation of the LiveEditViewModel.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInvokes when current preview parameters are obsolete (i.e.Computes final URL for preview and live editExtracts all necessary informations from current request and collects server informationprotected CMSAdminSiteServiceprotected CMSPreviewServiceRetrieve CMSPreview Serviceprotected CMSSiteServiceprotected LanguageModelprotected I18NServiceRetrieves internationalization serviceprotected ModelServiceRetrieves Model ServicegetPage()protected CMSAdminRestrictionServicegetSite()protected SystemServiceRetrieves System servicebooleanbooleanbooleanbooleanbooleanisSlotLockedForId(String slotId) Returns if a given Slot is visible for current versionbooleanprotected Set<CatalogVersionModel>Retrieves catalog versions that will be stored in PreviewData objectvoidsetContentVisible(boolean contentVisible) voidsetCurrentFrontendUser(UserModel currentFrontendUser) voidsetCurrentPreviewData(PreviewDataModel previewData) voidsetCurrentUrl(String url) voidsetLiveEditModeEnabled(boolean enabled) voidsetPage(AbstractPageModel page) voidsetPagePreview(boolean previewPage) voidsetPreviewLoader(PreviewLoader previewLoader) voidsetSite(CMSSiteModel site) voidsetWelcomePanelVisible(boolean welcomePanelVisible)
-
Field Details
-
SLASH_MARK
- See Also:
-
QUESTION_MARK
- See Also:
-
EQUALS_MARK
- See Also:
-
-
Constructor Details
-
DefaultLiveEditViewModel
public DefaultLiveEditViewModel()
-
-
Method Details
-
clearPreviewInformation
public void clearPreviewInformation()Invokes when current preview parameters are obsolete (i.e. active CMSSite was changed, active catalogVersion was changed) Note:
This prevents URL and preview data caching when preview parameters was changed. -
computeFinalUrl
Computes final URL for preview and live edit Note:
This method produces a URL in order to trigger that is responsible for getting a proper page- Specified by:
computeFinalUrlin interfaceLiveEditViewModel
-
extractUrlFromRequest
Extracts all necessary informations from current request and collects server information Note:
Constructs absolute preview URL when current is relative.- Returns:
- absolute preview URL
-
getCMSAdminSiteService
-
getCMSPreviewService
Retrieve CMSPreview Service- Returns:
- CMSPreview Service
-
getCMSSiteService
-
getCurrentDataLanguageModel
-
getCurrentPreviewData
- Specified by:
getCurrentPreviewDatain interfaceLiveEditViewModel
-
getCurrentUrl
- Specified by:
getCurrentUrlin interfaceLiveEditViewModel
-
getI18NService
Retrieves internationalization service- Returns:
- internationalization service
-
getModelService
Retrieves Model Service- Returns:
- Model Service
-
getPage
- Specified by:
getPagein interfaceLiveEditViewModel
-
getPreviewLoader
-
getRestrictionService
-
getSite
- Specified by:
getSitein interfaceLiveEditViewModel
-
getSystemService
Retrieves System service- Returns:
- System service
-
isContentVisible
public boolean isContentVisible() -
isLiveEditModeEnabled
public boolean isLiveEditModeEnabled()- Specified by:
isLiveEditModeEnabledin interfaceLiveEditViewModel
-
isPagePreview
public boolean isPagePreview() -
isPreviewDataValid
public boolean isPreviewDataValid()- Specified by:
isPreviewDataValidin interfaceLiveEditViewModel
-
isSlotLockedForId
Returns if a given Slot is visible for current version- Returns:
- boolean
-
isWelcomePanelVisible
public boolean isWelcomePanelVisible() -
retriveCatalogVersions
Retrieves catalog versions that will be stored in PreviewData object- Returns:
- current catalog versions
-
setContentVisible
public void setContentVisible(boolean contentVisible) -
setCurrentPreviewData
- Specified by:
setCurrentPreviewDatain interfaceLiveEditViewModel
-
setCurrentUrl
- Specified by:
setCurrentUrlin interfaceLiveEditViewModel
-
setLiveEditModeEnabled
public void setLiveEditModeEnabled(boolean enabled) - Specified by:
setLiveEditModeEnabledin interfaceLiveEditViewModel
-
setPage
- Specified by:
setPagein interfaceLiveEditViewModel
-
setPagePreview
public void setPagePreview(boolean previewPage) - Specified by:
setPagePreviewin interfaceLiveEditViewModel
-
setPreviewLoader
-
setSite
- Specified by:
setSitein interfaceLiveEditViewModel
-
setWelcomePanelVisible
public void setWelcomePanelVisible(boolean welcomePanelVisible) -
getCurrentFrontendUser
-
setCurrentFrontendUser
-