001/*
002 * Copyright (c) 2006-2011 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the Eclipse Public License v1.0
006 * which accompanies this distribution, and is available at
007 * http://www.eclipse.org/legal/epl-v10.html
008 *
009 * Contributors:
010 *     bstefanescu
011 */
012package org.nuxeo.ecm.automation.client;
013
014import java.io.IOException;
015import java.util.Map;
016
017import org.nuxeo.ecm.automation.client.model.OperationDocumentation;
018
019/**
020 * @author <a href="mailto:bs@nuxeo.com">Bogdan Stefanescu</a>
021 */
022// TODO: comment me.
023public interface OperationRequest {
024
025    Session getSession();
026
027    String getUrl();
028
029    /**
030     * Get the ID of the operation to be invoked
031     *
032     * @return
033     */
034    OperationDocumentation getOperation();
035
036    OperationRequest setInput(Object input);
037
038    Object getInput();
039
040    OperationRequest set(String key, Object value);
041
042    OperationRequest setContextProperty(String key, Object value);
043
044    Object execute() throws IOException;
045
046    Map<String, Object> getParameters();
047
048    Map<String, Object> getContextParameters();
049
050    OperationRequest setHeader(String key, String value);
051
052    Map<String, String> getHeaders();
053
054}