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

com.threatconnect.sdk.client.reader.AbstractOwnerReaderAdapter Maven / Gradle / Ivy

Go to download

The ThreatConnect Java SDK. Used to communicate with teh ThreatConnect Threat Intelligence Platform

The newest version!
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.threatconnect.sdk.client.reader;

import com.threatconnect.sdk.client.response.IterableResponse;
import com.threatconnect.sdk.conn.Connection;
import com.threatconnect.sdk.exception.FailedResponseException;
import com.threatconnect.sdk.server.entity.Owner;
import com.threatconnect.sdk.server.response.entity.OwnerListResponse;

import java.io.IOException;
import java.util.Map;

/**
 *
 * @author dtineo
 */
public abstract class AbstractOwnerReaderAdapter extends AbstractBaseReaderAdapter implements OwnerReadable {

    public AbstractOwnerReaderAdapter(Connection conn, Class singleType, Class singleItemType, Class listType) {
        super(conn, singleType, singleItemType, listType);
    }

    @Override
    public IterableResponse getOwners(String uniqueId) throws IOException, FailedResponseException {
        Map map = createParamMap("id", uniqueId);
        return getItems(getUrlBasePrefix() + ".byId.owners", OwnerListResponse.class, Owner.class, null, map);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy