Package org.silverpeas.core.webapi.wbe
Class AbstractWbeFileResource
- java.lang.Object
-
- org.silverpeas.core.webapi.wbe.AbstractWbeFileResource
-
- All Implemented Interfaces:
ProtectedWebResource
,WebAuthenticationValidation
,WebAuthorizationValidation
,SilverpeasWebResource
,WbeProtectedWebResource
public abstract class AbstractWbeFileResource extends Object implements WbeProtectedWebResource
- Author:
- silveryocha
-
-
Field Summary
-
Fields inherited from interface org.silverpeas.core.web.SilverpeasWebResource
BASE_PATH
-
-
Constructor Summary
Constructors Constructor Description AbstractWbeFileResource()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected WbeFileEditionContext
getEditionContext()
protected WbeHostManager
getHostManager()
WbeRequestContext
getSilverpeasContext()
Gets the context of Silverpeas linked to the current request.protected void
initContext()
protected javax.ws.rs.core.Response
process(Supplier<javax.ws.rs.core.Response> supplier)
Processes the given supplier after authorization checkingprotected abstract WbeFileWrapper
wrapWbeFile(WbeFile file)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.web.rs.ProtectedWebResource
validateUserAuthorization
-
Methods inherited from interface org.silverpeas.core.webapi.wbe.WbeProtectedWebResource
getComponentId, getHttpRequest, getUri, validateUserAuthentication
-
-
-
-
Method Detail
-
initContext
@PostConstruct protected void initContext()
-
getSilverpeasContext
public 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 interfaceWbeProtectedWebResource
- Specified by:
getSilverpeasContext
in interfaceWebAuthenticationValidation
- Specified by:
getSilverpeasContext
in interfaceWebAuthorizationValidation
- Returns:
SilverpeasRequestContext
instance.
-
process
protected javax.ws.rs.core.Response process(Supplier<javax.ws.rs.core.Response> supplier)
Processes the given supplier after authorization checking- Parameters:
supplier
- the supplier of response.- Returns:
- the response given by supplier.
-
wrapWbeFile
protected abstract WbeFileWrapper wrapWbeFile(WbeFile file)
-
getEditionContext
protected WbeFileEditionContext getEditionContext()
-
getHostManager
protected WbeHostManager getHostManager()
-
-