public final class CurrentSession extends Object
Modifier and Type | Method and Description |
---|---|
static Object |
getAttribute(String key)
Methods to return the session attribute.
|
static int |
getCallerTenantId()
Methods that abstract the set and get of the stack values.
|
static String |
getChroot()
Methods that abstract the set and get of the stack values.
|
static Map<String,String> |
getLocalPathMap()
Methods that abstract the set and get of the stack values.
|
static int |
getTenantId()
Methods that abstract the set and get of the stack values.
|
static String |
getUser()
Methods that abstract the set and get of the stack values of user realm.
|
static org.wso2.carbon.user.core.UserRealm |
getUserRealm()
Methods that abstract the set and get of the stack values of user realm.
|
static UserRegistry |
getUserRegistry()
Methods that abstract the set and get of the stack values.
|
static void |
removeAttribute(String key)
Remove named session attribute.
|
static void |
removeAttributes()
Remove all the session attributes.
|
static void |
removeCallerTenantId()
Remove the callers tenant id from the session stack.
|
static void |
removeChroot()
Remove the chroot from the session stack.
|
static void |
removeLocalPathMap()
Remove the local path map from the session stack.
|
static void |
removeTenantId()
Remove the tenant id from the session stack.
|
static void |
removeUser()
Remove the user from the session stack.
|
static void |
removeUserRealm()
Remove the user realm from the session stack.
|
static void |
removeUserRegistry()
Remove the user registry from the session stack.
|
static void |
setAttribute(String key,
Object value)
Method to set session attributes
|
static void |
setCallerTenantId(int callerTenantId)
Inserting the callers tenant id to the session stack.
|
static void |
setChroot(String chroot)
Inserting the chroot to the session stack.
|
static void |
setLocalPathMap(Map<String,String> localPathMap)
Inserting the local path map to the session stack.
|
static void |
setTenantId(int tenantId)
Inserting the tenant id to the session stack.
|
static void |
setUser(String userID)
Inserting the user to the session stack.
|
static void |
setUserRealm(org.wso2.carbon.user.core.UserRealm userRealm)
Inserting the user realm to the session stack.
|
static void |
setUserRegistry(UserRegistry userRegistry)
Inserting the user registry to the session stack.
|
public static String getUser()
public static void setUser(String userID)
userID
- the id of th userpublic static void removeUser()
public static org.wso2.carbon.user.core.UserRealm getUserRealm()
public static void setUserRealm(org.wso2.carbon.user.core.UserRealm userRealm)
userRealm
- the user realm.public static void removeUserRealm()
public static int getTenantId()
public static void setTenantId(int tenantId)
tenantId
- the tenant id.public static void removeTenantId()
public static int getCallerTenantId()
public static void setCallerTenantId(int callerTenantId)
callerTenantId
- the callers tenant idpublic static void removeCallerTenantId()
public static String getChroot()
public static void setChroot(String chroot)
chroot
- the chroot.public static void removeChroot()
public static UserRegistry getUserRegistry()
public static void setUserRegistry(UserRegistry userRegistry)
userRegistry
- the user registry.public static void removeUserRegistry()
public static Map<String,String> getLocalPathMap()
public static void setLocalPathMap(Map<String,String> localPathMap)
localPathMap
- the local path map.public static void removeLocalPathMap()
public static Object getAttribute(String key)
key
- the parameter keypublic static void setAttribute(String key, Object value)
key
- the session attribute keyvalue
- the session attribute valuepublic static void removeAttributes()
public static void removeAttribute(String key)
key
- key of attribute to be removedCopyright © 2016 WSO2 Inc. All Rights Reserved.