class LogbookLifeCyclesClientRest extends DefaultClient implements LogbookLifeCyclesClient {

    @Override
    public LifeCycleStatusCode getUnitLifeCycleStatus(String unitId)
        throws LogbookClientNotFoundException, LogbookClientServerException {
        try (Response response = make(head().withPath(UNIT_LIFECYCLES_URL + "/" + unitId).withJsonAccept())) {
            check(response);
            if (response.getHeaderString(X_EVENT_STATUS) != null) {
                return LifeCycleStatusCode.valueOf(response.getHeaderString(X_EVENT_STATUS));
            }
            throw new LogbookClientServerException(ErrorMessage.INTERNAL_SERVER_ERROR.getMessage());
        } catch (PreconditionFailedClientException | VitamClientInternalException | LogbookClientBadRequestException | LogbookClientAlreadyExistsException e) {
            throw new LogbookClientServerException(ErrorMessage.INTERNAL_SERVER_ERROR.getMessage(), e);
        }
    }

      LogbookLifeCyclesClientRest(LogbookLifeCyclesClientFactory factory);

}