Package org.apache.solr.api
Class AnnotatedApi
- java.lang.Object
-
- org.apache.solr.api.Api
-
- org.apache.solr.api.AnnotatedApi
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,SpecProvider
,PermissionNameProvider
public class AnnotatedApi extends Api implements PermissionNameProvider, Closeable
This class implements an Api just from an annotated java class The class must have an annotationEndPoint
Each method must have an annotationCommand
The methods that implement a command should have the first 2 parametersSolrQueryRequest
andSolrQueryResponse
or it may optionally have a third parameter which could be a java class annotated with jackson annotations. The third parameter is only valid if it is using a json command payload
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.solr.security.PermissionNameProvider
PermissionNameProvider.Name
-
-
Field Summary
Fields Modifier and Type Field Description static String
ERR
-
Fields inherited from class org.apache.solr.api.Api
commandSchema, spec
-
Fields inherited from interface org.apache.solr.security.PermissionNameProvider
ANY, NULL, values
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
call(SolrQueryRequest req, SolrQueryResponse rsp)
The method that gets called for each requestvoid
close()
static Map<String,Object>
createSchema(Method m)
static List<Api>
getApis(Class<? extends Object> klas, Object obj)
static List<Api>
getApis(Object obj)
EndPoint
getEndPoint()
PermissionNameProvider.Name
getPermissionName(AuthorizationContext request)
-
Methods inherited from class org.apache.solr.api.Api
getCommandSchema, getSpec
-
-
-
-
Field Detail
-
ERR
public static final String ERR
- See Also:
- Constant Field Values
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
getEndPoint
public EndPoint getEndPoint()
-
getPermissionName
public PermissionNameProvider.Name getPermissionName(AuthorizationContext request)
- Specified by:
getPermissionName
in interfacePermissionNameProvider
-
call
public void call(SolrQueryRequest req, SolrQueryResponse rsp)
Description copied from class:Api
The method that gets called for each request
-
-