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.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final DeploymentContextprotected final SecurityProfileConfigurationprotected final SystemContext -
Constructor Summary
ConstructorsConstructorDescriptionBaseFactory(software.constructs.Construct scope, String id) Constructor that initializes contexts and automatically extracts annotated field values. -
Method Summary
Modifier and TypeMethodDescriptionabstract voidcreate()Abstract method that must be implemented by all factory subclasses.protected DeploymentContextConvenience method to get DeploymentContext.protected SecurityProfileConfigurationConvenience method to get SecurityProfileConfiguration.protected SystemContextConvenience method to get SystemContext.Methods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
ctx
-
cfc
-
config
-
-
Constructor Details
-
BaseFactory
Constructor that initializes contexts and automatically extracts annotated field values.- Parameters:
scope- The parent constructid- The construct ID
-
-
Method Details
-
getSystemContext
Convenience method to get SystemContext.- Returns:
- The SystemContext
-
getDeploymentContext
Convenience method to get DeploymentContext.- Returns:
- The DeploymentContext
-
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.
-