All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.securecodebox.persistence.defectdojo.service.EndpointService Maven / Gradle / Ivy

The newest version!
// SPDX-FileCopyrightText: the secureCodeBox authors
//
// SPDX-License-Identifier: Apache-2.0

package io.securecodebox.persistence.defectdojo.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import io.securecodebox.persistence.defectdojo.config.Config;
import io.securecodebox.persistence.defectdojo.model.Endpoint;
import io.securecodebox.persistence.defectdojo.model.PaginatedResult;
import lombok.NonNull;

public class EndpointService extends GenericDefectDojoService {
  public EndpointService(Config config) {
    super(config);
  }

  @Override
  protected String getUrlPath() {
    return "endpoints";
  }

  @Override
  protected Class getModelClass() {
    return Endpoint.class;
  }

  @Override
  protected PaginatedResult deserializeList(@NonNull String response) throws JsonProcessingException {
    return this.objectMapper.readValue(response, new TypeReference<>() {
    });
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy