{"action":"created","comment":{"url":"https://api.github.com/repos/codice/ddf/pulls/comments/140873040","pull_request_review_id":64955463,"id":140873040,"diff_hunk":"@@ -0,0 +1,592 @@\n+/**\n+ * Copyright (c) Codice Foundation\n+ * <p/>\n+ * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser\n+ * General Public License as published by the Free Software Foundation, either version 3 of the\n+ * License, or any later version.\n+ * <p/>\n+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without\n+ * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n+ * Lesser General Public License for more details. A copy of the GNU Lesser General Public License\n+ * is distributed along with this program and can be found at\n+ * <http://www.gnu.org/licenses/lgpl.html>.\n+ */\n+package org.codice.ddf.spatial.ogc.wps.process.endpoint;\n+\n+import static org.hamcrest.MatcherAssert.assertThat;\n+import static org.hamcrest.Matchers.containsInAnyOrder;\n+import static org.hamcrest.collection.IsEmptyCollection.empty;\n+import static org.hamcrest.core.Is.is;\n+import static org.hamcrest.core.IsNot.not;\n+import static org.hamcrest.core.IsNull.notNullValue;\n+import static org.hamcrest.core.IsNull.nullValue;\n+import static org.mockito.Matchers.any;\n+import static org.mockito.Matchers.anyString;\n+import static org.mockito.Mockito.doReturn;\n+import static org.mockito.Mockito.verify;\n+import static org.mockito.Mockito.when;\n+\n+import java.io.ByteArrayInputStream;\n+import java.math.BigInteger;\n+import java.net.URI;\n+import java.util.ArrayList;\n+import java.util.Arrays;\n+import java.util.Collections;\n+import java.util.EnumSet;\n+import java.util.HashSet;\n+import java.util.List;\n+import java.util.Set;\n+import java.util.TreeSet;\n+\n+import javax.annotation.Nullable;\n+import javax.ws.rs.core.Response;\n+import javax.ws.rs.core.UriInfo;\n+\n+import org.codice.ddf.spatial.ogc.wps.process.api.WpsException;\n+import org.codice.ddf.spatial.process.api.Operation;\n+import org.codice.ddf.spatial.process.api.Process;\n+import org.codice.ddf.spatial.process.api.ProcessException;\n+import org.codice.ddf.spatial.process.api.ProcessMonitor;\n+import org.codice.ddf.spatial.process.api.ProcessRepository;\n+import org.codice.ddf.spatial.process.api.description.BoundingBoxDataDescription;\n+import org.codice.ddf.spatial.process.api.description.ComplexDataDescription;\n+import org.codice.ddf.spatial.process.api.description.DataDescription;\n+import org.codice.ddf.spatial.process.api.description.DataDescriptionGroup;\n+import org.codice.ddf.spatial.process.api.description.DataFormatDefinition;\n+import org.codice.ddf.spatial.process.api.description.DataType;\n+import org.codice.ddf.spatial.process.api.description.ExecutionDescription;\n+import org.codice.ddf.spatial.process.api.description.LiteralDataDescription;\n+import org.codice.ddf.spatial.process.api.description.Metadata;\n+import org.codice.ddf.spatial.process.api.description.TransmissionMode;\n+import org.codice.ddf.spatial.process.api.request.DataFormat;\n+import org.codice.ddf.spatial.process.api.request.DataGroup;\n+import org.codice.ddf.spatial.process.api.request.ExecutionRequest;\n+import org.codice.ddf.spatial.process.api.request.Literal;\n+import org.codice.ddf.spatial.process.api.request.OutputDefinition;\n+import org.codice.ddf.spatial.process.api.request.ProcessResult;\n+import org.codice.ddf.spatial.process.api.request.ProcessResultBuilder;\n+import org.codice.ddf.spatial.process.api.request.ProcessStatus;\n+import org.codice.ddf.spatial.process.api.request.ProcessStatus.Status;\n+import org.codice.ddf.spatial.process.api.request.Reference;\n+import org.hamcrest.Matchers;\n+import org.junit.Before;\n+import org.junit.Rule;\n+import org.junit.Test;\n+import org.junit.rules.ExpectedException;\n+import org.junit.runner.RunWith;\n+import org.mockito.Mock;\n+import org.mockito.runners.MockitoJUnitRunner;\n+\n+import net.opengis.ows.v_2_0.CodeType;\n+import net.opengis.wps.v_2_0.Data;\n+import net.opengis.wps.v_2_0.DataInputType;\n+import net.opengis.wps.v_2_0.DataOutputType;\n+import net.opengis.wps.v_2_0.DataTransmissionModeType;\n+import net.opengis.wps.v_2_0.DescribeProcess;\n+import net.opengis.wps.v_2_0.Dismiss;\n+import net.opengis.wps.v_2_0.ExecuteRequestType;\n+import net.opengis.wps.v_2_0.GetResult;\n+import net.opengis.wps.v_2_0.GetStatus;\n+import net.opengis.wps.v_2_0.OutputDefinitionType;\n+import net.opengis.wps.v_2_0.ProcessOffering;\n+import net.opengis.wps.v_2_0.ProcessOfferings;\n+import net.opengis.wps.v_2_0.Result;\n+import net.opengis.wps.v_2_0.StatusInfo;\n+\n+@RunWith(MockitoJUnitRunner.class)\n+public class WpsEndpointTest {\n+\n+    @Rule\n+    public ExpectedException thrown = ExpectedException.none();\n+\n+    private WpsEndpoint wpsEndpoint;\n+\n+    @Mock\n+    private ProcessRepository processRepository;\n+\n+    @Mock\n+    private Process simpleProcess;\n+\n+    @Mock\n+    private ProcessStatus processStatus;\n+\n+    @Mock\n+    private ProcessResult processResult;\n+\n+    @Mock\n+    private Literal literal;\n+\n+    @Mock\n+    private Reference reference;\n+\n+    @Mock\n+    private DataFormat dataformat;\n+\n+    @Mock\n+    private ProcessMonitor processMonitor;\n+\n+    @Mock\n+    private UriInfo uriInfo;\n+\n+    @Mock\n+    private LiteralDataDescription literalDataDesc;\n+\n+    @Mock\n+    private DataDescription anyDataDesc;\n+\n+    @Mock\n+    private BoundingBoxDataDescription boxDataDesc;\n+\n+    @Mock\n+    private ComplexDataDescription complexDataDesc;\n+\n+    private DataFormatDefinition dataformatdef;\n+\n+    private ComplexProcess complexProcess = new ComplexProcess();\n+\n+    @Before\n+    public void setUp() throws Exception {\n+        wpsEndpoint = new WpsEndpoint();\n+        wpsEndpoint.setProcessRepositories(Collections.singletonList(processRepository));\n+        wpsEndpoint.setProcessMonitors(Collections.singletonList(processMonitor));\n+        wpsEndpoint.setUri(uriInfo);\n+\n+        when(uriInfo.getBaseUri()).thenReturn(new URI(\"this:is:a:test\"));\n+\n+        when(processRepository.getProcesses()).thenReturn(Arrays.asList(simpleProcess,\n+                complexProcess));\n+        when(processRepository.getProcess(anyString())).thenReturn(simpleProcess);\n+        when(simpleProcess.getDescription()).thenReturn(\"Algo desc\");\n+        when(simpleProcess.getId()).thenReturn(\"test\");\n+        Set<Operation> operationSet = new HashSet<>();\n+        operationSet.add(Operation.ASYNC_EXEC);\n+        operationSet.add(Operation.SYNC_EXEC);\n+        operationSet.add(Operation.DISMISS);\n+        when(simpleProcess.getOperations()).thenReturn(operationSet);\n+        when(simpleProcess.getTitle()).thenReturn(\"Algo title\");\n+        when(simpleProcess.getVersion()).thenReturn(\"1.0.2a-32\");\n+        when(simpleProcess.asyncExecute(any(ExecutionRequest.class))).thenReturn(processStatus);\n+        when(simpleProcess.syncExecute(any(ExecutionRequest.class))).thenReturn(processResult);\n+\n+        when(simpleProcess.getExecutionDescription()).thenReturn(new ExecutionDescription(Arrays.asList(\n+                literalDataDesc,\n+                boxDataDesc),\n+                Arrays.asList(complexDataDesc, anyDataDesc),\n+                new TreeSet<>(Collections.singleton(TransmissionMode.REFERENCE))));\n+\n+        dataformatdef = new DataFormatDefinition();\n+        dataformatdef.setEncoding(\"UTF-8\");\n+        dataformatdef.setMimeType(\"text/plain\");\n+        dataformatdef.setSchema(\"test-schema.txt\");\n+\n+        when(literalDataDesc.getName()).thenReturn(\"input desc 1\");\n+        when(literalDataDesc.getId()).thenReturn(\"literalDataDesc\");\n+        when(literalDataDesc.getMaxOccurs()).thenReturn(BigInteger.ONE);\n+        when(literalDataDesc.getMinOccurs()).thenReturn(BigInteger.ONE);\n+        when(literalDataDesc.getDescription()).thenReturn(\"a description for input 1\");\n+        when(literalDataDesc.getDataFormats()).thenReturn(Collections.singletonList(dataformatdef));\n+\n+        doReturn(DataType.STRING).when(literalDataDesc)\n+                .getType();\n+        //        when(literalDataDesc.getType()).thenReturn(DataType.STRING);\n+\n+        when(boxDataDesc.getName()).thenReturn(\"input desc 2\");\n+        when(boxDataDesc.getId()).thenReturn(\"boxDataDesc\");\n+        when(boxDataDesc.getMaxOccurs()).thenReturn(BigInteger.ONE);\n+        when(boxDataDesc.getMinOccurs()).thenReturn(BigInteger.ZERO);\n+        when(boxDataDesc.getDescription()).thenReturn(\"a description for input 2\");\n+        when(boxDataDesc.getDataFormats()).thenReturn(Collections.singletonList(dataformatdef));\n+\n+        when(complexDataDesc.getName()).thenReturn(\"output desc 1\");\n+        when(complexDataDesc.getId()).thenReturn(\"complexDataDesc\");\n+        when(complexDataDesc.getDescription()).thenReturn(\"a description for output 1\");\n+        when(complexDataDesc.getDataFormats()).thenReturn(Collections.singletonList(dataformatdef));\n+\n+        when(anyDataDesc.getName()).thenReturn(\"output desc 2\");\n+        when(anyDataDesc.getId()).thenReturn(\"anyDataDesc\");\n+        when(anyDataDesc.getDescription()).thenReturn(\"a description for output 2\");\n+        when(anyDataDesc.getDataFormats()).thenReturn(Collections.singletonList(dataformatdef));\n+\n+        when(processStatus.getStatus()).thenReturn(Status.ACCEPTED);\n+\n+        List<org.codice.ddf.spatial.process.api.request.Data> result = new ArrayList<>();\n+        result.add(literal);\n+        result.add(reference);\n+        when(reference.getFormat()).thenReturn(dataformat);\n+        when(reference.getReference()).thenReturn(new URI(\"file://path/to/product.nitf\"));\n+        when(reference.getFormat()).thenReturn(dataformat);\n+        when(reference.getReference()).thenReturn(new URI(\"file://path/to/product.nitf\"));\n+        when(processResult.getOutput()).thenReturn(result);\n+\n+        when(processMonitor.dismissRequest(anyString())).thenReturn(processStatus);\n+        when(processMonitor.getRequestStatus(anyString())).thenReturn(processStatus);\n+        when(processMonitor.getRequestResult(anyString())).thenReturn(processResult);\n+\n+    }\n+\n+    @Test\n+    public void getCapabilities() throws Exception {\n+        wpsEndpoint.getCapabilities(Collections.<String>emptyList(),\n+                Collections.<String>emptyList());\n+    }\n+\n+    @Test\n+    public void describeProcess() throws Exception {\n+\n+        DescribeProcess dp = new DescribeProcess();\n+        CodeType ct = new CodeType();\n+        ct.setValue(\"ALL\");\n+        dp.setIdentifier(Collections.singletonList(ct));\n+        ProcessOfferings processOfferings = wpsEndpoint.describeProcess(dp);\n+        assertThat(processOfferings, is(not(nullValue())));\n+        assertThat(processOfferings.getProcessOffering(), is(not(empty())));\n+        ProcessOffering processOffering = processOfferings.getProcessOffering()\n+                .get(0);\n+        assertThat(processOffering.getJobControlOptions(),\n+                containsInAnyOrder(\"async-execute\", \"sync-execute\", \"dismiss\"));\n+    }\n+\n+    @Test\n+    public void asyncExecute() throws Exception {\n+        ExecuteRequestType executeRequestType = new ExecuteRequestType();\n+        CodeType ct = new CodeType();\n+        ct.setValue(\"test\");\n+        executeRequestType.setIdentifier(ct);\n+        executeRequestType.setResponse(\"document\");\n+        executeRequestType.setMode(\"async\");\n+        DataInputType dataInputType = new DataInputType();\n+        Data data = new Data();\n+        data.setContent(Collections.singletonList(\"argument\"));\n+        data.setEncoding(\"UTF-8\");\n+        data.setMimeType(\"text/plain\");\n+        data.setSchema(\"test-schema.txt\");\n+        dataInputType.setData(data);\n+        dataInputType.setId(literalDataDesc.getId());\n+        executeRequestType.setInput(Collections.singletonList(dataInputType));\n+        OutputDefinitionType dataOutputType = new OutputDefinitionType();\n+        dataOutputType.setId(complexDataDesc.getId());\n+        dataOutputType.setEncoding(\"UTF-8\");\n+        dataOutputType.setMimeType(\"text/plain\");\n+        dataOutputType.setSchema(\"test-schema.txt\");\n+        dataOutputType.setTransmission(DataTransmissionModeType.REFERENCE);\n+        executeRequestType.setOutput(Collections.singletonList(dataOutputType));\n+\n+        Response response = wpsEndpoint.execute(executeRequestType);\n+        verify(simpleProcess).asyncExecute(any(ExecutionRequest.class));\n+        assertThat(response.getEntity(), is(not(nullValue())));\n+    }\n+\n+    @Test\n+    public void syncExecute() throws Exception {\n+        ExecuteRequestType executeRequestType = new ExecuteRequestType();\n+        CodeType ct = new CodeType();\n+        ct.setValue(\"test\");\n+        executeRequestType.setIdentifier(ct);\n+        executeRequestType.setResponse(\"document\");\n+        executeRequestType.setMode(\"sync\");\n+        DataInputType dataInputType = new DataInputType();\n+        Data data = new Data();\n+        data.setContent(Collections.singletonList(\"argument\"));\n+        data.setEncoding(\"UTF-8\");\n+        data.setMimeType(\"text/plain\");\n+        data.setSchema(\"test-schema.txt\");\n+        dataInputType.setData(data);\n+        dataInputType.setId(literalDataDesc.getId());\n+        executeRequestType.setInput(Collections.singletonList(dataInputType));\n+        OutputDefinitionType dataOutputType = new OutputDefinitionType();\n+        dataOutputType.setEncoding(\"UTF-8\");\n+        dataOutputType.setId(complexDataDesc.getId());\n+        dataOutputType.setMimeType(\"text/plain\");\n+        dataOutputType.setSchema(\"test-schema.txt\");\n+        dataOutputType.setTransmission(DataTransmissionModeType.REFERENCE);\n+        executeRequestType.setOutput(Collections.singletonList(dataOutputType));\n+\n+        Response response = wpsEndpoint.execute(executeRequestType);\n+        verify(simpleProcess).syncExecute(any(ExecutionRequest.class));\n+        assertThat(response.getEntity(), is(not(nullValue())));\n+    }\n+\n+    @Test\n+    public void getStatus() throws Exception {\n+        GetStatus getStatus = new GetStatus();\n+        getStatus.setJobID(\"1234\");\n+        StatusInfo statusInfo = wpsEndpoint.getStatus(getStatus);\n+        assertThat(statusInfo, is(not(nullValue())));\n+    }\n+\n+    @Test\n+    public void getResult() throws Exception {\n+        GetResult getresult = new GetResult();\n+        getresult.setJobID(\"1234\");\n+        Result result = wpsEndpoint.getResult(getresult);\n+        assertThat(result, is(not(nullValue())));\n+    }\n+\n+    @Test\n+    public void dismiss() throws Exception {\n+        Dismiss dismiss = new Dismiss();\n+        dismiss.setJobID(\"1234\");\n+        StatusInfo statusInfo = wpsEndpoint.dismiss(dismiss);\n+        assertThat(statusInfo, is(not(nullValue())));\n+    }\n+\n+    @Test\n+    public void asyncExecuteMissingArgs() throws Exception {\n+        thrown.expect(WpsException.class);\n+        thrown.expectMessage(\"Too few input items have been specified.\");\n+        ExecuteRequestType executeRequestType = new ExecuteRequestType();\n+        CodeType ct = new CodeType();\n+        ct.setValue(\"test\");\n+        executeRequestType.setIdentifier(ct);\n+        executeRequestType.setResponse(\"document\");\n+        executeRequestType.setMode(\"async\");\n+        executeRequestType.setInput(Collections.emptyList());\n+        OutputDefinitionType dataOutputType = new OutputDefinitionType();\n+        dataOutputType.setId(complexDataDesc.getId());\n+        dataOutputType.setEncoding(\"UTF-8\");\n+        dataOutputType.setMimeType(\"text/plain\");\n+        dataOutputType.setSchema(\"test-schema.txt\");\n+        dataOutputType.setTransmission(DataTransmissionModeType.REFERENCE);\n+        executeRequestType.setOutput(Collections.singletonList(dataOutputType));\n+\n+        Response response = wpsEndpoint.execute(executeRequestType);\n+        verify(simpleProcess).asyncExecute(any(ExecutionRequest.class));\n+        assertThat(response.getEntity(), is(not(nullValue())));\n+    }\n+\n+    @Test\n+    public void asyncExecuteExtraArgs() throws Exception {\n+        thrown.expect(WpsException.class);\n+        thrown.expectMessage(\n+                \"One or more of the input identifiers passed does not match with any of the input identifiers of this process.\");\n+        ExecuteRequestType executeRequestType = new ExecuteRequestType();\n+        CodeType ct = new CodeType();\n+        ct.setValue(\"test\");\n+        executeRequestType.setIdentifier(ct);\n+        executeRequestType.setResponse(\"document\");\n+        executeRequestType.setMode(\"async\");\n+        DataInputType dataInputType = new DataInputType();\n+        Data data = new Data();\n+        data.setContent(Collections.singletonList(\"argument\"));\n+        data.setEncoding(\"UTF-8\");\n+        data.setMimeType(\"text/plain\");\n+        data.setSchema(\"test-schema.txt\");\n+        dataInputType.setData(data);\n+        dataInputType.setId(literalDataDesc.getId());\n+        DataInputType extraDataInputType = new DataInputType();\n+        Data extraData = new Data();\n+        extraData.setContent(Collections.singletonList(\"argument\"));\n+        extraData.setEncoding(\"UTF-8\");\n+        extraData.setMimeType(\"text/plain\");\n+        extraData.setSchema(\"test-schema.txt\");\n+        extraDataInputType.setData(data);\n+        extraDataInputType.setId(\"extrainput\");\n+        executeRequestType.getInput()\n+                .add(dataInputType);\n+        executeRequestType.getInput()\n+                .add(extraDataInputType);\n+        OutputDefinitionType dataOutputType = new OutputDefinitionType();\n+        dataOutputType.setId(complexDataDesc.getId());\n+        dataOutputType.setEncoding(\"UTF-8\");\n+        dataOutputType.setMimeType(\"text/plain\");\n+        dataOutputType.setSchema(\"test-schema.txt\");\n+        dataOutputType.setTransmission(DataTransmissionModeType.REFERENCE);\n+        executeRequestType.setOutput(Collections.singletonList(dataOutputType));\n+\n+        Response response = wpsEndpoint.execute(executeRequestType);\n+        verify(simpleProcess).asyncExecute(any(ExecutionRequest.class));\n+        assertThat(response.getEntity(), is(not(nullValue())));\n+    }\n+\n+    @Test\n+    public void complexSyncExecuteUsingDefaults() throws Exception {\n+        when(processRepository.getProcess(anyString())).thenReturn(complexProcess);\n+        ExecuteRequestType executeRequestType = new ExecuteRequestType();\n+        CodeType ct = new CodeType();\n+        ct.setValue(\"complex\");\n+        executeRequestType.setIdentifier(ct);\n+        executeRequestType.setResponse(\"document\");\n+        executeRequestType.setMode(\"sync\");\n+        DataInputType literalInputType = new DataInputType();\n+        Data inLiteral = new Data();\n+        literalInputType.setData(inLiteral);\n+        literalInputType.setId(\"inLiteral\");\n+        Data inComplex = new Data();\n+        DataInputType complexInputType = new DataInputType();\n+        String inComplexData = \"{key:\\\"value\\\"}\";\n+        inComplex.setContent(Collections.singletonList(inComplexData));\n+        complexInputType.setData(inComplex);\n+        complexInputType.setId(\"inComplex\");\n+        DataInputType groupInputType = new DataInputType();\n+        groupInputType.setId(\"inGroup\");\n+        groupInputType.setInput(Arrays.asList(complexInputType, literalInputType));\n+        executeRequestType.setInput(Arrays.asList(groupInputType, groupInputType, groupInputType));\n+\n+        Response response = wpsEndpoint.execute(executeRequestType);\n+        ExecutionRequest executionRequest = complexProcess.executionRequest;\n+        DataGroup dataGroup = (DataGroup) executionRequest.getInputData()\n+                .get(0);\n+\n+        assertThat(dataGroup.getData(), Matchers.iterableWithSize(2));\n+        //input order should be preserved\n+        org.codice.ddf.spatial.process.api.request.Data complexArg = dataGroup.getData()\n+                .get(0);\n+        org.codice.ddf.spatial.process.api.request.Data literalArg = dataGroup.getData()\n+                .get(1);\n+        assertThat(literalArg, is(notNullValue()));\n+        assertThat(complexArg, is(notNullValue()));\n+        assertThat(complexProcess.inLiteral.getDataFormats()\n+                .contains(literalArg.getFormat()), is(true));\n+        assertThat(((Literal) literalArg).getValue(), is(true));\n+        assertThat(complexProcess.inComplex.getDataFormats()\n+                .contains(complexArg.getFormat()), is(true));\n+        assertThat(((Literal) complexArg).getValue(), is(inComplexData));\n+\n+        List<OutputDefinition> outputDefinitions = executionRequest.getOutputDefinitions();\n+        assertThat(outputDefinitions, Matchers.iterableWithSize(2));\n+        assertThat(executionRequest.getOutputDefinitions(), Matchers.iterableWithSize(2));","path":"catalog/spatial/wps/spatial-wps-endpoint/src/test/java/org/codice/ddf/spatial/ogc/wps/process/endpoint/WpsEndpointTest.java","position":447,"original_position":447,"commit_id":"2b2e8429afc8d463a4670613831e664f0ce2933b","original_commit_id":"2b2e8429afc8d463a4670613831e664f0ce2933b","user":{"login":"jrnorth","id":4495447,"avatar_url":"https://avatars1.githubusercontent.com/u/4495447?v=4","gravatar_id":"","url":"https://api.github.com/users/jrnorth","html_url":"https://github.com/jrnorth","followers_url":"https://api.github.com/users/jrnorth/followers","following_url":"https://api.github.com/users/jrnorth/following{/other_user}","gists_url":"https://api.github.com/users/jrnorth/gists{/gist_id}","starred_url":"https://api.github.com/users/jrnorth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrnorth/subscriptions","organizations_url":"https://api.github.com/users/jrnorth/orgs","repos_url":"https://api.github.com/users/jrnorth/repos","events_url":"https://api.github.com/users/jrnorth/events{/privacy}","received_events_url":"https://api.github.com/users/jrnorth/received_events","type":"User","site_admin":false},"body":"This is verified in the line above.","created_at":"2017-09-25T19:22:04Z","updated_at":"2017-09-25T19:35:33Z","html_url":"https://github.com/codice/ddf/pull/2337#discussion_r140873040","pull_request_url":"https://api.github.com/repos/codice/ddf/pulls/2337","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/codice/ddf/pulls/comments/140873040"},"html":{"href":"https://github.com/codice/ddf/pull/2337#discussion_r140873040"},"pull_request":{"href":"https://api.github.com/repos/codice/ddf/pulls/2337"}}},"pull_request":{"url":"https://api.github.com/repos/codice/ddf/pulls/2337","id":141893819,"html_url":"https://github.com/codice/ddf/pull/2337","diff_url":"https://github.com/codice/ddf/pull/2337.diff","patch_url":"https://github.com/codice/ddf/pull/2337.patch","issue_url":"https://api.github.com/repos/codice/ddf/issues/2337","number":2337,"state":"open","locked":false,"title":"DDF-3266 Implement WPS 2.0 ","user":{"login":"ryeats","id":14876988,"avatar_url":"https://avatars0.githubusercontent.com/u/14876988?v=4","gravatar_id":"","url":"https://api.github.com/users/ryeats","html_url":"https://github.com/ryeats","followers_url":"https://api.github.com/users/ryeats/followers","following_url":"https://api.github.com/users/ryeats/following{/other_user}","gists_url":"https://api.github.com/users/ryeats/gists{/gist_id}","starred_url":"https://api.github.com/users/ryeats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryeats/subscriptions","organizations_url":"https://api.github.com/users/ryeats/orgs","repos_url":"https://api.github.com/users/ryeats/repos","events_url":"https://api.github.com/users/ryeats/events{/privacy}","received_events_url":"https://api.github.com/users/ryeats/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\nImplements the WPS 2.0 spec and provides an internal API \r\nhttp://docs.opengeospatial.org/is/14-065/14-065.html#16\r\nIn a nutshell WPS is an OGC specification for describing and making synchronous and asynchronous RPC calls over http.\r\n\r\nStill have docs and more tests to add but I wanted some eyes on the internal API specifically. Something to note about the API is that any input can be passed by reference or literal value the spec doesn't let the process decide and right now I am just passing the reference/value input down to the internal api so the burden to support both is on the each process which is not great. I am thinking of make it so pass by reference is only supported for ComplexData. \r\n\r\n#### Who is reviewing it? \r\n(please choose AT LEAST two reviewers that need to approve the PR before it can get merged)\r\n#### Select relevant component teams: \r\n@jrnorth \r\n@roelens8 \r\n#### Choose 2 committers to review/merge the PR. \r\n(please choose ONLY two committers from below, delete the rest)\r\n@lessarderic \r\n@rzwiefel\r\n\r\n#### How should this be tested? (List steps with links to updated documentation)\r\n#### Any background context you want to provide?\r\n\r\nSome examples of requests and responses can be found here\r\nhttp://schemas.opengis.net/wps/2.0/xml-examples/\r\n\r\nLook at MetacardTransformerProcess implementation for an example of the internal API.\r\n#### What are the relevant tickets?\r\n[](https://codice.atlassian.net/browse/)\r\n#### Screenshots (if appropriate)\r\n#### Checklist:\r\n- [ ] Documentation Updated\r\n- [ ] Update / Add Unit Tests\r\n- [ ] Update / Add Integration Tests\r\n#### Review Comment Legend:\r\n- ✏️ (Pencil) This comment is a nitpick or style suggestion, no action required for approval. This comment should provide a suggestion either as an in line code snippet or a gist. \r\n- ❓ (Question Mark) This comment is to gain a clearer understanding of design or code choices, clarification is required but action may not be necessary for approval.\r\n- ❗ (Exclamation Mark) This comment is critical and requires clarification or action before approval.\r\n","created_at":"2017-09-19T16:14:48Z","updated_at":"2017-09-25T19:35:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9379f797484e94d017803808a456a9a140fa4a19","assignee":{"login":"rzwiefel","id":9013416,"avatar_url":"https://avatars0.githubusercontent.com/u/9013416?v=4","gravatar_id":"","url":"https://api.github.com/users/rzwiefel","html_url":"https://github.com/rzwiefel","followers_url":"https://api.github.com/users/rzwiefel/followers","following_url":"https://api.github.com/users/rzwiefel/following{/other_user}","gists_url":"https://api.github.com/users/rzwiefel/gists{/gist_id}","starred_url":"https://api.github.com/users/rzwiefel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rzwiefel/subscriptions","organizations_url":"https://api.github.com/users/rzwiefel/orgs","repos_url":"https://api.github.com/users/rzwiefel/repos","events_url":"https://api.github.com/users/rzwiefel/events{/privacy}","received_events_url":"https://api.github.com/users/rzwiefel/received_events","type":"User","site_admin":false},"assignees":[{"login":"rzwiefel","id":9013416,"avatar_url":"https://avatars0.githubusercontent.com/u/9013416?v=4","gravatar_id":"","url":"https://api.github.com/users/rzwiefel","html_url":"https://github.com/rzwiefel","followers_url":"https://api.github.com/users/rzwiefel/followers","following_url":"https://api.github.com/users/rzwiefel/following{/other_user}","gists_url":"https://api.github.com/users/rzwiefel/gists{/gist_id}","starred_url":"https://api.github.com/users/rzwiefel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rzwiefel/subscriptions","organizations_url":"https://api.github.com/users/rzwiefel/orgs","repos_url":"https://api.github.com/users/rzwiefel/repos","events_url":"https://api.github.com/users/rzwiefel/events{/privacy}","received_events_url":"https://api.github.com/users/rzwiefel/received_events","type":"User","site_admin":false},{"login":"lessarderic","id":11377558,"avatar_url":"https://avatars1.githubusercontent.com/u/11377558?v=4","gravatar_id":"","url":"https://api.github.com/users/lessarderic","html_url":"https://github.com/lessarderic","followers_url":"https://api.github.com/users/lessarderic/followers","following_url":"https://api.github.com/users/lessarderic/following{/other_user}","gists_url":"https://api.github.com/users/lessarderic/gists{/gist_id}","starred_url":"https://api.github.com/users/lessarderic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lessarderic/subscriptions","organizations_url":"https://api.github.com/users/lessarderic/orgs","repos_url":"https://api.github.com/users/lessarderic/repos","events_url":"https://api.github.com/users/lessarderic/events{/privacy}","received_events_url":"https://api.github.com/users/lessarderic/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"coyotesqrl","id":1469860,"avatar_url":"https://avatars2.githubusercontent.com/u/1469860?v=4","gravatar_id":"","url":"https://api.github.com/users/coyotesqrl","html_url":"https://github.com/coyotesqrl","followers_url":"https://api.github.com/users/coyotesqrl/followers","following_url":"https://api.github.com/users/coyotesqrl/following{/other_user}","gists_url":"https://api.github.com/users/coyotesqrl/gists{/gist_id}","starred_url":"https://api.github.com/users/coyotesqrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coyotesqrl/subscriptions","organizations_url":"https://api.github.com/users/coyotesqrl/orgs","repos_url":"https://api.github.com/users/coyotesqrl/repos","events_url":"https://api.github.com/users/coyotesqrl/events{/privacy}","received_events_url":"https://api.github.com/users/coyotesqrl/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/codice/ddf/pulls/2337/commits","review_comments_url":"https://api.github.com/repos/codice/ddf/pulls/2337/comments","review_comment_url":"https://api.github.com/repos/codice/ddf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codice/ddf/issues/2337/comments","statuses_url":"https://api.github.com/repos/codice/ddf/statuses/2b2e8429afc8d463a4670613831e664f0ce2933b","head":{"label":"ryeats:DDF-3266","ref":"DDF-3266","sha":"2b2e8429afc8d463a4670613831e664f0ce2933b","user":{"login":"ryeats","id":14876988,"avatar_url":"https://avatars0.githubusercontent.com/u/14876988?v=4","gravatar_id":"","url":"https://api.github.com/users/ryeats","html_url":"https://github.com/ryeats","followers_url":"https://api.github.com/users/ryeats/followers","following_url":"https://api.github.com/users/ryeats/following{/other_user}","gists_url":"https://api.github.com/users/ryeats/gists{/gist_id}","starred_url":"https://api.github.com/users/ryeats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryeats/subscriptions","organizations_url":"https://api.github.com/users/ryeats/orgs","repos_url":"https://api.github.com/users/ryeats/repos","events_url":"https://api.github.com/users/ryeats/events{/privacy}","received_events_url":"https://api.github.com/users/ryeats/received_events","type":"User","site_admin":false},"repo":{"id":43379984,"name":"ddf","full_name":"ryeats/ddf","owner":{"login":"ryeats","id":14876988,"avatar_url":"https://avatars0.githubusercontent.com/u/14876988?v=4","gravatar_id":"","url":"https://api.github.com/users/ryeats","html_url":"https://github.com/ryeats","followers_url":"https://api.github.com/users/ryeats/followers","following_url":"https://api.github.com/users/ryeats/following{/other_user}","gists_url":"https://api.github.com/users/ryeats/gists{/gist_id}","starred_url":"https://api.github.com/users/ryeats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryeats/subscriptions","organizations_url":"https://api.github.com/users/ryeats/orgs","repos_url":"https://api.github.com/users/ryeats/repos","events_url":"https://api.github.com/users/ryeats/events{/privacy}","received_events_url":"https://api.github.com/users/ryeats/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ryeats/ddf","description":"The Distributed Data Framework - Distribution, SDK, and Test","fork":true,"url":"https://api.github.com/repos/ryeats/ddf","forks_url":"https://api.github.com/repos/ryeats/ddf/forks","keys_url":"https://api.github.com/repos/ryeats/ddf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ryeats/ddf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ryeats/ddf/teams","hooks_url":"https://api.github.com/repos/ryeats/ddf/hooks","issue_events_url":"https://api.github.com/repos/ryeats/ddf/issues/events{/number}","events_url":"https://api.github.com/repos/ryeats/ddf/events","assignees_url":"https://api.github.com/repos/ryeats/ddf/assignees{/user}","branches_url":"https://api.github.com/repos/ryeats/ddf/branches{/branch}","tags_url":"https://api.github.com/repos/ryeats/ddf/tags","blobs_url":"https://api.github.com/repos/ryeats/ddf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ryeats/ddf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ryeats/ddf/git/refs{/sha}","trees_url":"https://api.github.com/repos/ryeats/ddf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ryeats/ddf/statuses/{sha}","languages_url":"https://api.github.com/repos/ryeats/ddf/languages","stargazers_url":"https://api.github.com/repos/ryeats/ddf/stargazers","contributors_url":"https://api.github.com/repos/ryeats/ddf/contributors","subscribers_url":"https://api.github.com/repos/ryeats/ddf/subscribers","subscription_url":"https://api.github.com/repos/ryeats/ddf/subscription","commits_url":"https://api.github.com/repos/ryeats/ddf/commits{/sha}","git_commits_url":"https://api.github.com/repos/ryeats/ddf/git/commits{/sha}","comments_url":"https://api.github.com/repos/ryeats/ddf/comments{/number}","issue_comment_url":"https://api.github.com/repos/ryeats/ddf/issues/comments{/number}","contents_url":"https://api.github.com/repos/ryeats/ddf/contents/{+path}","compare_url":"https://api.github.com/repos/ryeats/ddf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ryeats/ddf/merges","archive_url":"https://api.github.com/repos/ryeats/ddf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ryeats/ddf/downloads","issues_url":"https://api.github.com/repos/ryeats/ddf/issues{/number}","pulls_url":"https://api.github.com/repos/ryeats/ddf/pulls{/number}","milestones_url":"https://api.github.com/repos/ryeats/ddf/milestones{/number}","notifications_url":"https://api.github.com/repos/ryeats/ddf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ryeats/ddf/labels{/name}","releases_url":"https://api.github.com/repos/ryeats/ddf/releases{/id}","deployments_url":"https://api.github.com/repos/ryeats/ddf/deployments","created_at":"2015-09-29T16:34:25Z","updated_at":"2015-09-29T16:34:41Z","pushed_at":"2017-09-20T19:56:34Z","git_url":"git://github.com/ryeats/ddf.git","ssh_url":"git@github.com:ryeats/ddf.git","clone_url":"https://github.com/ryeats/ddf.git","svn_url":"https://github.com/ryeats/ddf","homepage":"","size":170843,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"codice:master","ref":"master","sha":"b2a80c1c307f08a87f58cf291516ecd84a73ac9d","user":{"login":"codice","id":2386734,"avatar_url":"https://avatars2.githubusercontent.com/u/2386734?v=4","gravatar_id":"","url":"https://api.github.com/users/codice","html_url":"https://github.com/codice","followers_url":"https://api.github.com/users/codice/followers","following_url":"https://api.github.com/users/codice/following{/other_user}","gists_url":"https://api.github.com/users/codice/gists{/gist_id}","starred_url":"https://api.github.com/users/codice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codice/subscriptions","organizations_url":"https://api.github.com/users/codice/orgs","repos_url":"https://api.github.com/users/codice/repos","events_url":"https://api.github.com/users/codice/events{/privacy}","received_events_url":"https://api.github.com/users/codice/received_events","type":"Organization","site_admin":false},"repo":{"id":15173563,"name":"ddf","full_name":"codice/ddf","owner":{"login":"codice","id":2386734,"avatar_url":"https://avatars2.githubusercontent.com/u/2386734?v=4","gravatar_id":"","url":"https://api.github.com/users/codice","html_url":"https://github.com/codice","followers_url":"https://api.github.com/users/codice/followers","following_url":"https://api.github.com/users/codice/following{/other_user}","gists_url":"https://api.github.com/users/codice/gists{/gist_id}","starred_url":"https://api.github.com/users/codice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codice/subscriptions","organizations_url":"https://api.github.com/users/codice/orgs","repos_url":"https://api.github.com/users/codice/repos","events_url":"https://api.github.com/users/codice/events{/privacy}","received_events_url":"https://api.github.com/users/codice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codice/ddf","description":"Distributed Data Framework - an open source, modular integration framework.","fork":false,"url":"https://api.github.com/repos/codice/ddf","forks_url":"https://api.github.com/repos/codice/ddf/forks","keys_url":"https://api.github.com/repos/codice/ddf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codice/ddf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codice/ddf/teams","hooks_url":"https://api.github.com/repos/codice/ddf/hooks","issue_events_url":"https://api.github.com/repos/codice/ddf/issues/events{/number}","events_url":"https://api.github.com/repos/codice/ddf/events","assignees_url":"https://api.github.com/repos/codice/ddf/assignees{/user}","branches_url":"https://api.github.com/repos/codice/ddf/branches{/branch}","tags_url":"https://api.github.com/repos/codice/ddf/tags","blobs_url":"https://api.github.com/repos/codice/ddf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codice/ddf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codice/ddf/git/refs{/sha}","trees_url":"https://api.github.com/repos/codice/ddf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codice/ddf/statuses/{sha}","languages_url":"https://api.github.com/repos/codice/ddf/languages","stargazers_url":"https://api.github.com/repos/codice/ddf/stargazers","contributors_url":"https://api.github.com/repos/codice/ddf/contributors","subscribers_url":"https://api.github.com/repos/codice/ddf/subscribers","subscription_url":"https://api.github.com/repos/codice/ddf/subscription","commits_url":"https://api.github.com/repos/codice/ddf/commits{/sha}","git_commits_url":"https://api.github.com/repos/codice/ddf/git/commits{/sha}","comments_url":"https://api.github.com/repos/codice/ddf/comments{/number}","issue_comment_url":"https://api.github.com/repos/codice/ddf/issues/comments{/number}","contents_url":"https://api.github.com/repos/codice/ddf/contents/{+path}","compare_url":"https://api.github.com/repos/codice/ddf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codice/ddf/merges","archive_url":"https://api.github.com/repos/codice/ddf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codice/ddf/downloads","issues_url":"https://api.github.com/repos/codice/ddf/issues{/number}","pulls_url":"https://api.github.com/repos/codice/ddf/pulls{/number}","milestones_url":"https://api.github.com/repos/codice/ddf/milestones{/number}","notifications_url":"https://api.github.com/repos/codice/ddf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codice/ddf/labels{/name}","releases_url":"https://api.github.com/repos/codice/ddf/releases{/id}","deployments_url":"https://api.github.com/repos/codice/ddf/deployments","created_at":"2013-12-13T20:38:28Z","updated_at":"2017-09-13T18:51:38Z","pushed_at":"2017-09-25T19:22:38Z","git_url":"git://github.com/codice/ddf.git","ssh_url":"git@github.com:codice/ddf.git","clone_url":"https://github.com/codice/ddf.git","svn_url":"https://github.com/codice/ddf","homepage":"http://ddf.codice.org","size":345325,"stargazers_count":63,"watchers_count":63,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":121,"mirror_url":null,"open_issues_count":38,"forks":121,"open_issues":38,"watchers":63,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codice/ddf/pulls/2337"},"html":{"href":"https://github.com/codice/ddf/pull/2337"},"issue":{"href":"https://api.github.com/repos/codice/ddf/issues/2337"},"comments":{"href":"https://api.github.com/repos/codice/ddf/issues/2337/comments"},"review_comments":{"href":"https://api.github.com/repos/codice/ddf/pulls/2337/comments"},"review_comment":{"href":"https://api.github.com/repos/codice/ddf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codice/ddf/pulls/2337/commits"},"statuses":{"href":"https://api.github.com/repos/codice/ddf/statuses/2b2e8429afc8d463a4670613831e664f0ce2933b"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jrnorth"}}