Package com.jalios.jcms.rest
Class RestManager
java.lang.Object
com.jalios.jcms.rest.RestManager
Hold JCMS configuration of OpenAPI.
RestResource may be added.
- Since:
- JCMS-6.0
- Author:
- dissert
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddResourcesMap(Plugin plugin, Map<String, Class<? extends JcmsRestResource>> resourcesMap) booleanReturns true if the given IP address is authorized for read for REST request.booleanReturns true if the given IP address is authorized for write for REST request.static final RestManagervoidinit()Initialize the RestManager.
This method can be called multiple time during the lifetime of the site, for example on properties change.booleanisEnable()booleanbooleanvoidremoveResources(Map<String, Class<? extends JcmsRestResource>> resourcesMap) void
-
Field Details
-
PROPKEY_ENABLE
- See Also:
-
PROPKEY_READACCESS_ENABLE
- See Also:
-
PROPKEY_READACCESS_IPFILTER
- See Also:
-
PROPKEY_WRITEACCESS_ENABLE
- See Also:
-
PROPKEY_WRITEACCESS_IPFILTER
- See Also:
-
-
Method Details
-
getInstance
-
init
public void init()Initialize the RestManager.
This method can be called multiple time during the lifetime of the site, for example on properties change. -
checkReadAccessIP
Returns true if the given IP address is authorized for read for REST request. (It doesn't check if either Rest is enabled or Read access is enabled).- Parameters:
ip- the IP address to be checked- Returns:
- true if the given IP address is authorized.
-
checkWriteAccessIP
Returns true if the given IP address is authorized for write for REST request. (It doesn't check if either Rest is enabled or Write access is enabled).- Parameters:
ip- the IP address to be checked- Returns:
- true if the given IP address is authorized.
-
isEnable
public boolean isEnable() -
isReadAccessEnable
public boolean isReadAccessEnable() -
isWriteAccessEnable
public boolean isWriteAccessEnable() -
addResourcesMap
public void addResourcesMap(Plugin plugin, Map<String, Class<? extends JcmsRestResource>> resourcesMap) -
removeResources
-
getExtendedResourcesMap
-
setApplication
-
addResource
public void addResource()
-