Class RestServiceHelper
- java.lang.Object
-
- de.xima.fc.api.rest.impl.common.util.RestServiceHelper
-
public class RestServiceHelper extends Object
Helper class for REST services.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static javax.ws.rs.core.Response
buildDefaultDownloadGetResponse(javax.servlet.http.HttpServletRequest servletRequest, javax.ws.rs.core.Request rsRequest, Supplier<ITransferableLockableEntity> fileSupplier)
static <TEntity extends Serializable>
javax.ws.rs.core.ResponsebuildDefaultResourceGetResponse(javax.servlet.http.HttpServletRequest servletRequest, javax.ws.rs.core.Request rsRequest, Supplier<TEntity> entitySupplier, BiFunction<TEntity,Locale,IResource> resourceConverter)
static <TEntity extends Serializable>
javax.ws.rs.core.ResponsebuildDefaultResourcePageGetResponse(javax.servlet.http.HttpServletRequest servletRequest, javax.ws.rs.core.Request rsRequest, Supplier<PagedResult<TEntity>> pagedResultSupplier, BiFunction<PagedResult<TEntity>,Locale,IResourcePage<?>> resourcePageConverter)
static javax.ws.rs.core.Response
buildDefaultZippedDownloadResponse(javax.servlet.http.HttpServletRequest servletRequest, javax.ws.rs.core.Request rsRequest, String fileName, Supplier<List<? extends ITransferableLockableEntity>> filesSupplier)
static javax.ws.rs.WebApplicationException
toWebApplicationException(Exception e, String fallbackErrorMsg)
-
-
-
Method Detail
-
buildDefaultResourceGetResponse
public static <TEntity extends Serializable> javax.ws.rs.core.Response buildDefaultResourceGetResponse(javax.servlet.http.HttpServletRequest servletRequest, javax.ws.rs.core.Request rsRequest, Supplier<TEntity> entitySupplier, BiFunction<TEntity,Locale,IResource> resourceConverter)
-
buildDefaultResourcePageGetResponse
public static <TEntity extends Serializable> javax.ws.rs.core.Response buildDefaultResourcePageGetResponse(javax.servlet.http.HttpServletRequest servletRequest, javax.ws.rs.core.Request rsRequest, Supplier<PagedResult<TEntity>> pagedResultSupplier, BiFunction<PagedResult<TEntity>,Locale,IResourcePage<?>> resourcePageConverter)
-
buildDefaultDownloadGetResponse
public static javax.ws.rs.core.Response buildDefaultDownloadGetResponse(javax.servlet.http.HttpServletRequest servletRequest, javax.ws.rs.core.Request rsRequest, Supplier<ITransferableLockableEntity> fileSupplier)
-
buildDefaultZippedDownloadResponse
public static javax.ws.rs.core.Response buildDefaultZippedDownloadResponse(javax.servlet.http.HttpServletRequest servletRequest, javax.ws.rs.core.Request rsRequest, String fileName, Supplier<List<? extends ITransferableLockableEntity>> filesSupplier)
-
-