Package io.jmix.rest.impl.config
Class RestServicesConfiguration
java.lang.Object
io.jmix.rest.impl.config.RestServicesConfiguration
Class is used for loading and storing an information about service methods that are available for REST API.
information loaded from configuration files defined by the
jmix.rest.servicesConfig
application property.
Configuration file must define method name and method argument names that will be user for method invocation by the REST API.
Method parameter types can be omitted if the service doesn't contain an overloaded method with the same parameters number. Otherwise, types must be defined.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.beans.factory.BeanFactory
protected org.springframework.core.env.Environment
protected boolean
static final String
protected JmixModulesClasspathScanner
protected ReadWriteLock
protected Resources
protected Map<String,
RestServicesConfiguration.RestServiceInfo> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Method
_findMethod
(String serviceName, String methodName, List<RestServicesConfiguration.RestMethodParamInfo> paramInfos) protected void
getRestMethodInfo
(String serviceName, String methodName, String httpMethod, List<String> methodParamNames) getServiceInfo
(String serviceName) protected boolean
httpMethodMatches
(String httpMethod1, String httpMethod2) protected void
init()
protected void
protected void
protected void
loadConfig
(org.dom4j.Element rootElem) protected boolean
paramsMatches
(List<RestServicesConfiguration.RestMethodParamInfo> paramInfos, List<String> paramNames)
-
Field Details
-
JMIX_REST_SERVICES_CONFIG_PROP_NAME
- See Also:
-
serviceInfosMap
-
initialized
protected volatile boolean initialized -
lock
-
resources
-
environment
@Autowired protected org.springframework.core.env.Environment environment -
beanFactory
@Autowired protected org.springframework.beans.factory.BeanFactory beanFactory -
jmixModulesClasspathScanner
-
-
Constructor Details
-
RestServicesConfiguration
public RestServicesConfiguration()
-
-
Method Details
-
getRestMethodInfo
-
httpMethodMatches
-
paramsMatches
protected boolean paramsMatches(List<RestServicesConfiguration.RestMethodParamInfo> paramInfos, List<String> paramNames) -
checkInitialized
protected void checkInitialized() -
init
protected void init() -
loadConfig
protected void loadConfig() -
loadConfig
protected void loadConfig(org.dom4j.Element rootElem) -
loadAnnotations
protected void loadAnnotations() -
_findMethod
@Nullable protected Method _findMethod(String serviceName, String methodName, List<RestServicesConfiguration.RestMethodParamInfo> paramInfos) -
getServiceInfos
-
getServiceInfo
-