public class CookiesManager extends HashMap<String,com.versionone.apiclient.CookieData> implements ICookiesManager
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Method and Description |
|---|---|
void |
addCookie(Map<String,List<String>> headerData)
Store cookie for using in next requests
|
void |
addCookie(String name,
String value,
Date expires)
Add cookie to storage
|
protected void |
addCookiesToRequest(HttpURLConnection request)
Add cookies to requests to the VersionOne service
|
void |
deleteAllCookies()
Deletes all cookies from the storage
|
void |
deleteCookie(String name)
Removes cookie from the storage
|
String |
getCookie(String name)
Gets cookie from the storage.
|
String |
getCookies()
Creates string with cookies for request.
|
static CookiesManager |
getCookiesManager(String path) |
static CookiesManager |
getCookiesManager(String path,
String userName,
String password) |
static String |
getDomenToken(String url)
Generate unique token based on path and user name
|
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesequals, hashCode, toStringpublic static CookiesManager getCookiesManager(String path)
public static CookiesManager getCookiesManager(String path, String userName, String password)
public static String getDomenToken(String url)
url - - path to VersionOnepublic String getCookies()
public void deleteCookie(String name)
deleteCookie in interface ICookiesManagername - - cookie name.public void addCookie(Map<String,List<String>> headerData)
headerData - Map of response header datapublic void addCookie(String name, String value, Date expires)
addCookie in interface ICookiesManagername - The cookie namevalue - The cookie valueexpires - The date when the cookie will expireprotected void addCookiesToRequest(HttpURLConnection request)
request - HttpURLConnection to VersionOne serverpublic String getCookie(String name)
ICookiesManagergetCookie in interface ICookiesManagername - - cookie name.public void deleteAllCookies()
ICookiesManagerdeleteAllCookies in interface ICookiesManagerCopyright © 2016 VersionOne, Inc.. All rights reserved.