Interfaces
The Interfaces module defines core Contracts and Apex interfaces provided by the Breezz framework. Implement these interfaces to build custom plugins, asynchronous execution strategies, trigger hooks, feature toggle evaluators, and scheduled workers.
SchedulerCustomIntervalHandlerProvider
Allows registration of custom interval calculation handlers for scheduled processes.
Signature:
public interface SchedulerCustomIntervalHandlerProviderDescription:
Defines the getCustomIntervalHandlers() method which returns a map of custom interval handlers, where the key represents the handler developer name and the value represents the implementation class instance.
AsyncExecutionStrategy
Handles processing logic for batches of asynchronous requests.
Signature:
public interface AsyncExecutionStrategyDescription:
Defines the handle(AsyncRequest[] requests, ModificationContext ctx) method used to execute a batch of asynchronous requests sharing the same execution strategy. Implementations enforce custom processing logic, retry handling, or queuing mechanisms.
AsyncExecutionStrategyProvider
Allows registration of custom asynchronous execution strategy handlers.
Signature:
public interface AsyncExecutionStrategyProviderDescription: Exposes a provider method returning a map of custom asynchronous execution strategies, mapped by their developer strategy name.
FeatureToggleService
Controls function availability dynamically through custom plugin logic.
Signature:
public interface FeatureToggleServiceDescription:
Implemented to evaluate dynamic feature availability via the isEnabled(String featureName) method. Activated by enabling the Use Feature Toggle Service Plugin setting on a target Feature Toggle configuration.
Example Implementation:
public class ToggleServicePlugin implements forvendi.BreezzPlugins.FeatureToggleService {
public Boolean isEnabled(String featureName) {
if (featureName == 'checkAnyProductIsActive') {
return [SELECT Count() FROM Product2 WHERE IsActive = true LIMIT 1] > 0;
}
return false;
}
}BaseApexPlugin
Base plugin contract providing subscriber org metadata inspection and dynamic class instantiation capabilities.
Signature:
public interface BaseApexPluginMethods:
createInstance(String className): Dynamically instantiates a class by name.hasCustomPermission(String permissionName): Checks if the current running user has the specified Custom Permission assigned.searchForClassImplementation(String searchText, String interfaceName, Integer numberOfRecords): Searches for Apex class implementations matching text patterns and interface criteria.
AsyncJob
Contract for asynchronous background jobs executed in separate execution threads or queue passes.
Signature:
public interface AsyncJobDescription:
Defines the execute(Map<String, AsyncJobInfo> recordKeyToJobInfo, ModificationContext ctx) method. Returns a list of AsyncJobError objects (empty list indicates successful execution).
DML
Database operation contract defining transactional DML methods, partial success modes (allOrNone), and execution contexts.
Signature:
public interface DMLDescription: Standardized interface describing record insertion, updates, upserts, deletes, lead conversions, email sends, and platform event publications.
SchedulerJob
Contract for lightweight scheduled jobs registered and processed by the Breezz Scheduler.
Signature:
public interface SchedulerJobMethods:
init(SchedulerJobInfo schedulerConfig): Initializes the scheduled job instance with runtime configuration.shouldRun(): Evaluates whether conditions are met for job execution (Boolean).run(): Triggers core job execution logic.
TriggerRecordsSplitStrategy
Global strategy for filtering and grouping trigger records prior to handler execution.
Signature:
public interface TriggerRecordsSplitStrategyDescription:
Defines canProcess(SObject record, SObject optionalOldRecord) to determine if an individual record meets criteria for trigger processing.
Example Implementation:
public with sharing class RecordsHandler implements forvendi.TriggerRecordsSplitStrategy {
public Boolean canProcess(SObject record, SObject optionalOldRecord) {
return (((Account) record).Name == 'Test');
}
}TriggerProcessHook
Defines pre-step or post-step execution logic executed during Salesforce trigger evaluation.
Signature:
public interface TriggerProcessHookMethods:
process(SObject[] records, Map<Id, SObject> optionalOldRecords): Executes custom logic during trigger execution passes.