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

com.hp.autonomy.hod.client.api.HavenOnDemandService Maven / Gradle / Ivy

There is a newer version: 0.25.3
Show newest version
/*
 * Copyright 2015-2016 Hewlett-Packard Development Company, L.P.
 * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
 */

package com.hp.autonomy.hod.client.api;

import com.hp.autonomy.hod.client.api.authentication.TokenType;
import com.hp.autonomy.hod.client.error.HodErrorException;
import com.hp.autonomy.hod.client.job.JobId;
import com.hp.autonomy.hod.client.token.TokenProxy;

import java.util.Map;

/**
 * Service which allows arbitrary requests to be made to HP Haven OnDemand
 */
public interface HavenOnDemandService {

    /**
     * Sends a GET request to the given API
     * @param tokenProxy The token proxy to use
     * @param api The name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API. These should include a token
     * @param returnType The expected return type from HP Haven OnDemand. Pass in Map.class if you don't have a more
     * specific response type
     * @return A representation of the result from HP Haven OnDemand
     * @throws HodErrorException
     */
     T get(
        TokenProxy tokenProxy,
        String api,
        int version,
        Map params,
        Class returnType
    ) throws HodErrorException;

    /**
     * Sends a GET request to the given API
     * @param tokenProxy The token proxy to use
     * @param first The first part of the name of the API
     * @param second The second part of the name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API. These should include a token
     * @param returnType The expected return type from HP Haven OnDemand. Pass in Map.class if you don't have a more
     * specific response type
     * @return A representation of the result from HP Haven OnDemand
     * @throws HodErrorException
     */
     T get(
        TokenProxy tokenProxy,
        String first,
        String second,
        int version,
        Map params,
        Class returnType
    ) throws HodErrorException;

    /**
     * Sends a GET request to the given API
     * @param tokenProxy The token proxy to use
     * @param first The first part of the name of the API
     * @param second The second part of the name of the API
     * @param third The third part of the name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API. These should include a token
     * @param returnType The expected return type from HP Haven OnDemand. Pass in Map.class if you don't have a more
     * specific response type
     * @return A representation of the result from HP Haven OnDemand
     * @throws HodErrorException
     */
     T get(
        TokenProxy tokenProxy,
        String first,
        String second,
        String third,
        int version,
        Map params,
        Class returnType
    ) throws HodErrorException;

    /**
     * Sends a GET request to the given API asynchronously
     * @param tokenProxy The token proxy to use
     * @param api The name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API
     * @return The job ID of the request
     * @throws HodErrorException
     */
    JobId getAsync(
        TokenProxy tokenProxy,
        String api,
        int version,
        Map params
    ) throws HodErrorException;

    /**
     * Sends a GET request to the given API asynchronously
     * @param tokenProxy The token proxy to use
     * @param first The first part of the name of the API
     * @param second The second part of the name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API
     * @return The job ID of the request
     * @throws HodErrorException
     */
    JobId getAsync(
        TokenProxy tokenProxy,
        String first,
        String second,
        int version,
        Map params
    ) throws HodErrorException;

    /**
     * Sends a GET request to the given API asynchronously
     * @param tokenProxy The token proxy to use
     * @param first The first part of the name of the API
     * @param second The second part of the name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API
     * @return The job ID of the request
     * @throws HodErrorException
     */
    JobId getAsync(
        TokenProxy tokenProxy,
        String first,
        String second,
        String third,
        int version,
        Map params
    ) throws HodErrorException;

    /**
     * Sends a POST request to the given API
     * @param tokenProxy The token proxy to use
     * @param api The name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API
     * @param returnType The expected return type from HP Haven OnDemand. Pass in Map.class if you don't have a more
     * specific response type
     * @return A representation of the result from HP Haven OnDemand
     * @throws HodErrorException
     */
     T post(
        TokenProxy tokenProxy,
        String api,
        int version,
        Map params,
        Class returnType
    ) throws HodErrorException;

    /**
     * Sends a POST request to the given API
     * @param tokenProxy The token proxy to use
     * @param first The first part of the name of the API
     * @param second The second part of the name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API
     * @param returnType The expected return type from HP Haven OnDemand. Pass in Map.class if you don't have a more
     * specific response type
     * @return A representation of the result from HP Haven OnDemand
     * @throws HodErrorException
     */
     T post(
        TokenProxy tokenProxy,
        String first,
        String second,
        int version,
        Map params,
        Class returnType
    ) throws HodErrorException;

    /**
     * Sends a POST request to the given API
     * @param tokenProxy The token proxy to use
     * @param first The first part of the name of the API
     * @param second The second part of the name of the API
     * @param third The third part of the name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API
     * @param returnType The expected return type from HP Haven OnDemand. Pass in Map.class if you don't have a more
     * specific response type
     * @return A representation of the result from HP Haven OnDemand
     * @throws HodErrorException
     */
     T post(
        TokenProxy tokenProxy,
        String first,
        String second,
        String third,
        int version,
        Map params,
        Class returnType
    ) throws HodErrorException;

    /**
     * Sends a POST request to the given API asynchronously
     * @param tokenProxy The token proxy to use
     * @param api The name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API
     * @return A Map representing the result from HP Haven OnDemand
     * @throws HodErrorException
     */
    JobId postAsync(
        TokenProxy tokenProxy,
        String api,
        int version,
        Map params
    ) throws HodErrorException;

    /**
     * Sends a POST request to the given API asynchronously
     * @param tokenProxy The token proxy to use
     * @param first The first part of the name of the API
     * @param second The second part of the name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API
     * @return A Map representing the result from HP Haven OnDemand
     * @throws HodErrorException
     */
    JobId postAsync(
        TokenProxy tokenProxy,
        String first,
        String second,
        int version,
        Map params
    ) throws HodErrorException;

    /**
     * Sends a POST request to the given API asynchronously
     * @param tokenProxy The token proxy to use
     * @param first The first part of the name of the API
     * @param second The second part of the name of the API
     * @param third The third part of the name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API
     * @return A Map representing the result from HP Haven OnDemand
     * @throws HodErrorException
     */
    JobId postAsync(
        TokenProxy tokenProxy,
        String first,
        String second,
        String third,
        int version,
        Map params
    ) throws HodErrorException;

    /**
     * Sends a PUT request to the given API
     * @param tokenProxy The token proxy to use
     * @param api The name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API
     * @param returnType The expected return type from HP Haven OnDemand. Pass in Map.class if you don't have a more
     * specific response type
     * @return A representation of the result from HP Haven OnDemand
     * @throws HodErrorException
     */
     T put(
        TokenProxy tokenProxy,
        String api,
        int version,
        Map params,
        Class returnType
    ) throws HodErrorException;

    /**
     * Sends a PUT request to the given API
     * @param tokenProxy The token proxy to use
     * @param first The first part of the name of the API
     * @param second The second part of the name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API
     * @param returnType The expected return type from HP Haven OnDemand. Pass in Map.class if you don't have a more
     * specific response type
     * @return A representation of the result from HP Haven OnDemand
     * @throws HodErrorException
     */
     T put(
        TokenProxy tokenProxy,
        String first,
        String second,
        int version,
        Map params,
        Class returnType
    ) throws HodErrorException;

    /**
     * Sends a PUT request to the given API
     * @param tokenProxy The token proxy to use
     * @param first The first part of the name of the API
     * @param second The second part of the name of the API
     * @param third The third part of the name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API
     * @param returnType The expected return type from HP Haven OnDemand. Pass in Map.class if you don't have a more
     * specific response type
     * @return A representation of the result from HP Haven OnDemand
     * @throws HodErrorException
     */
     T put(
        TokenProxy tokenProxy,
        String first,
        String second,
        String third,
        int version,
        Map params,
        Class returnType
    ) throws HodErrorException;

    /**
     * Sends a PUT request to the given API asynchronously
     * @param tokenProxy The token proxy to use
     * @param api The name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API
     * @return The job ID of the request
     * @throws HodErrorException
     */
    JobId putAsync(
        TokenProxy tokenProxy,
        String api,
        int version,
        Map params
    ) throws HodErrorException;

    /**
     * Sends a PUT request to the given API asynchronously
     * @param tokenProxy The token proxy to use
     * @param first The first part of the name of the API
     * @param second The second part of the name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API
     * @return The job ID of the request
     * @throws HodErrorException
     */
    JobId putAsync(
        TokenProxy tokenProxy,
        String first,
        String second,
        int version,
        Map params
    ) throws HodErrorException;

    /**
     * Sends a PUT request to the given API asynchronously
     * @param tokenProxy The token proxy to use
     * @param first The first part of the name of the API
     * @param second The second part of the name of the API
     * @param third The third part of the name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API
     * @return The job ID of the request
     * @throws HodErrorException
     */
    JobId putAsync(
        TokenProxy tokenProxy,
        String first,
        String second,
        String third,
        int version,
        Map params
    ) throws HodErrorException;

    /**
     * Sends a DELETE request to the given API
     * @param tokenProxy The token proxy to use
     * @param api The name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API. These should include a token
     * @param returnType The expected return type from HP Haven OnDemand. Pass in Map.class if you don't have a more
     * specific response type
     * @return A representation of the result from HP Haven OnDemand
     * @throws HodErrorException
     */
     T delete(
        TokenProxy tokenProxy,
        String api,
        int version,
        Map params,
        Class returnType
    ) throws HodErrorException;

    /**
     * Sends a DELETE request to the given API
     * @param tokenProxy The token proxy to use
     * @param first The first part of the name of the API
     * @param second The second part of the name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API. These should include a token
     * @param returnType The expected return type from HP Haven OnDemand. Pass in Map.class if you don't have a more
     * specific response type
     * @return A representation of the result from HP Haven OnDemand
     * @throws HodErrorException
     */
     T delete(
        TokenProxy tokenProxy,
        String first,
        String second,
        int version,
        Map params,
        Class returnType
    ) throws HodErrorException;

    /**
     * Sends a DELETE request to the given API
     * @param tokenProxy The token proxy to use
     * @param first The first part of the name of the API
     * @param second The second part of the name of the API
     * @param third The third part of the name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API. These should include a token
     * @param returnType The expected return type from HP Haven OnDemand. Pass in Map.class if you don't have a more
     * specific response type
     * @return A representation of the result from HP Haven OnDemand
     * @throws HodErrorException
     */
     T delete(
        TokenProxy tokenProxy,
        String first,
        String second,
        String third,
        int version,
        Map params,
        Class returnType
    ) throws HodErrorException;

    /**
     * Sends a DELETE request to the given API asynchronously
     * @param tokenProxy The token proxy to use
     * @param api The name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API
     * @return The job ID of the request
     * @throws HodErrorException
     */
    JobId deleteAsync(
        TokenProxy tokenProxy,
        String api,
        int version,
        Map params
    ) throws HodErrorException;

    /**
     * Sends a DELETE request to the given API asynchronously
     * @param tokenProxy The token proxy to use
     * @param first The first part of the name of the API
     * @param second The second part of the name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API
     * @return The job ID of the request
     * @throws HodErrorException
     */
    JobId deleteAsync(
        TokenProxy tokenProxy,
        String first,
        String second,
        int version,
        Map params
    ) throws HodErrorException;

    /**
     * Sends a DELETE request to the given API asynchronously
     * @param tokenProxy The token proxy to use
     * @param first The first part of the name of the API
     * @param second The second part of the name of the API
     * @param version The version of the API
     * @param params The query parameters sent to the API
     * @return The job ID of the request
     * @throws HodErrorException
     */
    JobId deleteAsync(
        TokenProxy tokenProxy,
        String first,
        String second,
        String third,
        int version,
        Map params
    ) throws HodErrorException;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy