public class Chain
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<io.inversion.Chain.ActionMatch> |
actions |
protected boolean |
canceled |
protected Engine |
engine |
protected int |
next |
protected Chain |
parent |
protected java.util.Map<java.lang.String,java.lang.String> |
pathParams |
protected java.util.Set<java.lang.String> |
pathParamsToRemove |
protected Request |
request |
protected Response |
response |
protected User |
user |
protected org.apache.commons.collections4.map.CaseInsensitiveMap<java.lang.String,java.lang.Object> |
vars |
| Modifier and Type | Method and Description |
|---|---|
void |
applyPathParams(java.util.Map<java.lang.String,java.lang.String> pathParamsToAdd,
Url url,
JSNode json) |
static java.lang.String |
buildLink(Collection collection) |
static java.lang.String |
buildLink(Collection collection,
java.lang.Object resourceKey,
java.lang.String subCollectionKey) |
void |
cancel() |
static void |
debug(java.lang.Object... msgs) |
Chain |
doNext(Action... newActions) |
Chain |
filterPathParams(JSNode json)
Recursively removes any url path params that appear as properties in the json
|
static Chain |
first() |
protected static java.util.Stack<Chain> |
get() |
java.lang.Object |
get(java.lang.String key)
Storage for chain steps to communicate with each other.
|
java.util.List<io.inversion.Chain.ActionMatch> |
getActions() |
Api |
getApi() |
java.util.Map<java.lang.String,java.lang.String> |
getConfig() |
java.lang.String |
getConfig(java.lang.String key) |
boolean |
getConfig(java.lang.String key,
boolean defaultValue) |
int |
getConfig(java.lang.String key,
int defaultValue) |
java.lang.String |
getConfig(java.lang.String key,
java.lang.String defaultValue) |
java.util.Set<java.lang.String> |
getConfigKeys() |
static int |
getDepth() |
Endpoint |
getEndpoint() |
Engine |
getEngine() |
Action |
getNext() |
Chain |
getParent() |
Request |
getRequest() |
Response |
getResponse() |
static User |
getUser() |
void |
go() |
boolean |
hasNext() |
boolean |
isCanceled() |
boolean |
isDebug() |
java.util.Set<java.lang.String> |
mergeEndpointActionParamsConfig(java.lang.String key)
Returns the combined list of endpoint/action stack/request params
for the supplied key
|
boolean |
next() |
static Chain |
peek() |
static Chain |
pop() |
static Chain |
push(Engine engine,
Request req,
Response res) |
void |
put(java.lang.String key,
java.lang.Object value) |
java.lang.Object |
remove(java.lang.String key) |
static void |
resetAll() |
void |
setParent(Chain parent) |
static int |
size() |
Chain |
skipNext() |
static Chain |
top() |
Chain |
withAction(io.inversion.Chain.ActionMatch action) |
Chain |
withActions(java.util.List<io.inversion.Chain.ActionMatch> actions) |
Chain |
withPathParams(java.util.Map<java.lang.String,java.lang.String> pathParams) |
Chain |
withUser(User user) |
protected final Engine engine
protected final java.util.List<io.inversion.Chain.ActionMatch> actions
protected final Request request
protected final Response response
protected final org.apache.commons.collections4.map.CaseInsensitiveMap<java.lang.String,java.lang.Object> vars
protected int next
protected boolean canceled
protected User user
protected Chain parent
protected java.util.Map<java.lang.String,java.lang.String> pathParams
protected java.util.Set<java.lang.String> pathParamsToRemove
public static void resetAll()
protected static java.util.Stack<Chain> get()
public static int getDepth()
public static Chain first()
public static Chain top() throws ApiException
ApiExceptionpublic static Chain peek()
public static Chain pop()
public static User getUser()
public static int size()
public static void debug(java.lang.Object... msgs)
public static java.lang.String buildLink(Collection collection)
public static java.lang.String buildLink(Collection collection, java.lang.Object resourceKey, java.lang.String subCollectionKey)
public Chain getParent()
public void setParent(Chain parent)
public void put(java.lang.String key,
java.lang.Object value)
public boolean isDebug()
public java.lang.Object get(java.lang.String key)
key - the name of the value to retrievepublic java.lang.Object remove(java.lang.String key)
public java.util.Set<java.lang.String> mergeEndpointActionParamsConfig(java.lang.String key)
This for example, allows you to add to but not remove from a configured "excludes" parameter
All returned values are lower case
key - the name of the param to mergepublic java.util.Map<java.lang.String,java.lang.String> getConfig()
public java.util.Set<java.lang.String> getConfigKeys()
public int getConfig(java.lang.String key,
int defaultValue)
public boolean getConfig(java.lang.String key,
boolean defaultValue)
public java.lang.String getConfig(java.lang.String key)
public java.lang.String getConfig(java.lang.String key,
java.lang.String defaultValue)
public void go()
throws ApiException
ApiExceptionpublic Chain filterPathParams(JSNode json)
json - the json node to cleanpublic Chain skipNext()
public Action getNext()
public boolean next()
throws ApiException
ApiExceptionpublic Chain withPathParams(java.util.Map<java.lang.String,java.lang.String> pathParams)
public void applyPathParams(java.util.Map<java.lang.String,java.lang.String> pathParamsToAdd,
Url url,
JSNode json)
public boolean hasNext()
public boolean isCanceled()
public void cancel()
public Engine getEngine()
public Api getApi()
public Endpoint getEndpoint()
public java.util.List<io.inversion.Chain.ActionMatch> getActions()
public Chain withActions(java.util.List<io.inversion.Chain.ActionMatch> actions)
public Chain withAction(io.inversion.Chain.ActionMatch action)
public Request getRequest()
public Response getResponse()
Copyright © 2021 Rocket Partners, LLC. All rights reserved.