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

com.github.rauberprojects.client.action.Action Maven / Gradle / Ivy

package com.github.rauberprojects.client.action;

import com.github.rauberprojects.client.action.method.MethodFactory;
import com.github.rauberprojects.client.data.extractor.DataExtractor;
import com.github.rauberprojects.client.model.Data;
import com.github.rauberprojects.client.action.content.ContentFactory;
import com.github.rauberprojects.client.action.context.ActionContext;
import com.github.rauberprojects.client.action.processor.Processor;
import com.github.rauberprojects.client.action.processor.ProcessorFactory;
import com.github.rauberprojects.client.action.url.UrlFactory;
import com.github.rauberprojects.client.model.Uber;

import java.util.List;

/**
 * An Action usually represents a single task to be done in the API like retrieving a collection of entities or creating a new one.
 */
public interface Action {

    /**
     * @return A DataExtractor that extracts the {@link Data} element of the current {@link Uber} context.
     */
    DataExtractor getDataExtractor();

    /**
     * @return A MethodFactory that extracts the protocol method from the current {@link ActionContext}.
     */
    MethodFactory getMethodFactory();

    /**
     * @return An UrlFactory that extracts the URL from the current {@link ActionContext}.
     */
    UrlFactory getUrlFactory();

    /**
     * @return A ContentFactory that creates the content to be sent with the request.
     */
    ContentFactory getContentFactory();

    /**
     * @return A list of {@link Processor}s which will be invoked on the response.
     */
    List> getResponseProcessors();

    List> getContextProcessorFactories();

    List> getRequestProcessorFactories();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy