class ApplicationSlaManagementResource implements ApplicationSlaManagementEndpoint {

    @GET
    @Path("/{applicationName}")
    @Override
    public ApplicationSlaRepresentation getApplicationSLA(@PathParam("applicationName") String applicationName,
                                                          @QueryParam("extended") boolean extended) {
        ApplicationSLA applicationSLA = applicationSlaManagementService.getApplicationSLA(applicationName);
        if (applicationSLA == null) {
            throw new WebApplicationException(new IllegalArgumentException("SLA not defined for " + applicationName), Status.NOT_FOUND);
        }

        String cellId = extended ? configuration.getCellName() : null;
        ReservationUsage reservationUsage = extended ? reservationUsageCalculator.buildCapacityGroupUsage(applicationName) : null;

        return asRepresentation(applicationSLA, cellId, reservationUsage);
    }

    @Inject public  ApplicationSlaManagementResource(MasterConfiguration configuration,
                                            ApplicationSlaManagementService applicationSlaManagementService,
                                            ReservationUsageCalculator reservationUsageCalculator);

}