Package com.hybris.cockpitng.util
Interface CockpitSessionService
-
- All Known Implementing Classes:
DefaultCockpitSessionService
public interface CockpitSessionServiceProvides access to the current cockpit session lifecycle and attributes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.ObjectgetAttribute(java.lang.String string)Gets attribute for the given keydefault java.util.Map<java.lang.String,WidgetInstance>getWidgetInstanceMap()Gets widget instance map from the sessionvoidlogout()Performs necessary steps to logout the current user.voidremoveAttribute(java.lang.String string)Removes the session attribute for the given key, if existing.voidsetAttribute(java.lang.String string, java.lang.Object value)Sets the session attribute for the given key to the specified value.default voidsetWidgetInstanceMap(java.util.Map<java.lang.String,WidgetInstance> ret)Puts widget instance map to the session
-
-
-
Method Detail
-
getAttribute
java.lang.Object getAttribute(java.lang.String string)
Gets attribute for the given key- Parameters:
string- key from which to retrieve the attribute- Returns:
- the session attribute for the given key or null, if none existing.
-
removeAttribute
void removeAttribute(java.lang.String string)
Removes the session attribute for the given key, if existing.- Parameters:
string- key from which to remove the attribute
-
setAttribute
void setAttribute(java.lang.String string, java.lang.Object value)Sets the session attribute for the given key to the specified value.- Parameters:
string- key from which to set valuevalue- to store
-
logout
void logout()
Performs necessary steps to logout the current user.
-
getWidgetInstanceMap
default java.util.Map<java.lang.String,WidgetInstance> getWidgetInstanceMap()
Gets widget instance map from the session- Returns:
- map
-
setWidgetInstanceMap
default void setWidgetInstanceMap(java.util.Map<java.lang.String,WidgetInstance> ret)
Puts widget instance map to the session- Parameters:
ret- map
-
-