Package io.inversion
Class Request
java.lang.Object
io.inversion.Request
- All Implemented Interfaces:
Headers,io.inversion.json.JSFind
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidio.inversion.utils.PathgetApi()getBody()getChain()io.inversion.utils.Pathio.inversion.json.JSListgetData()Attempts to massage an inbound json body into an array.getDb()io.inversion.utils.PathlonglonggetEndAt()io.inversion.utils.Pathio.inversion.json.JSMapio.inversion.json.JSNodegetJson()getOp()io.inversion.utils.Pathio.inversion.utils.PathgetPath()io.inversion.utils.Pathio.inversion.utils.Pathlongio.inversion.utils.PathgetUrl()booleanisDebug()booleanisDelete()booleanbooleanisGet()booleanbooleanbooleanbooleanisPatch()booleanisPost()booleanisPut()withActionMatch(Chain.ActionMatch actionMatch) withActionMatches(List<Chain.ActionMatch> actionMatches) withActionPath(io.inversion.utils.Path actionPath) withCollection(Collection collection) withCollectionPath(io.inversion.utils.Path collectionPath) withDbPath(io.inversion.utils.Path dbPath) withEndAt(long endAt) withEndpoint(Endpoint endpoint) withEndpointPath(io.inversion.utils.Path endpointPath) withEngine(Engine engine) withExplain(boolean explain) withHeaders(io.inversion.json.JSMap headers) withHeaders(String key, String value) withInternal(boolean internal) withJson(io.inversion.json.JSNode json) withMethod(String method) withOperationPath(io.inversion.utils.Path operationPath) withPathParams(Map<String, String> pathParams) withRemoteAddr(String remoteAddr) withServer(Server server) withServerMatch(Server.ServerMatcher serverMatch) withServerPath(io.inversion.utils.Path serverPath) withServerPathMatch(io.inversion.utils.Path serverPathMatch) withStartAt(long startAt) withUploader(Uploader uploader) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.inversion.Headers
addHeader, addHeaders, getAllHeaders, getHeader, lazyHeaders, removeHeader, removeHeader, setHeaderMethods inherited from interface io.inversion.json.JSFind
find, findAll, findAll, findAll0, findAll0, findBoolean, findDouble, findInt, findList, findLists, findLong, findMap, findMaps, findNode, findString, streamAll
-
Field Details
-
COLLECTION_KEY
- See Also:
-
RESOURCE_KEY
- See Also:
-
RELATIONSHIP_KEY
- See Also:
-
-
Constructor Details
-
Request
public Request() -
Request
-
Request
-
Request
-
Request
-
Request
-
-
Method Details
-
findParam
-
withUrl
-
getStartAt
public long getStartAt() -
withStartAt
-
getEndAt
public long getEndAt() -
withEndAt
-
getDuration
public long getDuration() -
withMethod
-
withHeaders
-
withHeaders
-
getHeaders
public io.inversion.json.JSMap getHeaders()- Specified by:
getHeadersin interfaceHeaders
-
getServer
-
withServer
-
getApi
-
withApi
-
getEngine
-
withEngine
-
isInternal
public boolean isInternal() -
withInternal
-
getCollection
-
withCollection
-
getDb
-
withDb
-
getDbPath
public io.inversion.utils.Path getDbPath() -
withDbPath
-
getEndpoint
-
withEndpoint
-
getServerMatch
-
withServerMatch
-
getServerPath
public io.inversion.utils.Path getServerPath() -
withServerPath
-
getServerPathMatch
public io.inversion.utils.Path getServerPathMatch() -
withServerPathMatch
-
getOperationPath
public io.inversion.utils.Path getOperationPath() -
withOperationPath
-
getEndpointPath
public io.inversion.utils.Path getEndpointPath() -
withEndpointPath
-
getActionPath
public io.inversion.utils.Path getActionPath() -
withActionPath
-
getCollectionPath
public io.inversion.utils.Path getCollectionPath() -
withCollectionPath
-
withActionMatches
-
withActionMatch
-
getActionMatches
-
withPathParams
-
getPathParams
-
isDebug
public boolean isDebug() -
isExplain
public boolean isExplain() -
withExplain
-
getBody
-
withBody
-
getJson
- Specified by:
getJsonin interfaceio.inversion.json.JSFind- Throws:
ApiException
-
getData
public io.inversion.json.JSList getData()Attempts to massage an inbound json body into an array.This is useful so actions can treat all inbound requests as if they are arrays instead of having to check.
Conversion rules:
- if getBody() is a JSList return it.
- if getBody() is a JSNode with a "data" array prop, return it
- if getBody() is a JSNode with a "_embedded" array prop, return it
- if getBody() is a JSNode wrap it in an array and return it.
- if getBody() is not a JSNode and getBody() is null, return an empty array.
- Returns:
- the JSON boty messaged into an array
-
withJson
-
getMethod
- Returns:
- the method
-
isMethod
-
isPut
public boolean isPut() -
isPost
public boolean isPost() -
isPatch
public boolean isPatch() -
isGet
public boolean isGet() -
isDelete
public boolean isDelete() -
isOptions
public boolean isOptions() -
getReferrer
-
getChain
-
withChain
-
getUrl
-
getCollectionKey
- Returns:
- the collectionKey
-
getResourceKey
- Returns:
- the resourceKey
-
getRelationshipKey
-
getRelationship
-
getApiUrl
-
getPath
public io.inversion.utils.Path getPath() -
getSubpath
public io.inversion.utils.Path getSubpath() -
getOp
-
withOp
-
getRemoteAddr
-
withRemoteAddr
-
getUploader
-
withUploader
-
getUploads
-
validate
-
validate
-
check
-