Class BaseFactory

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
com.cloudforgeci.api.core.annotation.BaseFactory
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable
Direct Known Subclasses:
AlarmFactory, AlbFactory, ApplicationFactory, ApplicationOidcFactory, ApplicationSamlFactory, BackupFactory, CertificateFactory, CognitoAuthenticationFactory, CognitoSamlFactory, ComplianceFactory, ContainerFactory, DomainFactory, Ec2Factory, EfsFactory, FargateFactory, FlowLogFactory, GuardDutyFactory, IdentityCenterFactory, IdentityCenterSamlFactory, KeycloakFactory, LoggingCwFactory, OidcAuthenticationFactory, ScalingFactory, SecurityMonitoringFactory, SecurityProfileExample, SecurityProfileFactory, VpcFactory, WafFactory

public abstract class BaseFactory extends software.constructs.Construct
Base class for factory classes that provides convenient access to SystemContext, DeploymentContext, and SecurityProfileConfiguration.

Subclasses can use annotations on fields to automatically extract specific context values:


 @SystemContext("vpc")
 private Vpc vpc;

 @DeploymentContext("region")
 private String region;

 @SecurityProfileConfiguration("wafEnabled")
 private boolean wafEnabled;
 

The annotations automatically extract and inject the specified values from the context objects during construction.

  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.constructs.IConstruct

    software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final DeploymentContext
     
     
    protected final SystemContext
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    BaseFactory(software.constructs.Construct scope, String id)
    Constructor that initializes contexts and automatically extracts annotated field values.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    Abstract method that must be implemented by all factory subclasses.
    Convenience method to get DeploymentContext.
    Convenience method to get SecurityProfileConfiguration.
    protected SystemContext
    Convenience method to get SystemContext.

    Methods inherited from class software.constructs.Construct

    getNode, isConstruct, toString

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Field Details

  • Constructor Details

    • BaseFactory

      public BaseFactory(software.constructs.Construct scope, String id)
      Constructor that initializes contexts and automatically extracts annotated field values.
      Parameters:
      scope - The parent construct
      id - The construct ID
  • Method Details

    • getSystemContext

      protected SystemContext getSystemContext()
      Convenience method to get SystemContext.
      Returns:
      The SystemContext
    • getDeploymentContext

      protected DeploymentContext getDeploymentContext()
      Convenience method to get DeploymentContext.
      Returns:
      The DeploymentContext
    • getSecurityProfileConfiguration

      protected SecurityProfileConfiguration getSecurityProfileConfiguration()
      Convenience method to get SecurityProfileConfiguration.
      Returns:
      The SecurityProfileConfiguration
    • create

      public abstract void create()
      Abstract method that must be implemented by all factory subclasses. This method should contain the actual infrastructure creation logic.