Interface ClientType
- All Known Implementing Classes:
ClientTypeImpl
public interface ClientType
If you need to handle a case which uses for example almost the same code for frontend (public) and backend (admin),
you can use this service in order to get the type of the client where this request comes from.
It may be "unknown" if the request header is not sent from client.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Admin application.static final String
All requests (that do not overwrite the default client type) from the new clientstatic final String
Public, e.g.static final String
All requests from a legacy actionstatic final String
REST call (determined using the servletPath of the rest servlet)static final String
If it is not known where this request comes from (i.e.static final String
All requests (that do not overwrite the default client type) from the new client widgets -
Method Summary
-
Field Details
-
UNKNOWN
If it is not known where this request comes from (i.e. header not sent from client).- See Also:
-
FRONTEND
Public, e.g. flows.- See Also:
-
BACKEND
Admin application.- See Also:
-
REST
REST call (determined using the servletPath of the rest servlet)- See Also:
-
CLIENT
All requests (that do not overwrite the default client type) from the new client- See Also:
-
WIDGET
All requests (that do not overwrite the default client type) from the new client widgets- See Also:
-
LEGACY_ACTIONS
All requests from a legacy action- See Also:
-
-
Method Details
-
getType
String getType()Returns the client type. Use defined constants from this interface. -
setType
Internal only. Please do not use unless you know what you are doing. -
withClientType
This may be used to run code in another ClientType.
-