Class UserPortalRestConfigManager
- java.lang.Object
-
- de.xima.fc.user_portal.api.config.UserPortalRestConfigManager
-
@ApplicationScoped public class UserPortalRestConfigManager extends Object
-
-
Constructor Summary
Constructors Constructor Description UserPortalRestConfigManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IUserPortalRestClientConfig
config(String url)
Gets the local user portal REST API configuration for the server sending a request to itself.IUserPortalRestClientConfig
localConfig(javax.servlet.http.HttpServletRequest request)
Gets the local user portal REST API configuration for the server sending a request to itself.String
localUrl(javax.servlet.http.HttpServletRequest request)
Gets the local (loopback) base URL for the user portal REST API.void
onServletContextInitialized(javax.servlet.ServletContext context)
IUserPortalRestClientConfig
remoteConfig(javax.servlet.http.HttpServletRequest request)
Gets the remote user portal REST API configuration for the client sending a request to the server.String
remoteUrl(javax.servlet.http.HttpServletRequest request)
Gets the remote base URL for the user portal REST API.
-
-
-
Method Detail
-
config
public IUserPortalRestClientConfig config(String url)
Gets the local user portal REST API configuration for the server sending a request to itself.- Returns:
- The default user portal REST API configuration.
-
localConfig
public IUserPortalRestClientConfig localConfig(javax.servlet.http.HttpServletRequest request)
Gets the local user portal REST API configuration for the server sending a request to itself.- Returns:
- The default user portal REST API configuration.
-
localUrl
public String localUrl(javax.servlet.http.HttpServletRequest request)
Gets the local (loopback) base URL for the user portal REST API.- Parameters:
request
- The current servlet request.- Returns:
- The local base URL.
-
onServletContextInitialized
public void onServletContextInitialized(@Observes @Initialized(javax.enterprise.context.ApplicationScoped.class) javax.servlet.ServletContext context)
-
remoteConfig
public IUserPortalRestClientConfig remoteConfig(javax.servlet.http.HttpServletRequest request)
Gets the remote user portal REST API configuration for the client sending a request to the server.- Returns:
- The default user portal REST API configuration.
-
remoteUrl
public String remoteUrl(javax.servlet.http.HttpServletRequest request)
Gets the remote base URL for the user portal REST API.- Returns:
- The remote base URL.
-
-