ingo@1: /* ingo@1: * Copyright (c) 2010 by Intevation GmbH ingo@1: * ingo@1: * This program is free software under the LGPL (>=v2.1) ingo@1: * Read the file LGPL.txt coming with the software for details ingo@1: * or visit http://www.gnu.org/licenses/ if it does not exist. ingo@1: */ ingo@1: package de.intevation.artifacts.httpclient.http; ingo@1: ingo@12: import java.io.InputStream; ingo@1: import java.io.OutputStream; ingo@1: ingo@1: import org.w3c.dom.Document; ingo@1: ingo@1: import de.intevation.artifacts.httpclient.exceptions.ConnectionException; ingo@1: import de.intevation.artifacts.httpclient.http.response.ResponseHandler; ingo@1: import de.intevation.artifacts.httpclient.objects.Artifact; ingo@1: import de.intevation.artifacts.httpclient.objects.ArtifactFactory; ingo@2: import de.intevation.artifacts.httpclient.utils.ArtifactCreator; ingo@1: ingo@1: /** ingo@1: * @author Ingo Weinzierl ingo@1: */ ingo@1: public interface HttpClient { ingo@1: ingo@1: ArtifactFactory[] getArtifactFactories() ingo@1: throws ConnectionException; ingo@1: ingo@2: Object create(Document createDocument, ArtifactCreator creator) ingo@1: throws ConnectionException; ingo@1: ingo@1: Object describe( ingo@1: Artifact artifact, ingo@1: Document describeDocument, ingo@1: ResponseHandler handler) ingo@1: throws ConnectionException; ingo@1: ingo@1: Object feed(Artifact artifact, Document feedDocument, ResponseHandler handler) ingo@1: throws ConnectionException; ingo@1: ingo@1: Object advance( ingo@1: Artifact artifact, ingo@1: Document advanceDocument, ingo@1: ResponseHandler handler) ingo@1: throws ConnectionException; ingo@1: ingo@1: void out( ingo@1: Artifact artifact, ingo@1: Document outDocument, ingo@1: String target, ingo@1: OutputStream out) ingo@1: throws ConnectionException; ingo@4: ingo@4: ingo@4: /******************************* ingo@5: * Service API ingo@5: *******************************/ ingo@5: ingo@5: Document callService(String url, String service, Document input) ingo@5: throws ConnectionException; ingo@5: ingo@26: Object callService( ingo@26: String url, ingo@26: String service, ingo@26: Document input, ingo@26: ResponseHandler handler) ingo@26: throws ConnectionException; ingo@26: ingo@5: ingo@5: /******************************* ingo@4: * Collections API ingo@4: *******************************/ ingo@5: ingo@4: Object createCollection( ingo@4: Document createDocument, ingo@4: String ownerId, ingo@4: ResponseHandler handler) ingo@4: throws ConnectionException; ingo@4: ingo@6: Object doCollectionAction( ingo@6: Document actionDocument, ingo@6: String uuid, ingo@6: ResponseHandler handler) ingo@6: throws ConnectionException; ingo@6: ingo@9: void collectionOut( ingo@9: Document outDocument, ingo@9: String uuid, ingo@9: String type, ingo@9: OutputStream out) ingo@9: throws ConnectionException; ingo@9: ingo@12: InputStream collectionOut( ingo@12: Document doc, ingo@12: String uuid, ingo@12: String type) ingo@12: throws ConnectionException; ingo@12: ingo@4: ingo@4: /******************************* ingo@4: * Users API ingo@4: *******************************/ ingo@5: ingo@4: Document listUsers() ingo@4: throws ConnectionException; ingo@7: ingo@7: Document listUserCollections(String userid) ingo@7: throws ConnectionException; bjoern@34: bjoern@34: Document createUser(Document doc) bjoern@34: throws ConnectionException; bjoern@37: bjoern@37: Document findUser(Document doc) bjoern@37: throws ConnectionException; ingo@1: } ingo@1: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8: