public class RestClassNamedV8 extends RestClassV8 implements SwaggerListVariables, SwaggerIsApplicable
RestClassV8.FieldInfo
HEADER_MIN_CACHE_PERIOD, PARAMETER_CURSOR_ID, PARAMETER_FIELDS, PARAMETER_KEY, PARAMETER_QUERY, PARAMETER_TOUCH, PARAMETER_VALUES
Constructor and Description |
---|
RestClassNamedV8() |
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 DBClassConcrete |
findClass(RestDefinition rd,
WebClient client) |
protected RestDefinition |
getClassRD(RestDefinition restDefinition) |
boolean |
isApplicable(Login login,
RestDefinition rd,
Method method) |
DBResult<RestDefinitionVariable> |
listSwaggerVariables(Login login,
RestDefinition rd,
Method method,
int mandatoryPathVariableDepth) |
protected java.lang.String |
makeCachePeriod(WebClient client,
RestDefinition rd) |
protected java.lang.String[] |
makeDefaultFields(WebClient client,
RestDefinition rd,
DBClassConcrete dbClass) |
protected java.lang.String[] |
makeFieldList(WebClient client,
RestDefinition rd,
DBClassConcrete dbClass) |
protected java.lang.String |
makeHref(RestDefinition rd,
DBClassConcrete dbClass) |
protected java.lang.String |
makeKeyParameter(WebClient client,
RestDefinition rd) |
protected java.lang.String |
makePath(RestDefinition rd,
DBClassConcrete dbClass) |
protected java.lang.String |
makeQuery(WebClient client,
RestDefinition rd) |
convertResult, getRawPath, makeJsonKey, makeValue, parseFields, parseValues, restCreate, restDelete, restRetrieve, restUpdate, swaggerFullList
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createArrayProperty, createBooleanProperty, createIntegerProperty, createNumberProperty, createObjectProperty, createStringProperty, getStandardProperty
protected DBClassConcrete findClass(@Nonnull RestDefinition rd, @Nullable WebClient client) throws ExceptionResponse
findClass
in class RestClassV8
ExceptionResponse
@CheckReturnValue @Nonnull protected java.lang.String makePath(@Nonnull RestDefinition rd, @Nonnull DBClassConcrete dbClass)
makePath
in class RestClassV8
protected RestDefinition getClassRD(@Nonnull RestDefinition restDefinition) throws java.lang.Exception
getClassRD
in class RestClassV8
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
listSwaggerVariables
in class RestClassV8
java.lang.Exception
@CheckReturnValue @Nonnull protected java.lang.String[] makeFieldList(@Nullable WebClient client, @Nonnull RestDefinition rd, @Nonnull DBClassConcrete dbClass) throws java.lang.Exception
makeFieldList
in class RestClassV8
java.lang.Exception
@CheckReturnValue @Nonnull protected java.lang.String[] makeDefaultFields(@Nullable WebClient client, @Nonnull RestDefinition rd, @Nonnull DBClassConcrete dbClass) throws java.lang.Exception
makeDefaultFields
in class RestClassV8
java.lang.Exception
@CheckReturnValue @Nonnull protected java.lang.String makeKeyParameter(@Nullable WebClient client, @Nonnull RestDefinition rd) throws java.lang.Exception
makeKeyParameter
in class RestClassV8
java.lang.Exception
@CheckReturnValue @Nonnull protected java.lang.String makeCachePeriod(@Nullable WebClient client, @Nonnull RestDefinition rd) throws java.lang.Exception
makeCachePeriod
in class RestClassV8
java.lang.Exception
@CheckReturnValue @Nonnull protected java.lang.String makeHref(@Nonnull RestDefinition rd, @Nonnull DBClassConcrete dbClass)
makeHref
in class RestClassV8
@CheckReturnValue @Nonnull protected java.lang.String makeQuery(@Nullable WebClient client, @Nonnull RestDefinition rd) throws java.lang.Exception
makeQuery
in class RestClassV8
java.lang.Exception
@CheckReturnValue public boolean isApplicable(@Nonnull Login login, @Nonnull RestDefinition rd, @Nonnull Method method) throws java.lang.Exception
isApplicable
in interface SwaggerIsApplicable
java.lang.Exception
@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
describeResponse
in class RestClassV8
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.stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.