All Downloads are FREE. Search and download functionalities are using the official Maven repository.

templates.data-delivery-spark.synchronous.processor.impl.vm Maven / Gradle / Ivy

The newest version!
package ${basePackage};

#foreach ($import in $step.implImports)
import ${import};
#end

import jakarta.enterprise.context.ApplicationScoped;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.time.Instant;
import java.util.Map;

#if (!$step.provenance || $step.provenance.enabled || ($step.billOfMaterial && $step.billOfMaterial.enabled))
import com.boozallen.aissemble.core.metadata.MetadataModel;
#end

/**
 * Performs the business logic for ${step.capitalizedName}.
 *
 * Because this class is {@link ApplicationScoped}, exactly one managed singleton instance will exist
 * in any deployment.
 *
 * GENERATED STUB CODE - PLEASE ***DO*** MODIFY
 *
 * Originally generated from: ${templateName}
 */
@ApplicationScoped
public class ${step.capitalizedName} extends ${step.capitalizedName}Base {

    private static final Logger logger = LoggerFactory.getLogger(${step.capitalizedName}.class);

    public ${step.capitalizedName}(){
    #if ((!$step.provenance || $step.provenance.enabled) && $step.provenance.subject)
        super("$step.provenance.subject",getDataActionDescriptiveLabel());
    #else
        super("${step.type}",getDataActionDescriptiveLabel());
    #end
    }

    /**
    * Provides a descriptive label for the action that can be used for logging (e.g., provenance details).
    *
    * @return descriptive label
    */
    private static String getDataActionDescriptiveLabel(){
    #if ((!$step.provenance || $step.provenance.enabled) && $step.provenance.action)
        return"${step.provenance.action}";
    #else
        // TODO: replace with descriptive label
        return"${step.name}";
    #end
    }

    /**
     * {@inheritDoc}
     */
    @Override
    ${step.concreteImplSignature} {
        // TODO: Add your business logic here for this step!
        logger.error("Implement executeStepImpl(..) or remove this pipeline step!");

    #if ($step.outbound)
        return null;
    #end
    }

#if ($step.billOfMaterial && $step.billOfMaterial.enabled)
    /**
     * {@inheritDoc}
     */
    @Override
    protected MetadataModel createBOMMetadata(String resource,String subject,String action){
        // TODO: Add any additional BOM metadata here
        return new MetadataModel(resource,subject,action,Instant.now());
    }
#end

#if (!$step.provenance || $step.provenance.enabled)
    /**
     * {@inheritDoc}
     */
    @Override
    protected MetadataModel createProvenanceMetadata(String resource,String subject,String action){
        // TODO: Add any additional provenance-related metadata here
        return new MetadataModel(resource,subject,action,Instant.now());
    }
#end
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy