Open Documentation Menu

Using the “SubscriberInterface” class

The dvelop_docs_dev.SubscriberInterface abstract class serves as the central superclass for all service interfaces that are available to you for uploading and managing documents in Apex.

In particular, the class provides simple methods of authentication to add valid user sessions to expanding subclasses and to ensure that all outgoing HTTP requests are given the necessary authorization.

Signature
global abstract with sharing class SubscriberInterface
Extensions
Contents

Methods 

Methods

The SubscriberInterface class offers the following methods:

authenticateInCurrentUserContext()

Authenticates the service interface in the context of the logged-in user by transferring the user session with setAuthentication(cookie). After successful authentication, the session information is cached in d.velop documents using the Salesforce Platform Cache and retrieved from this memory as required.

Signature
global void authenticateInCurrentUserContext()
authenticateInServiceUserContext()

Authenticates the service interface in the context of the service user from the d.velop documents configuration by transferring the user session with setAuthentication(cookie). After successful authentication, the session information is cached in d.velop documents using the Salesforce Platform Cache and retrieved from this memory as required.

Signature
global void authenticateInServiceUserContext()
setAuthentication(cookie)

Transfers a user session in the form of a cookie to the service interface.

The exact implementation depends on the specific service interface.

Signature
global abstract void setAuthentication(String cookie)
Parameters

cookie: A valid user session cookie to authorize the service interface.

Data type: String

isAuthenticated()

Returns the authentication status of the service interface.

The exact implementation depends on the specific service interface.

Signature
global abstract Boolean isAuthenticated()
Returned entry

The authentication status (true / false).