Beispiel #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @POST @Consumes({javax.ws.rs.core.MediaType.APPLICATION_JSON}) @Produces({javax.ws.rs.core.MediaType.APPLICATION_JSON}) public javax.ws.rs.core.Response executeStatementsInNewTransaction(final java.io.InputStream input, @Context final javax.ws.rs.core.UriInfo uriInfo, @Context final javax.servlet.http.HttpServletRequest request)
//JAVA TO C# CONVERTER WARNING: 'final' parameters are ignored unless the option to convert to C# 7.2 'in' parameters is selected:
        public virtual Response ExecuteStatementsInNewTransaction(Stream input, UriInfo uriInfo, HttpServletRequest request)
        {
            _usage.get(features).flag(http_tx_endpoint);
            LoginContext      loginContext             = AuthorizedRequestWrapper.getLoginContextFromHttpServletRequest(request);
            long              customTransactionTimeout = HttpHeaderUtils.getTransactionTimeout(request, _log);
            TransactionHandle transactionHandle        = _facade.newTransactionHandle(_uriScheme, false, loginContext, customTransactionTimeout);

            return(CreatedResponse(transactionHandle, executeStatements(input, transactionHandle, uriInfo.BaseUri, request)));
        }
Beispiel #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @POST @Path("/commit") @Consumes({javax.ws.rs.core.MediaType.APPLICATION_JSON}) @Produces({javax.ws.rs.core.MediaType.APPLICATION_JSON}) public javax.ws.rs.core.Response commitNewTransaction(final java.io.InputStream input, @Context final javax.ws.rs.core.UriInfo uriInfo, @Context final javax.servlet.http.HttpServletRequest request)
//JAVA TO C# CONVERTER WARNING: 'final' parameters are ignored unless the option to convert to C# 7.2 'in' parameters is selected:
        public virtual Response CommitNewTransaction(Stream input, UriInfo uriInfo, HttpServletRequest request)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.neo4j.server.rest.transactional.TransactionHandle transactionHandle;
            TransactionHandle transactionHandle;
            LoginContext      loginContext = AuthorizedRequestWrapper.getLoginContextFromHttpServletRequest(request);
            long customTransactionTimeout  = HttpHeaderUtils.getTransactionTimeout(request, _log);

            transactionHandle = _facade.newTransactionHandle(_uriScheme, true, loginContext, customTransactionTimeout);
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final javax.ws.rs.core.StreamingOutput streamingResults = executeStatementsAndCommit(input, transactionHandle, uriInfo.getBaseUri(), request);
            StreamingOutput streamingResults = ExecuteStatementsAndCommit(input, transactionHandle, uriInfo.BaseUri, request);

            return(OkResponse(streamingResults));
        }