Package org.silverpeas.core.webapi.wbe
Interface WbeProtectedWebResource
-
- All Superinterfaces:
ProtectedWebResource
,SilverpeasWebResource
,WebAuthenticationValidation
,WebAuthorizationValidation
- All Known Implementing Classes:
AbstractWbeFileResource
public interface WbeProtectedWebResource extends ProtectedWebResource
All WEB services handling the WBE host requests must implement this interface.
- Author:
- silveryocha
-
-
Field Summary
-
Fields inherited from interface org.silverpeas.core.web.SilverpeasWebResource
BASE_PATH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default String
getComponentId()
Gets the identifier of the component instance to which the requested resource belongs to.default javax.servlet.http.HttpServletRequest
getHttpRequest()
Gets the current HTTP request received by this Web resource.WbeRequestContext
getSilverpeasContext()
Gets the context of Silverpeas linked to the current request.default WebResourceUri
getUri()
Gets the URI targeted by the current HTTP request in the form of aWebResourceUri
.default void
validateUserAuthentication(UserPrivilegeValidation validation)
Validates the authentication of the user requesting currently a web endpoint by using the specified user privilege validation service.-
Methods inherited from interface org.silverpeas.core.web.rs.ProtectedWebResource
validateUserAuthorization
-
-
-
-
Method Detail
-
getSilverpeasContext
WbeRequestContext getSilverpeasContext()
Description copied from interface:WebAuthenticationValidation
Gets the context of Silverpeas linked to the current request. This context must be initialized before the functional request processing.- Specified by:
getSilverpeasContext
in interfaceWebAuthenticationValidation
- Specified by:
getSilverpeasContext
in interfaceWebAuthorizationValidation
- Returns:
SilverpeasRequestContext
instance.
-
validateUserAuthentication
default void validateUserAuthentication(UserPrivilegeValidation validation)
Description copied from interface:WebAuthenticationValidation
Validates the authentication of the user requesting currently a web endpoint by using the specified user privilege validation service. If no session was opened for the user, then open a new one.This method should be invoked for web services requiring an authenticated user. Otherwise, the annotation
Authenticated
can be also used instead at class level.- Specified by:
validateUserAuthentication
in interfaceWebAuthenticationValidation
- Parameters:
validation
- the validation instance to use.- See Also:
UserPrivilegeValidator
-
getHttpRequest
default javax.servlet.http.HttpServletRequest getHttpRequest()
Description copied from interface:SilverpeasWebResource
Gets the current HTTP request received by this Web resource.- Specified by:
getHttpRequest
in interfaceSilverpeasWebResource
- Returns:
- the current HTTP request.
-
getUri
default WebResourceUri getUri()
Description copied from interface:SilverpeasWebResource
Gets the URI targeted by the current HTTP request in the form of aWebResourceUri
.- Specified by:
getUri
in interfaceSilverpeasWebResource
- Returns:
- the
WebResourceUri
initialized with the URI request.
-
getComponentId
default String getComponentId()
Description copied from interface:SilverpeasWebResource
Gets the identifier of the component instance to which the requested resource belongs to.- Specified by:
getComponentId
in interfaceSilverpeasWebResource
- Returns:
- the identifier of the Silverpeas component instance.
-
-