Class UISessionImpl
- java.lang.Object
-
- de.hybris.platform.cockpit.session.impl.UISessionImpl
-
-
Field Summary
-
Fields inherited from interface de.hybris.platform.cockpit.session.UISession
PERSPECTIVE_ATTRIBUTE
-
-
Constructor Summary
Constructors Constructor Description UISessionImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddSessionListener(UISessionListener listener)Adds a session listener.voidclearSessionListeners()protected org.zkoss.zk.ui.sys.IdGeneratorcreateIdGenerator()protected voidfireAfterLogin()protected voidfireBeforeLogout()protected voidfireDataLanguageChanged()protected voidfirePerspectiveChanged(UICockpitPerspective old)java.util.List<UICockpitPerspective>getAvailablePerspectives()Returns all available perspectives.UICockpitPerspectivegetCurrentPerspective()Returns the current product cockpit perspective bean.java.lang.StringgetGlobalDataLanguageIso()Returns the isocode of the current data language.java.util.LocalegetGlobalDataLocale()JasperReportsRefreshgetJasperReportsRefresh()Returns service, which handles all page refresh requirements.LabelServicegetLabelService()java.lang.StringgetLanguageIso()Returns the isocode of the current session language.protected java.util.List<UISessionListener>getListeners(boolean create)java.util.LocalegetLocale()LocalizationServicegetLocalizationService()ModelServicegetModelService()NewItemServicegetNewItemService()UICockpitPerspectivegetPerspective(java.lang.String uid)java.util.List<PushCreationContainer>getPushContainers()RequestHandlergetRequestHandler()SavedQueryServicegetSavedQueryService()SearchServicegetSearchService()java.util.List<CatalogVersionModel>getSelectedCatalogVersions()java.util.Set<java.lang.String>getSupportedLanguageIsoCodes()SystemServicegetSystemService()TypeServicegetTypeService()UIAccessRightServicegetUiAccessRightService()UIConfigurationServicegetUiConfigurationService()UndoManagergetUndoManager()UserModelgetUser()Returns the current ui session user.ObjectValueHandlerRegistrygetValueHandlerRegistry()voidinitSession()booleanisCachePerspectivesEnabled()booleanisDragOverPerspectivesEnabled()booleanisPerspectiveAvailable(java.lang.String uid)booleanisUsingTestIDs()voidlogin(UserModel user)Assigns specified user to this session.voidlogout()voidregisterAdditionalPerspectives()registers additional perspectivesvoidregisterPerspectiveContainer(org.zkoss.zk.ui.Component comp)voidremoveSessionListener(UISessionListener listener)Removes session listener.voidsendGlobalEvent(CockpitEvent event)Processes given event.voidsendGlobalEvent(CockpitEvent event, boolean immediate)Processes given event.voidsetApplicationContext(org.springframework.context.ApplicationContext appCtx)voidsetAvailablePerspectives(java.util.List<UICockpitPerspective> availablePerspectives)voidsetCachePerspectivesEnabled(boolean cachePerspectivesEnabled)voidsetCockpitTypeService(TypeService cockpitTypeService)voidsetCommonI18NService(CommonI18NService commonI18NService)voidsetCurrentPerspective(UICockpitPerspective perspective)Changes the current product perspective bean.voidsetCurrentPerspective(UICockpitPerspective perspective, java.util.Map<java.lang.String,? extends java.lang.Object> params)voidsetDragOverPerspectivesEnabled(boolean dragOverPerspEnabled)voidsetGlobalDataLanguageIso(java.lang.String globalDataLanguageIso)voidsetInitialSessionListeners(java.util.Collection<UISessionListener> listeners)voidsetJasperReportsRefresh(JasperReportsRefresh jasperReportsRefresh)voidsetLabelService(LabelService labelService)voidsetLocalizationService(LocalizationService localizationService)voidsetModelService(ModelService modelService)voidsetNewItemService(NewItemService newItemService)voidsetPushContainers(java.util.List<PushCreationContainer> pushContainers)voidsetRequestHandler(RequestHandler reqHandler)voidsetSavedQueryService(SavedQueryService savedQueryService)voidsetSearchService(SearchService searchService)voidsetSelectedCatalogVersions(java.util.List<CatalogVersionModel> catalogVersions)voidsetSendEventsImmediately(boolean immediately)booleansetSessionAttribute(java.lang.String key, java.lang.Object value)voidsetSessionService(SessionService sessionService)voidsetSystemService(SystemService systemService)voidsetUiAccessRightService(UIAccessRightService accessRightService)voidsetUiConfigurationService(UIConfigurationService configurationService)voidsetUndoManager(UndoManager undoManager)voidsetUser(UserModel currentUser)Changes the current session user.voidsetUserByUID(java.lang.String uid)Changes the current session user.voidsetUsingTestIDs(boolean value)Deprecated.since 6.3, this property should be set in 'local.properties'.voidsetValueHandlerRegistry(ObjectValueHandlerRegistry objectValueRegistry)protected voidupdateRestrictedPerspectives()
-
-
-
Method Detail
-
getSelectedCatalogVersions
public java.util.List<CatalogVersionModel> getSelectedCatalogVersions()
- Specified by:
getSelectedCatalogVersionsin interfaceUISession
-
setSelectedCatalogVersions
public void setSelectedCatalogVersions(java.util.List<CatalogVersionModel> catalogVersions)
- Specified by:
setSelectedCatalogVersionsin interfaceUISession
-
getAvailablePerspectives
public java.util.List<UICockpitPerspective> getAvailablePerspectives()
Description copied from interface:UISessionReturns all available perspectives.- Specified by:
getAvailablePerspectivesin interfaceUISession
-
setAvailablePerspectives
public void setAvailablePerspectives(java.util.List<UICockpitPerspective> availablePerspectives)
-
setSendEventsImmediately
public void setSendEventsImmediately(boolean immediately)
-
updateRestrictedPerspectives
protected void updateRestrictedPerspectives()
-
registerPerspectiveContainer
public void registerPerspectiveContainer(org.zkoss.zk.ui.Component comp)
-
getCurrentPerspective
public UICockpitPerspective getCurrentPerspective()
Description copied from interface:UISessionReturns the current product cockpit perspective bean.- Specified by:
getCurrentPerspectivein interfaceUISession
-
setCurrentPerspective
public void setCurrentPerspective(UICockpitPerspective perspective)
Description copied from interface:UISessionChanges the current product perspective bean. Accepts one out ofUISession.getAvailablePerspectives(). TriggersUISessionListener.perspectiveChanged(UICockpitPerspective, UICockpitPerspective).- Specified by:
setCurrentPerspectivein interfaceUISession- Parameters:
perspective- the new perspective bean
-
setCurrentPerspective
public void setCurrentPerspective(UICockpitPerspective perspective, java.util.Map<java.lang.String,? extends java.lang.Object> params)
- Specified by:
setCurrentPerspectivein interfaceUISession
-
firePerspectiveChanged
protected void firePerspectiveChanged(UICockpitPerspective old)
-
getListeners
protected java.util.List<UISessionListener> getListeners(boolean create)
-
setInitialSessionListeners
public void setInitialSessionListeners(java.util.Collection<UISessionListener> listeners)
-
addSessionListener
public void addSessionListener(UISessionListener listener)
Description copied from interface:UISessionAdds a session listener.- Specified by:
addSessionListenerin interfaceUISession- Parameters:
listener- the new listener
-
removeSessionListener
public void removeSessionListener(UISessionListener listener)
Description copied from interface:UISessionRemoves session listener.- Specified by:
removeSessionListenerin interfaceUISession- Parameters:
listener- the listener to remove
-
clearSessionListeners
public void clearSessionListeners()
-
fireAfterLogin
protected void fireAfterLogin()
-
fireBeforeLogout
protected void fireBeforeLogout()
-
fireDataLanguageChanged
protected void fireDataLanguageChanged()
-
getLanguageIso
public java.lang.String getLanguageIso()
Description copied from interface:UISessionReturns the isocode of the current session language. UseUISession.getLocale()instead, if you want the locale before creating your own locale object- Specified by:
getLanguageIsoin interfaceUISession- Returns:
- current language iso code.
-
getSupportedLanguageIsoCodes
public java.util.Set<java.lang.String> getSupportedLanguageIsoCodes()
-
getUser
public UserModel getUser()
Description copied from interface:UISessionReturns the current ui session user.
-
setUser
public void setUser(UserModel currentUser)
Description copied from interface:UISessionChanges the current session user.
-
setUserByUID
public void setUserByUID(java.lang.String uid)
Description copied from interface:UISessionChanges the current session user. This method accepts a user id and fetches the user object automatically.- Specified by:
setUserByUIDin interfaceUISession
-
login
public void login(UserModel user)
Description copied from interface:UISessionAssigns specified user to this session.
-
getSystemService
public SystemService getSystemService()
- Specified by:
getSystemServicein interfaceUISession
-
setSystemService
public void setSystemService(SystemService systemService)
-
setNewItemService
public void setNewItemService(NewItemService newItemService)
-
getNewItemService
public NewItemService getNewItemService()
- Specified by:
getNewItemServicein interfaceUISession
-
setCockpitTypeService
public void setCockpitTypeService(TypeService cockpitTypeService)
- Parameters:
cockpitTypeService- the cockpitTypeService to set
-
setValueHandlerRegistry
public void setValueHandlerRegistry(ObjectValueHandlerRegistry objectValueRegistry)
-
setLabelService
public void setLabelService(LabelService labelService)
-
getLabelService
public LabelService getLabelService()
- Specified by:
getLabelServicein interfaceUISession
-
setSessionService
public void setSessionService(SessionService sessionService)
-
getValueHandlerRegistry
public ObjectValueHandlerRegistry getValueHandlerRegistry()
- Specified by:
getValueHandlerRegistryin interfaceUISession
-
setGlobalDataLanguageIso
public void setGlobalDataLanguageIso(java.lang.String globalDataLanguageIso)
- Specified by:
setGlobalDataLanguageIsoin interfaceUISession
-
getGlobalDataLanguageIso
public java.lang.String getGlobalDataLanguageIso()
Description copied from interface:UISessionReturns the isocode of the current data language. UseUISession.getGlobalDataLocale()instead, if you want the locale before creating your own locale object- Specified by:
getGlobalDataLanguageIsoin interfaceUISession- Returns:
- current data language iso code.
-
getSearchService
public SearchService getSearchService()
- Specified by:
getSearchServicein interfaceUISession
-
setSearchService
public void setSearchService(SearchService searchService)
-
getSavedQueryService
public SavedQueryService getSavedQueryService()
- Specified by:
getSavedQueryServicein interfaceUISession
-
setSavedQueryService
public void setSavedQueryService(SavedQueryService savedQueryService)
-
getUndoManager
public UndoManager getUndoManager()
- Specified by:
getUndoManagerin interfaceUISession
-
setUndoManager
public void setUndoManager(UndoManager undoManager)
-
sendGlobalEvent
public void sendGlobalEvent(CockpitEvent event, boolean immediate)
Description copied from interface:UISessionProcesses given event. It will be dispatched to the current perspective.- Specified by:
sendGlobalEventin interfaceUISession- Parameters:
event- the event to be processedimmediate- force to send event immediately (not "on later")
-
sendGlobalEvent
public void sendGlobalEvent(CockpitEvent event)
Description copied from interface:UISessionProcesses given event. It will be dispatched to the current perspective.- Specified by:
sendGlobalEventin interfaceUISession- Parameters:
event- the event to be processed
-
initSession
public void initSession()
-
registerAdditionalPerspectives
public void registerAdditionalPerspectives()
registers additional perspectives
-
createIdGenerator
protected org.zkoss.zk.ui.sys.IdGenerator createIdGenerator()
-
isUsingTestIDs
public boolean isUsingTestIDs()
- Specified by:
isUsingTestIDsin interfaceUISession
-
setUsingTestIDs
@Deprecated public void setUsingTestIDs(boolean value)
Deprecated.since 6.3, this property should be set in 'local.properties'.
-
getPerspective
public UICockpitPerspective getPerspective(java.lang.String uid) throws java.lang.IllegalArgumentException
- Specified by:
getPerspectivein interfaceUISession- Throws:
java.lang.IllegalArgumentException
-
setModelService
public void setModelService(ModelService modelService)
-
getModelService
public ModelService getModelService()
- Specified by:
getModelServicein interfaceUISession
-
isPerspectiveAvailable
public boolean isPerspectiveAvailable(java.lang.String uid)
- Specified by:
isPerspectiveAvailablein interfaceUISession
-
getRequestHandler
public RequestHandler getRequestHandler()
- Specified by:
getRequestHandlerin interfaceUISession
-
setRequestHandler
public void setRequestHandler(RequestHandler reqHandler)
- Specified by:
setRequestHandlerin interfaceUISession
-
getPushContainers
public java.util.List<PushCreationContainer> getPushContainers()
- Specified by:
getPushContainersin interfaceUISession
-
setPushContainers
public void setPushContainers(java.util.List<PushCreationContainer> pushContainers)
- Specified by:
setPushContainersin interfaceUISession
-
setDragOverPerspectivesEnabled
public void setDragOverPerspectivesEnabled(boolean dragOverPerspEnabled)
-
isDragOverPerspectivesEnabled
public boolean isDragOverPerspectivesEnabled()
- Specified by:
isDragOverPerspectivesEnabledin interfaceUISession
-
setCachePerspectivesEnabled
public void setCachePerspectivesEnabled(boolean cachePerspectivesEnabled)
-
isCachePerspectivesEnabled
public boolean isCachePerspectivesEnabled()
- Specified by:
isCachePerspectivesEnabledin interfaceUISession
-
setUiConfigurationService
public void setUiConfigurationService(UIConfigurationService configurationService)
-
getUiConfigurationService
public UIConfigurationService getUiConfigurationService()
- Specified by:
getUiConfigurationServicein interfaceUISession
-
setUiAccessRightService
public void setUiAccessRightService(UIAccessRightService accessRightService)
-
getUiAccessRightService
public UIAccessRightService getUiAccessRightService()
- Specified by:
getUiAccessRightServicein interfaceUISession
-
setSessionAttribute
public boolean setSessionAttribute(java.lang.String key, java.lang.Object value)- Specified by:
setSessionAttributein interfaceUISession
-
getGlobalDataLocale
public java.util.Locale getGlobalDataLocale()
- Specified by:
getGlobalDataLocalein interfaceUISession- Returns:
- the locale for the currently selected data language
-
getLocale
public java.util.Locale getLocale()
-
setCommonI18NService
public void setCommonI18NService(CommonI18NService commonI18NService)
-
setLocalizationService
public void setLocalizationService(LocalizationService localizationService)
-
getLocalizationService
public LocalizationService getLocalizationService()
-
setJasperReportsRefresh
public void setJasperReportsRefresh(JasperReportsRefresh jasperReportsRefresh)
-
getJasperReportsRefresh
public JasperReportsRefresh getJasperReportsRefresh()
Description copied from interface:UISessionReturns service, which handles all page refresh requirements. Currently used for Jasper reports only- Specified by:
getJasperReportsRefreshin interfaceUISession
-
getTypeService
public TypeService getTypeService()
- Specified by:
getTypeServicein interfaceUISession
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext appCtx) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
-