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

com.sap.cloud.sdk.service.prov.api.exits.InitTransactionResponse Maven / Gradle / Ivy

The newest version!
/*******************************************************************************
 * (c) 201X SAP SE or an SAP affiliate company. All rights reserved.
 ******************************************************************************/
package com.sap.cloud.sdk.service.prov.api.exits;

import com.sap.cloud.sdk.service.prov.api.response.ErrorResponse;
/**
 * Provides methods for creating a response object that must be returned from the InitTransaction handler. 
 */
public interface InitTransactionResponse {
	
	/**
	 * Populates error in a InitTransactionResponse object and returns the same. 
	 * @param errorResponse An ErrorResponse object containing the error message and status code
	 * @return A InitTransactionResponse object containing the error
	 */
	public static PreExtensionResponseWithoutBody setError(ErrorResponse errorResponse){
		return new PreExtensionResponseImpl(errorResponse);
	}
	
	/**
	 * Returns a response builder to create a response when the InitTransaction handler executes successfully.
	 * @return An instance of PreExtensionResponseBuilderWithoutBody
	 */
	public static PreExtensionResponseBuilderWithoutBody setSuccess(){
		return new PreExtensionResponseBuilderWithoutBody();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy