001package com.identityworksllc.iiq.common.integration;
002
003import sailpoint.integration.AbstractIntegrationExecutor;
004import sailpoint.object.ProvisioningPlan;
005import sailpoint.object.ProvisioningResult;
006import sailpoint.tools.GeneralException;
007
008/**
009 * Superclass containing common hooks for the custom integration executor classes
010 */
011public abstract class AbstractCommonIntegrationExecutor extends AbstractIntegrationExecutor {
012
013    /**
014     * A hook that can be implemented by a subclass to be called after provisioning
015     * @param plan The plan that was just provisioned
016     * @param result The result of the plan provisioning
017     * @throws GeneralException on failures
018     */
019    protected void afterProvision(ProvisioningPlan plan, ProvisioningResult result) throws GeneralException {
020        /* Nothing here, for overrides only */
021    }
022
023    /**
024     * A hook that can be implemented by a subclass to be called after each account request provisioning
025     * @param plan The plan being provisioned
026     * @param accountRequest The account request that was just provisioned
027     * @throws GeneralException on failures
028     */
029    protected void afterProvisionAccount(ProvisioningPlan plan, ProvisioningPlan.AccountRequest accountRequest) throws GeneralException {
030
031    }
032
033    /**
034     * A hook that can be implemented by a subclass to be called before provisioning
035     * @param plan The plan about to be provisioned
036     * @throws GeneralException on failures
037     */
038    protected void beforeProvision(ProvisioningPlan plan) throws GeneralException {
039        /* Nothing here, for overrides only */
040    }
041
042    /**
043     * A hook that can be implemented by a subclass to be called before each account request provisioning
044     * @param plan The plan being provisioned
045     * @param accountRequest The account request about to be provisioned
046     * @throws GeneralException on failures
047     */
048    protected void beforeProvisionAccount(ProvisioningPlan plan, ProvisioningPlan.AccountRequest accountRequest) throws GeneralException {
049
050    }
051
052}