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,org.apache.solr.common.SpecProvider,PermissionNameProvider
This class implements an Api just from an annotated java class The class must have an annotation
EndPoint Each method must have an annotation Command The methods that implement a
command should have the first 2 parameters SolrQueryRequest and SolrQueryResponse
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
FieldsFields inherited from class org.apache.solr.api.Api
commandSchema, specFields inherited from interface org.apache.solr.security.PermissionNameProvider
ANY, NULL, values -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAnnotatedApi(org.apache.solr.common.SpecProvider specProvider, EndPoint endPoint, Map<String, org.apache.solr.api.AnnotatedApi.Cmd> commands, Api fallback) -
Method Summary
Modifier and TypeMethodDescriptionvoidcall(SolrQueryRequest req, SolrQueryResponse rsp) The method that gets called for each requestvoidclose()Get a list of Api-s supported by this class.getPermissionName(AuthorizationContext request) Methods inherited from class org.apache.solr.api.Api
getCommandSchema, getSpec
-
Field Details
-
ERR
- See Also:
-
-
Constructor Details
-
AnnotatedApi
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getEndPoint
-
getCommands
-
getApis
-
getApis
Get a list of Api-s supported by this class.- Parameters:
theClass- classobj- object of this class (may be null)allowEmpty- if false then an exception is thrown if no Api-s can be retrieved, if true then absence of Api-s is silently ignored.- Returns:
- list of discovered Api-s
-
getPermissionName
- Specified by:
getPermissionNamein interfacePermissionNameProvider
-
call
Description copied from class:ApiThe method that gets called for each request -
createSchema
-