You are here

interface EncryptedRestClientInterface in Salesforce Suite 8.3

Objects, properties, and methods to communicate with the Salesforce REST API.

Hierarchy

Expanded class hierarchy of EncryptedRestClientInterface

All classes that implement EncryptedRestClientInterface

2 files declare their use of EncryptedRestClientInterface
AuthorizeForm.php in src/Form/AuthorizeForm.php
SettingsForm.php in modules/salesforce_encrypt/src/Form/SettingsForm.php

File

modules/salesforce_encrypt/src/Rest/EncryptedRestClientInterface.php, line 11

Namespace

Drupal\salesforce_encrypt\Rest
View source
interface EncryptedRestClientInterface extends RestClientInterface {

  /**
   * Encrypts all sensitive salesforce config values.
   *
   * @param \Drupal\encrypt\EncryptionProfileInterface $profile
   *   Id of the Encrypt Profile to use for encryption.
   *
   * @return bool
   *   TRUE if encryption was enabled or FALSE if it is already enabled
   *
   * @throws RuntimeException
   *   If Salesforce encryption profile hasn't been selected.
   */
  public function enableEncryption(EncryptionProfileInterface $profile);

  /**
   * Decrypt and re-save sensitive salesforce config values.
   *
   * Inverse of ::enableEncryption.
   *
   * @return bool
   *   TRUE if encryption was disabled or FALSE if it is already disabled
   *
   * @throws RuntimeException
   *   If Salesforce encryption profile hasn't been selected.
   */
  public function disableEncryption();

  /**
   * Returns the EncryptionProfileInterface assigned to Salesforce Encrypt.
   *
   * @return \Drupal\encrypt\EncryptionProfileInterface|null
   *   The assigned profile, or null if none has been assigned.
   *
   * @throws \Drupal\salesforce\EntityNotFoundException
   *   If a profile is assigned, but cannot be loaded.
   */
  public function getEncryptionProfile();

  /**
   * If the given profile is our active one, disable encryption.
   *
   * Since we rely on a specific encryption profile, we need to respond in case
   * it gets deleted. Check to see if the profile being deleted is the one
   * assigned for encryption; if so, decrypt our config and disable encryption.
   *
   * @param \Drupal\encrypt\EncryptionProfileInterface $profile
   *   The encryption profile being deleted.
   */
  public function hookEncryptionProfileDelete(EncryptionProfileInterface $profile);

  /**
   * Encrypts a value using the active encryption profile, or return plaintext.
   *
   * @param string $value
   *   The value to encrypt.
   *
   * @return string
   *   The encrypted value, or plaintext if no active profile.
   */
  public function encrypt($value);

  /**
   * Decrypts a value using active encryption profile, or return the same value.
   *
   * @param string $value
   *   The value to decrypt.
   *
   * @return string
   *   The decrypted value, or the unchanged value if no active profile.
   */
  public function decrypt($value);

}

Members

Namesort descending Modifiers Type Description Overrides
EncryptedRestClientInterface::decrypt public function Decrypts a value using active encryption profile, or return the same value. 1
EncryptedRestClientInterface::disableEncryption public function Decrypt and re-save sensitive salesforce config values. 1
EncryptedRestClientInterface::enableEncryption public function Encrypts all sensitive salesforce config values. 1
EncryptedRestClientInterface::encrypt public function Encrypts a value using the active encryption profile, or return plaintext. 1
EncryptedRestClientInterface::getEncryptionProfile public function Returns the EncryptionProfileInterface assigned to Salesforce Encrypt. 1
EncryptedRestClientInterface::hookEncryptionProfileDelete public function If the given profile is our active one, disable encryption. 1
RestClientInterface::apiCall public function Make a call to the Salesforce REST API. 1
RestClientInterface::getAccessToken Deprecated public function Get the access token. 1
RestClientInterface::getApiEndPoint Deprecated public function Get the API end point for a given type of the API. 1
RestClientInterface::getApiUsage public function Get the api usage, as returned in the most recent API request header. 1
RestClientInterface::getApiVersion Deprecated public function Wrapper for config rest_api_version.version. 1
RestClientInterface::getAuthCallbackUrl Deprecated public function Helper to build the redirect URL for OAUTH workflow. 1
RestClientInterface::getAuthEndpointUrl Deprecated public function Get Salesforce oauth login endpoint. (OAuth step 1) 1
RestClientInterface::getAuthTokenUrl Deprecated public function Get Salesforce oauth token endpoint. (OAuth step 2) 1
RestClientInterface::getConsumerKey Deprecated public function Consumer key getter. 1
RestClientInterface::getConsumerSecret Deprecated public function Comsumer secret getter. 1
RestClientInterface::getDeleted public function Retrieves objects deleted within the given timeframe. 1
RestClientInterface::getHttpClientOption public function Getter for a single, named HTTP client option. 1
RestClientInterface::getHttpClientOptions public function Getter for HTTP client options. 1
RestClientInterface::getIdentity Deprecated public function Return the Salesforce identity, which is stored in a variable. 1
RestClientInterface::getInstanceUrl Deprecated public function Get the SF instance URL. Useful for linking to objects. 1
RestClientInterface::getLoginUrl Deprecated public function Login url getter. 1
RestClientInterface::getObjectTypeName public function Utility function to determine object type for given SFID. 1
RestClientInterface::getRecordTypeIdByDeveloperName public function Given a DeveloperName and SObject Name, return SFID of the RecordType. 1
RestClientInterface::getRecordTypes public function Retrieve all record types for this org. 1
RestClientInterface::getUpdated public function Return a list of SFIDs for the given object for the given timeframe. 1
RestClientInterface::getVersions public function Wrapper for "Versions" resource to list information about API releases. 1
RestClientInterface::handleAuthResponse Deprecated public function Helper callback for OAuth handshake, and refreshToken() 1
RestClientInterface::httpRequestRaw public function Return raw response content from given URL. 1
RestClientInterface::initializeIdentity Deprecated public function Retrieve and store the Salesforce identity given an ID url. 1
RestClientInterface::isAuthorized Deprecated public function Determine if this SF instance is fully configured. 1
RestClientInterface::listResources public function Return a list of available resources for the configured API version. 1
RestClientInterface::objectCreate public function Create a new object of the given type. 1
RestClientInterface::objectDelete public function Delete a Salesforce object. 1
RestClientInterface::objectDescribe public function Retrieve all the metadata for an object. 1
RestClientInterface::objectRead public function Return a fullly loaded Salesforce object. 1
RestClientInterface::objectReadbyExternalId public function Return a full loaded Salesforce object from External ID. 1
RestClientInterface::objects public function Available objects and their metadata for your organization's data. 1
RestClientInterface::objectUpdate public function Update an existing object. 1
RestClientInterface::objectUpsert public function Create new records or update existing records. 1
RestClientInterface::query public function Use SOQL to get objects based on query string. 1
RestClientInterface::queryAll public function Same as ::query(), but also returns deleted or archived records. 1
RestClientInterface::queryMore public function Given a select query result, fetch the next results set, if it exists. 1
RestClientInterface::refreshToken Deprecated public function Refresh access token based on the refresh token. 1
RestClientInterface::setAccessToken Deprecated public function Set the access token. 1
RestClientInterface::setApiVersion Deprecated public function Setter for config salesforce.settings rest_api_version and use_latest. 1
RestClientInterface::setConsumerKey Deprecated public function Consumer key setter. 1
RestClientInterface::setConsumerSecret Deprecated public function Consumer key setter. 1
RestClientInterface::setHttpClientOption public function Set a single Guzzle HTTP client option. 1
RestClientInterface::setHttpClientOptions public function Set options for Guzzle HTTP client. 1
RestClientInterface::setIdentity Deprecated public function Set the Salesforce identity, which is stored in a variable. 1
RestClientInterface::setInstanceUrl Deprecated public function Set the SF instance URL. 1
RestClientInterface::setLoginUrl Deprecated public function Login url setter. 1
RestClientInterface::setRefreshToken Deprecated public function Set the refresh token. 1