public class RestSyncV7 extends java.lang.Object implements RestPluginProcess, SwaggerListVariables, SwaggerFullList, SwaggerResponses
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
PARAMETER_CLASS |
protected static java.lang.String |
PARAMETER_NEXT_URL_WITHOUT_PATHS |
protected static java.lang.String |
PARAMETER_PATHS |
Constructor and Description |
---|
RestSyncV7() |
Modifier and Type | Method and Description |
---|---|
void |
describeResponse(WebClient client,
RestDefinition rd,
Method method,
JSONObject responses,
JSONObject operationObj,
java.lang.String restPath,
JSONObject definitions)
describe the response format.
|
protected java.lang.String |
getBaseURI(RestDefinition rd) |
DBResult<RestDefinitionVariable> |
listSwaggerVariables(Login login,
RestDefinition rd,
Method method,
int mandatoryPathVariableDepth) |
protected java.lang.String |
makeClassNames(WebClient client,
RestDefinition rd) |
java.lang.String |
makeNext(RestDefinition rd,
DBClass[] classList,
java.util.Date from,
VirtualDB layer,
Path[] pathArray,
boolean nextUrlWithoutPaths,
boolean includeLayer,
long untilTS,
int offset,
boolean truncated,
java.util.Date since) |
protected java.lang.String |
makeNextUrlWithoutPaths(WebClient client,
RestDefinition rd) |
protected java.lang.String |
makePaths(WebClient client,
RestDefinition rd) |
java.lang.Object |
restCreate(WebClient client,
RestDefinition restDefinition,
MutableDataSource mds)
HTTP POST calls the the Create ReST service.
|
java.lang.Object |
restDelete(WebClient client,
RestDefinition restDefinition,
MutableDataSource mds)
HTTP DELETE calls the the Delete ReST service.
|
java.lang.Object |
restRetrieve(WebClient client,
RestDefinition rd,
ReadOnlyDataSource rds)
HTTP GET calls the the Retrieval ReST service.
|
java.lang.Object |
restUpdate(WebClient client,
RestDefinition restDefinition,
MutableDataSource mds)
HTTP PUT calls the the Update ReST service.
|
java.lang.String[] |
swaggerFullList(Login login,
RestDefinition rd,
Method method,
RestDefinitionVariable v,
java.lang.String[] list) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createArrayProperty, createBooleanProperty, createIntegerProperty, createNumberProperty, createObjectProperty, createStringProperty, getStandardProperty
protected static final java.lang.String PARAMETER_CLASS
protected static final java.lang.String PARAMETER_PATHS
protected static final java.lang.String PARAMETER_NEXT_URL_WITHOUT_PATHS
@CheckReturnValue public java.lang.Object restRetrieve(WebClient client, RestDefinition rd, ReadOnlyDataSource rds) throws java.lang.Exception
RestPluginProcess
restRetrieve
in interface RestPluginProcess
client
- the client. Null means check only of opsrd
- the definitionrds
- the data source to usejava.lang.UnsupportedOperationException
- if this method is NOT supported.java.lang.Exception
- an error has occurred.@CheckReturnValue @Nonnull protected java.lang.String makePaths(@Nonnull WebClient client, @Nonnull RestDefinition rd) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull protected java.lang.String makeClassNames(@Nonnull WebClient client, @Nonnull RestDefinition rd) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull protected java.lang.String makeNextUrlWithoutPaths(@Nonnull WebClient client, @Nonnull RestDefinition rd) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public java.lang.String makeNext(@Nonnull RestDefinition rd, @Nonnull DBClass[] classList, @Nonnull java.util.Date from, @Nonnull VirtualDB layer, @Nullable Path[] pathArray, boolean nextUrlWithoutPaths, boolean includeLayer, long untilTS, int offset, boolean truncated, @Nonnull java.util.Date since)
@CheckReturnValue @Nonnull protected java.lang.String getBaseURI(@Nonnull RestDefinition rd)
@Nullable public void describeResponse(@Nonnull WebClient client, @Nonnull RestDefinition rd, @Nonnull Method method, @Nonnull JSONObject responses, @Nonnull JSONObject operationObj, @Nonnull java.lang.String restPath, @Nonnull JSONObject definitions) throws java.lang.Exception
SwaggerResponses
describe the response format. Check https://swagger.io/docs/specification/describing-responses/ for details
sample:
{
"200": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/class_v8_GET"
}
},
"404": {
"description": "Not found"
}
}
describeResponse
in interface SwaggerResponses
client
- web clientrd
- rest definitionmethod
- methodresponses
- JSONObject that holds the responsesoperationObj
- the operation json for this service, such as GET /v8/class/Person/{_key} and GET /v8/class/Person are two different operation jsonrestPath
- rest path such as /v8/class/{className}/{_key}definitions
- $ref definition JSONObjectjava.lang.Exception
- a serious problem.public java.lang.Object restCreate(WebClient client, RestDefinition restDefinition, MutableDataSource mds) throws java.lang.Exception
RestPluginProcess
restCreate
in interface RestPluginProcess
client
- the client. Null means check only of opsrestDefinition
- the definitionmds
- the data source to usejava.lang.UnsupportedOperationException
- if this method is NOT supported.ExceptionResponse
- an error has occurred.java.lang.Exception
public java.lang.Object restUpdate(WebClient client, RestDefinition restDefinition, MutableDataSource mds) throws java.lang.Exception
RestPluginProcess
restUpdate
in interface RestPluginProcess
client
- the client. Null means check only of opsrestDefinition
- the definitionmds
- the data source to usejava.lang.UnsupportedOperationException
- if this method is NOT supported.ExceptionResponse
- an error has occurred.java.lang.Exception
public java.lang.Object restDelete(WebClient client, RestDefinition restDefinition, MutableDataSource mds) throws java.lang.Exception
RestPluginProcess
restDelete
in interface RestPluginProcess
client
- the client. Null means check only of opsrestDefinition
- the definitionmds
- the data source to use.java.lang.UnsupportedOperationException
- if this method is NOT supported.ExceptionResponse
- an error has occurred.java.lang.Exception
public DBResult<RestDefinitionVariable> listSwaggerVariables(@Nonnull Login login, @Nonnull RestDefinition rd, @Nonnull Method method, int mandatoryPathVariableDepth) throws java.lang.Exception
listSwaggerVariables
in interface SwaggerListVariables
java.lang.Exception
public java.lang.String[] swaggerFullList(@Nonnull Login login, @Nonnull RestDefinition rd, @Nonnull Method method, @Nonnull RestDefinitionVariable v, @Nonnull java.lang.String[] list) throws java.lang.Exception
swaggerFullList
in interface SwaggerFullList
java.lang.Exception
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.