Package co.arago.hiro.client.rest
Class GraphAPI.PostBlobCommand
- java.lang.Object
-
- co.arago.hiro.client.rest.AuthenticatedAPIHandler.APIRequestConf<T,R>
-
- co.arago.hiro.client.rest.AuthenticatedAPIHandler.SendStreamAPIRequestConf<GraphAPI.PostBlobCommand,HiroMessage>
-
- co.arago.hiro.client.rest.GraphAPI.PostBlobCommand
-
- Enclosing class:
- GraphAPI
public class GraphAPI.PostBlobCommand extends AuthenticatedAPIHandler.SendStreamAPIRequestConf<GraphAPI.PostBlobCommand,HiroMessage>
post a binary blob / content / attachment to the graphAPI POST /api/graph/[version]/{ogit/_id}/content
- See Also:
- API Documentation
-
-
Field Summary
-
Fields inherited from class co.arago.hiro.client.rest.AuthenticatedAPIHandler.SendStreamAPIRequestConf
streamContainer
-
Fields inherited from class co.arago.hiro.client.rest.AuthenticatedAPIHandler.APIRequestConf
fragment, headers, httpRequestTimeout, maxRetries, path, query
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPostBlobCommand(java.lang.String ogitId, StreamContainer streamContainer)protectedPostBlobCommand(java.lang.String ogitId, java.io.InputStream inputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HiroMessageexecute()protected GraphAPI.PostBlobCommandself()-
Methods inherited from class co.arago.hiro.client.rest.AuthenticatedAPIHandler.SendStreamAPIRequestConf
setCharset, setContentType, setHttpHeaders, setMediaType
-
Methods inherited from class co.arago.hiro.client.rest.AuthenticatedAPIHandler.APIRequestConf
setHttpRequestTimeout, setMaxRetries, setUrlFragment, setUrlQuery
-
-
-
-
Constructor Detail
-
PostBlobCommand
protected PostBlobCommand(java.lang.String ogitId, StreamContainer streamContainer)- Parameters:
ogitId- ogit/_id of the vertex.streamContainer- Container with the data stream.
-
PostBlobCommand
protected PostBlobCommand(java.lang.String ogitId, java.io.InputStream inputStream)- Parameters:
ogitId- ogit/_id of the vertex.inputStream- InputStream for the data.
-
-
Method Detail
-
self
protected GraphAPI.PostBlobCommand self()
- Specified by:
selfin classAuthenticatedAPIHandler.APIRequestConf<GraphAPI.PostBlobCommand,HiroMessage>
-
execute
public HiroMessage execute() throws HiroException, java.io.IOException, java.lang.InterruptedException
- Specified by:
executein classAuthenticatedAPIHandler.APIRequestConf<GraphAPI.PostBlobCommand,HiroMessage>- Returns:
- A
HiroMessagecontaining the contentId of the blob. - Throws:
HiroException- When the call returns a http status error.java.io.IOException- When the call got an IO error.java.lang.InterruptedException- When the call gets interrupted.java.lang.IllegalArgumentException- When the Content-Type is missing.
-
-