T - instance of extended JaxRsApplication@Service public class RestletApplicationManager<T extends org.restlet.ext.jaxrs.JaxRsApplication> extends Object
JaxRsApplication for an specific version (for
example a simple major.minor (like 1.3) or prisma-1.3).| Constructor and Description |
|---|
RestletApplicationManager()
Default constructor for restlet application manager
|
| Modifier and Type | Method and Description |
|---|---|
T |
getApplication(String version)
Getting an registered
JaxRsApplication for specific version |
CommunoteRestletServletAdapter |
getServletAdapter(String version,
javax.servlet.ServletContext context)
Getter for the
CommunoteRestletServletAdapter. |
List<String> |
getVersions()
Getting all supported versions of the REST API sorted
|
void |
registerApplication(String version,
T application)
Register
JaxRsApplication for specific version. |
void |
unregisterApplication(String version)
Unregister
JaxRsApplication for specific version. |
public RestletApplicationManager()
public T getApplication(String version)
JaxRsApplication for specific versionversion - version of the application in the format major.minor like 1.3public CommunoteRestletServletAdapter getServletAdapter(String version, javax.servlet.ServletContext context)
CommunoteRestletServletAdapter. If
CommunoteRestletServletAdapter not exists, than create an instance, combine this with
the corresponding restlet application using the version and add this to an map.version - version of apicontext - ServletContextCommunoteRestletServletAdapterpublic List<String> getVersions()
public void registerApplication(String version, T application)
JaxRsApplication for specific version. The restlet application is setting to
an map using the version. The old CommunoteRestletServletAdapter is removed (when
exists) from specific map.version - version of the application in the format major.minor like 1.3application - instance of extended JaxRsApplicationpublic void unregisterApplication(String version)
JaxRsApplication for specific version. The
CommunoteRestletServletAdapter is removed when it exists.version - version of the application in the format major.minor like 1.3Copyright © 2019 Communote team. All rights reserved.