Apex: New and Changed Items

These classes, enums, and interfaces are new or have changes.

For more information on these enhancements, see the Apex Developer Guide and the Apex Reference Guide.

  • Auth Namespace
    The Auth namespace has these new and changed classes.
  • ConnectApi Namespace
    The ConnectApi namespace (Connect in Apex) has new or changed classes, methods, or enums.
  • Database Namespace
    The Database namespace has these new or changed classes, methods, interfaces, enums, or exceptions.
  • ItSvcAssetDcvr Namespace
    The IT Service Asset Discovery (ItSvcAssetDcvr) namespace has these new or changed classes.
  • System Namespace
    The System namespace has these new or changed classes, methods, interfaces, enums, or exceptions.
  • SF_Archive Namespace
    The SF_Archive namespace has these new or changed classes, methods, interfaces, enums, or exceptions.

Auth Namespace

The Auth namespace has these new and changed classes.

New or Changed Constructors in Existing Classes

Implement the OAuth 2.0 Demonstrating Proof-of-Possession (DPoP) extension.
Use the generateDPoPProofForToken method to generate a DPoP proof JWT from a public-private key pair.

ConnectApi Namespace

The ConnectApi namespace (Connect in Apex) has new or changed classes, methods, or enums.

Many Connect REST API resource actions are exposed as static methods on Apex classes in the ConnectApi namespace. These methods use other ConnectApi classes to input and return information. The ConnectApi namespace is referred to as Connect in Apex.

For the new and changed ConnectApi classes, methods, and enums, see ConnectApi (Connect in Apex): New and Changed Classes and Enums.

Database Namespace

The Database namespace has these new or changed classes, methods, interfaces, enums, or exceptions.

New Classes

Provide query options for the SOQL SET OPTIONS clause.
Use the Database.QueryOptions and the Database.QueryOptionsBuilder classes. Use the withDataspace, withHonorEmptyStrings, and withExplicitNamespace builder methods.

ItSvcAssetDcvr Namespace

The IT Service Asset Discovery (ItSvcAssetDcvr) namespace has these new or changed classes.

System Namespace

The System namespace has these new or changed classes, methods, interfaces, enums, or exceptions.

New Classes

Get programmatic access to the individual components of a JWE (JSON Web Encryption) compact serialization token.
These are highlights in the new System.JweToken class. Use the getAad() method to get the Additional Authenticated Data used to authenticate the ciphertext. Use the getAlgorithm() method to get the key management algorithm from the JWE protected header. Use the getCiphertext() method to get the encrypted content (ciphertext). Use the getEncryptedKey() method to get the encrypted content encryption key (wrapped CEK). Use the getEncryptionAlgorithm() method to get the content encryption algorithm from the JWE protected header. Use the getEphemeralPublicKey() method to get the ephemeral public key from the JWE protected header. Use the getIv() method to get the initialization vector used to decrypt the ciphertext. Use the getTag() method to get the authentication tag used to verify ciphertext integrity. Use the toString() method to get a safe, non-sensitive string representation for debugging and logging.

New or Changed Methods in Existing Classes

New System.Crypto methods enable Elliptic Curve (EC) key management and JSON Web Encryption (ECDH-ES specifically), and extend signing/verification to support EC algorithms.
Limits.getDataCloudCursorRows, Limits.getLimitDataCloudCursorRows, Limits.getDataCloudCursors, and Limits.getLimitDataCloudCursors are the new methods.
New System.Crypto methods enable Elliptic Curve (EC) key management and JSON Web Encryption (ECDH-ES specifically), and extend signing/verification to support EC algorithms.
Use the new generateKeyPair() method to generate a key pair blob for supported EC-based algorithms. Use the new getPrivateKey() and getPublicKey() methods to extract the private or public key from a generated key pair blob. Use the new encrypt() method to build a JWE token via ECDH-ES key agreement. To decrypt an existing JWE token, use the new parseJwe() method to retrieve its algorithm, encryption algorithm, ephemeral public key, and encrypted content encryption key, then use the new decrypt() method to decrypt the payload using ECDH-ES key agreement. Use the changed sign() and verify() methods to support EC algorithms, including signing with a private key or a certificate name.

SF_Archive Namespace

The SF_Archive namespace has these new or changed classes, methods, interfaces, enums, or exceptions.

New or Changed Methods in Existing Classes

Mock Archive Apex so you can test your Apex without making a live callout to archived data.
Use the new setMock(mock) method in the SF_Archive.ArchiverAccessor class to register a mock response. Use the new setBody(jsonBody), setStatusCode(statusCode), and setErrorMessage(errorMessage) methods in the SF_Archive.ArchiverAccessorResponse class to define the mock response.