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
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.beans.factory.BeanFactoryprotected org.springframework.core.env.Environmentprotected booleanstatic final Stringprotected ReadWriteLockprotected Resourcesprotected Map<String,RestServicesConfiguration.RestServiceInfo> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Method_findMethod(String serviceName, String methodName, List<RestServicesConfiguration.RestMethodParamInfo> paramInfos) protected voidgetRestMethodInfo(String serviceName, String methodName, String httpMethod, List<String> methodParamNames) getServiceInfo(String serviceName) protected booleanhttpMethodMatches(String httpMethod1, String httpMethod2) protected voidinit()protected voidloadConfig(org.dom4j.Element rootElem) protected booleanparamsMatches(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
-
-
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(org.dom4j.Element rootElem) -
_findMethod
@Nullable protected Method _findMethod(String serviceName, String methodName, List<RestServicesConfiguration.RestMethodParamInfo> paramInfos) -
getServiceInfos
-
getServiceInfo
-