|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.bridge.util.CloudUtil
public class CloudUtil
An utility to work with clouds on the session or as a ThreadLocal
| Field Summary | |
|---|---|
static String |
DEFAULT_AUTHENTICATION
|
static String |
DEFAULT_CLOUD_NAME
|
static String |
DEFAULT_SESSIONNAME
|
| Method Summary | |
|---|---|
static void |
addCloudToThread(Cloud cloud)
Add cloud to the current thread |
static void |
addCloudToThread(HttpServletRequest request)
Add cloud from the http session to the current thread |
static Cloud |
createCloud(HttpServletRequest req)
Create a new cloud in the session based on the info of the request (username/password) The cloud is stored in the session under the DEFAULT_SESSIONNAME |
static Cloud |
createCloud(HttpServletRequest req,
String sessionname)
Create a new cloud in the session based on the info of the request (username/password) |
static Cloud |
createCloud(HttpServletRequest req,
String authenticate,
Map<String,?> loginInfo)
Create a new cloud in the session based on the info of the request (username/password) |
static Cloud |
createCloud(HttpServletRequest req,
String sessionname,
String authenticate,
Map<String,?> loginInfo)
Create a new cloud in the session based on the info of the request (username/password) |
static Cloud |
getCloudFromSession(HttpServletRequest request)
Get cloud from session. |
static Cloud |
getCloudFromSession(HttpServletRequest request,
String sessionname)
Get cloud from session. |
static Cloud |
getCloudFromThread()
Get cloud from current thread |
static Map<String,String> |
getUserCredentials(String username,
String password)
Get Map with login credentials to pass to MMbase bridge |
static boolean |
hasCloud(HttpServletRequest request)
Checks if a cloud is on the session with given the default sessionname. |
static boolean |
hasCloud(HttpServletRequest request,
String sessionname)
Checks if a cloud is on the session with given sessionname. |
static boolean |
isEmptyOrWhitespace(String str)
is Empty Or Whitespace.String |
static void |
removeCloudFromThread()
Remove cloud from current thread |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_SESSIONNAME
public static final String DEFAULT_CLOUD_NAME
public static final String DEFAULT_AUTHENTICATION
| Method Detail |
|---|
public static Cloud createCloud(HttpServletRequest req)
req - HttpServletRequest
public static Cloud createCloud(HttpServletRequest req,
String sessionname)
req - HttpServletRequestsessionname - session attribute name to store the cloud in.
public static Cloud createCloud(HttpServletRequest req,
String authenticate,
Map<String,?> loginInfo)
req - HttpServletRequestauthenticate - Authentication method (eg. "name/password")loginInfo - Map with login information
public static Cloud createCloud(HttpServletRequest req,
String sessionname,
String authenticate,
Map<String,?> loginInfo)
req - HttpServletRequestsessionname - session attribute name to store the cloud in.authenticate - Authentication method (eg. "name/password")loginInfo - Map with login information
public static Map<String,String> getUserCredentials(String username,
String password)
username - username for loginpassword - password for login
public static Cloud getCloudFromSession(HttpServletRequest request)
request - HttpServletRequest
public static Cloud getCloudFromSession(HttpServletRequest request,
String sessionname)
request - HttpServletRequestsessionname - session attribute name to retrieve the cloud from
public static boolean hasCloud(HttpServletRequest request)
request - HttpServletRequest to search for the cloud.
public static boolean hasCloud(HttpServletRequest request,
String sessionname)
request - HttpServletRequest to search for the cloud.sessionname - The name of the cloud on the session.
public static void addCloudToThread(HttpServletRequest request)
request - HttpServletRequest with the sessionpublic static void addCloudToThread(Cloud cloud)
cloud - cloud to add to threadpublic static void removeCloudFromThread()
public static Cloud getCloudFromThread()
public static boolean isEmptyOrWhitespace(String str)
str - String to check emptiness
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||