@Documented @Target(value=METHOD) @Retention(value=RUNTIME) public @interface OARestMethod
Important: this annotation needs to be added to the Java Interface, not the Impl class.
Modifier and Type | Optional Element and Description |
---|---|
String |
includePropertyPath
PropertyPath to include in OAGraph result.
|
String[] |
includePropertyPaths
PropertyPath to include in OAGraph result.
|
int |
includeReferenceLevelAmount
Number of reference levels to include in OAGraph result.
|
String |
methodName
The method name for remote method calls.
|
OARestMethod.MethodType |
methodType |
String |
name |
int |
pageSize
value used as the page size for returns that are collection of values (zero or more).
A value <= 0 will use the servers default pagesize. |
Class |
returnClass
Type of return class.
|
String |
searchOrderBy
Search Query OrderBy to use.
|
String |
searchWhere
search Query to use, with ?tags from param(s) with type=SearchWhereTagValue.
|
String |
urlPath
URL path for endpoint.
|
String |
urlQuery
http query string.
|
public abstract OARestMethod.MethodType methodType
public abstract String name
public abstract String urlPath
Supports path template names, example: "/emp/{id}/{name}"
tags (case insensitive) are filled in from method params with paramType==UrlPathValue, and must have the @RestParam.name defined to
match name used in template.
Used by non-OA* method types
Supports path template {name}, example: "/emp/{id}"
Supports path template ?tags, example: "/emp/?/?"
? tags will use method params with paramType==UrlPathValue, to fill in from left to right.
verify: if tags names, that there are matching param(s) with matching name for all {x} tags
verify: if ?tags, that there are matching paramType==UrlPathValue
verify: cant mix {} and ? tags
public abstract String urlQuery
verify: ignores leading '?'
public abstract String searchWhere
only used when methodType=OASearch
verify: query ?tags having mathcing params with type=SearchWhereTagValue
public abstract String searchOrderBy
only used when methodType=OASearch
verify: RestMethod.queryWhere is not empty, and param type=MethodQueryOrderBy is not empty
public abstract String includePropertyPath
only used when methodType=OA*
public abstract String[] includePropertyPaths
only used when methodType=OA*
public abstract int includeReferenceLevelAmount
only used when methodType=OA*
public abstract String methodName
only used by methodType=OAObjectMethodCall, or methodType=OARemote
public abstract int pageSize
This will be added as an http query value "pageSize"
verify: only needed when return value is array,List,Hub
verify: pageNumber is required if pageSize>0
public abstract Class returnClass
Note: generics are able to be discovered for return values (not affected by generics erasure).
Note: calling OARestMethodInfo.verify() will check to see if returnClass is needed or not.
Copyright © 1999–2025 ViaOA. All rights reserved.