public abstract class AbstractWWGraphQLEndpoint extends Object implements IWWGraphQLEndpoint
parseResultContainer()
method
needs to be overloaded.Constructor and Description |
---|
AbstractWWGraphQLEndpoint(IWWClient client) |
Modifier and Type | Method and Description |
---|---|
void |
executeRequest()
Runs the main code to execute the GraphQL request on Watson Work Services.
|
Map<String,Object> |
getAliasedChildren() |
IWWClient |
getClient() |
Boolean |
getProfileDump() |
GraphQLRequest |
getRequest() |
GraphResultContainer |
getResultContainer() |
String |
getResultContent() |
Object |
parseResultContainer()
Parses the ResultContainer to return the relevant Java object of results.
|
void |
setProfileDump(Boolean profileDump) |
void |
setRequest(GraphQLRequest request) |
void |
setResultContainer(GraphResultContainer resultContainer) |
void |
setResultContent(String resultContent) |
public AbstractWWGraphQLEndpoint(IWWClient client)
client
- WWClient containing authentication details and tokenpublic IWWClient getClient()
getClient
in interface IWWGraphQLEndpoint
public GraphQLRequest getRequest()
getRequest
in interface IWWGraphQLEndpoint
public void setRequest(GraphQLRequest request)
setRequest
in interface IWWGraphQLEndpoint
request
- GraphQLRequest, request details to be passed to the endpointpublic GraphResultContainer getResultContainer()
getResultContainer
in interface IWWGraphQLEndpoint
IWWGraphQLEndpoint.executeRequest()
public void setResultContainer(GraphResultContainer resultContainer)
setResultContainer
in interface IWWGraphQLEndpoint
resultContainer
- GraphResultContainer generated by a successful IWWGraphQLEndpoint.executeRequest()
. Should not need overloading, but just in case, this method is still exposedpublic void executeRequest() throws WWException
IWWGraphQLEndpoint
IWWGraphQLEndpoint.setRequest(GraphQLRequest)
must be called before calling this method. This method should not need
overloading.executeRequest
in interface IWWGraphQLEndpoint
WWException
- containing an error message, if the request was unsuccessfulpublic String getResultContent()
getResultContent
in interface IWWGraphQLEndpoint
public void setResultContent(String resultContent)
setResultContent
in interface IWWGraphQLEndpoint
resultContent
- String raw JSON results as stringpublic Object parseResultContainer() throws WWException
IWWGraphQLEndpoint
parseResultContainer
in interface IWWGraphQLEndpoint
WWException
- containing an error message, if the request was unsuccessfulpublic Boolean getProfileDump()
getProfileDump
in interface IWWGraphQLEndpoint
public void setProfileDump(Boolean profileDump)
setProfileDump
in interface IWWGraphQLEndpoint
profileDump
- Boolean whether or not to dump profile data of query and response timepublic Map<String,Object> getAliasedChildren() throws WWException
WWException
Copyright © 2018 OpenNTF. All rights reserved.