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 IWWGraphQLEndpointpublic GraphQLRequest getRequest()
getRequest in interface IWWGraphQLEndpointpublic void setRequest(GraphQLRequest request)
setRequest in interface IWWGraphQLEndpointrequest - GraphQLRequest, request details to be passed to the endpointpublic GraphResultContainer getResultContainer()
getResultContainer in interface IWWGraphQLEndpointIWWGraphQLEndpoint.executeRequest()public void setResultContainer(GraphResultContainer resultContainer)
setResultContainer in interface IWWGraphQLEndpointresultContainer - GraphResultContainer generated by a successful IWWGraphQLEndpoint.executeRequest(). Should not need overloading, but just in case, this method is still exposedpublic void executeRequest()
throws WWException
IWWGraphQLEndpointIWWGraphQLEndpoint.setRequest(GraphQLRequest) must be called before calling this method. This method should not need
overloading.executeRequest in interface IWWGraphQLEndpointWWException - containing an error message, if the request was unsuccessfulpublic String getResultContent()
getResultContent in interface IWWGraphQLEndpointpublic void setResultContent(String resultContent)
setResultContent in interface IWWGraphQLEndpointresultContent - String raw JSON results as stringpublic Object parseResultContainer() throws WWException
IWWGraphQLEndpointparseResultContainer in interface IWWGraphQLEndpointWWException - containing an error message, if the request was unsuccessfulpublic Boolean getProfileDump()
getProfileDump in interface IWWGraphQLEndpointpublic void setProfileDump(Boolean profileDump)
setProfileDump in interface IWWGraphQLEndpointprofileDump - Boolean whether or not to dump profile data of query and response timepublic Map<String,Object> getAliasedChildren() throws WWException
WWExceptionCopyright © 2018 OpenNTF. All rights reserved.