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

com.appian.connectedsystems.simplified.sdk.SimpleClientApi Maven / Gradle / Ivy

package com.appian.connectedsystems.simplified.sdk;

import com.appian.connectedsystems.templateframework.sdk.ClientApi;
import com.appian.connectedsystems.templateframework.sdk.ClientApiRequest;
import com.appian.connectedsystems.templateframework.sdk.ClientApiResponse;
import com.appian.connectedsystems.templateframework.sdk.ExecutionContext;
import com.appian.connectedsystems.templateframework.sdk.TemplateId;

/**
 * A Client API enhances a Component Plugin (CP) with the capability to execute code on the server with access to secured values
 *
 * 

Each Client API must be associated with exactly one {@link SimpleConnectedSystemTemplate}. A {@link SimpleConnectedSystemTemplate} may have zero or more associated Client APIs.

* *

The {@link TemplateId} annotation defines the friendly name of the SimpleClientAPI when called from the Component Plugin.

* *

Client APIs are re-instantiated per request. Therefore, each call to {@link SimpleClientApi#execute(SimpleClientApiRequest, ExecutionContext)} is on a new instance of the class.

* *

Client APIs are immediately available once deployed. They do not require any additional configuration in Appian.

*/ public abstract class SimpleClientApi implements ClientApi { /** * Defines the behavior of the Client API. * * @param request A non-null {@link SimpleClientApiRequest}. * @param executionContext Contains all of the contextual information needed to execute the Client API including Designer information, Designer locale, and proxy configuration. {@link ExecutionContext} * @return Value that will be returned to the Component Plugin. */ protected abstract ClientApiResponse execute( SimpleClientApiRequest request, ExecutionContext executionContext); @Override public ClientApiResponse execute( ClientApiRequest request, ExecutionContext executionContext) { return execute(SimpleClientApiRequest.from(request), executionContext); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy