public interface RequestContext
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all values contained in the request context.
|
static RequestContext |
get()
Retrieves the context of the current request.
|
String |
getCurrentUserId()
Retrieves the user which originated the activity which caused the Vault Java SDK Code to run.
|
<T extends RequestContextValue> |
getValue(String name,
Class<T> returnType)
Retrieves the value identified by the given
name from the request context. |
<T> T |
getValue(String name,
RequestContextValueType<T> returnType)
Retrieves the value identified by the given
name from the request context. |
Object |
removeValue(String name)
Removes the
value identified by the given name from the request context. |
void |
setValue(String name,
Object value)
Adds the given
value identified by the given name to the request context. |
static RequestContext get()
String getCurrentUserId()
void setValue(String name, Object value)
value
identified by the given name
to the request context.name
- name of the object to add to the request context. Cannot be null.value
- value of the object to add to the request context; must be an instance of a type defined by
RequestContextValueType
. Cannot be null.Object removeValue(String name)
value
identified by the given name
from the request context.name
- name of the object to remove from the request context. Cannot be null.<T> T getValue(String name, RequestContextValueType<T> returnType)
name
from the request context.T
- type of object requested. Cannot be null.name
- name of the object to get from the request context. Cannot be null.returnType
- type of object requested. Cannot be null.<T extends RequestContextValue> T getValue(String name, Class<T> returnType)
name
from the request context.T
- type of object requested. Cannot be null.name
- name of the object to get from the request context. Cannot be null.returnType
- type of object requested. Cannot be null.void clear()
Copyright © Veeva Systems 2017–2020. All rights reserved.