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

io.securecodebox.persistence.defectdojo.service.EngagementService 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.Engagement;
import io.securecodebox.persistence.defectdojo.model.PaginatedResult;
import lombok.NonNull;

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy