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

com.threatconnect.sdk.client.reader.associate.AbstractOwnerAssociateReaderAdapter 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.associate;

import com.threatconnect.sdk.client.reader.AbstractBaseReaderAdapter;
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 AbstractOwnerAssociateReaderAdapter

extends AbstractBaseReaderAdapter implements OwnerAssociateReadable

{ public AbstractOwnerAssociateReaderAdapter(Connection conn, Class singleType, Class singleItemType, Class listType) { super(conn, singleType, singleItemType, listType); } @Override public IterableResponse getAssociatedOwners(P uniqueId) throws IOException, FailedResponseException { return getAssociatedOwners(uniqueId, null); } @Override public IterableResponse getAssociatedOwners(P uniqueId, String ownerName) throws IOException, FailedResponseException { Map map = createParamMap("id", uniqueId); return getItems(getUrlBasePrefix() + ".byId.owners", OwnerListResponse.class, Owner.class, ownerName, map); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy