Package uk.gov.gchq.gaffer.tinkerpop
Class GafferPopGraphVariables
- java.lang.Object
-
- uk.gov.gchq.gaffer.tinkerpop.GafferPopGraphVariables
-
- All Implemented Interfaces:
org.apache.tinkerpop.gremlin.structure.Graph.Variables
public final class GafferPopGraphVariables extends Object implements org.apache.tinkerpop.gremlin.structure.Graph.Variables
-
-
Field Summary
Fields Modifier and Type Field Description static String
DATA_AUTHS
Variable key for the list of data auths for the user interacting with the graph.static String
GET_ALL_ELEMENTS_LIMIT
The max number of elements that can be returned by GetAllElementsstatic String
OP_OPTIONS
Variable key for theMap
of Gaffer operation options.static String
USER_ID
Variable key for the userId of who is interacting with the graph.
-
Constructor Summary
Constructors Constructor Description GafferPopGraphVariables()
GafferPopGraphVariables(Map<String,Object> variables)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> Optional<R>
get(String key)
String[]
getDataAuths()
Gets the list of data auths.Map<String,String>
getOperationOptions()
Gets the operation options if available.String
getUserId()
Gets the current user ID.Set<String>
keys()
void
remove(String key)
void
set(String key, Object value)
void
setOperationOptions(Iterable<String> opOptions)
Sets the operation options key, attempts to convert to a StringMap
by spitting each value on ':'.String
toString()
-
-
-
Field Detail
-
OP_OPTIONS
public static final String OP_OPTIONS
Variable key for theMap
of Gaffer operation options.- See Also:
- Constant Field Values
-
DATA_AUTHS
public static final String DATA_AUTHS
Variable key for the list of data auths for the user interacting with the graph.- See Also:
- Constant Field Values
-
USER_ID
public static final String USER_ID
Variable key for the userId of who is interacting with the graph.- See Also:
- Constant Field Values
-
GET_ALL_ELEMENTS_LIMIT
public static final String GET_ALL_ELEMENTS_LIMIT
The max number of elements that can be returned by GetAllElements- See Also:
- Constant Field Values
-
-
Method Detail
-
keys
public Set<String> keys()
- Specified by:
keys
in interfaceorg.apache.tinkerpop.gremlin.structure.Graph.Variables
-
get
public <R> Optional<R> get(String key)
- Specified by:
get
in interfaceorg.apache.tinkerpop.gremlin.structure.Graph.Variables
-
remove
public void remove(String key)
- Specified by:
remove
in interfaceorg.apache.tinkerpop.gremlin.structure.Graph.Variables
-
set
public void set(String key, Object value)
- Specified by:
set
in interfaceorg.apache.tinkerpop.gremlin.structure.Graph.Variables
-
setOperationOptions
public void setOperationOptions(Iterable<String> opOptions)
Sets the operation options key, attempts to convert to a StringMap
by spitting each value on ':'.- Parameters:
opOptions
- List of String key value pairs e.g.[ "key:value", "key2:value2" ]
-
getOperationOptions
public Map<String,String> getOperationOptions()
Gets the operation options if available.- Returns:
- Operation options map
-
getDataAuths
public String[] getDataAuths()
Gets the list of data auths.- Returns:
- List of data auths.
-
getUserId
public String getUserId()
Gets the current user ID.- Returns:
- The user ID
-
-