package com.megatim.fdxconsultation.service.impl.settings;
|
|
import com.megatim.fdxcommons.model.referentiel.Referentiel;
|
import com.megatim.fdxconsultation.core.ifaces.settings.SettingsManager;
|
import com.megatim.fdxconsultation.model.referentiel.dtos.ReferentielSlimResponse;
|
import com.megatim.fdxconsultation.service.ifaces.settings.SettingRS;
|
import javax.inject.Inject;
|
import javax.ws.rs.Path;
|
import javax.ws.rs.core.HttpHeaders;
|
import javax.ws.rs.core.Response;
|
|
/**
|
*
|
* @author Gabuntu
|
*/
|
@Path("settings")
|
public class SettingRSImpl implements SettingRS {
|
|
@Inject
|
private SettingsManager settingManager;
|
|
@Override
|
public Response currentReferentiel(HttpHeaders headers) {
|
Referentiel referentiel = settingManager.currentReferentiel();
|
return Response.ok(referentiel != null ? new ReferentielSlimResponse(referentiel) : null).build();
|
}
|
|
}
|