Package com.cloudforgeci.api.core.rules
Class FrameworkLoader
java.lang.Object
com.cloudforgeci.api.core.rules.FrameworkLoader
Discovers and loads compliance framework validators using Java ServiceLoader.
This class scans the classpath for implementations of FrameworkRules
annotated with ComplianceFramework and provides them in priority order
for installation into the CDK construct tree.
Discovery Mechanism (v2.0):
Frameworks are discovered via Java's ServiceLoader by registering in:
META-INF/services/com.cloudforge.core.interfaces.FrameworkRules
Each framework must:
- Implement
FrameworkRules<SystemContext> - Be annotated with
ComplianceFrameworkto provide metadata - Have a no-args public constructor
Example Framework:
@ComplianceFramework(
value = "HIPAA",
priority = 10,
displayName = "HIPAA Security Rule",
description = "Validates HIPAA requirements"
)
public class HipaaRules implements FrameworkRules<SystemContext> {
@Override
public void install(SystemContext ctx) {
// Validation logic
}
}
- Since:
- 3.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<FrameworkRules<SystemContext>> discover()Discover all compliance frameworks available on the classpath.
-
Method Details
-
discover
Discover all compliance frameworks available on the classpath.Returns frameworks in priority order (lowest priority value first). Frameworks with the same priority are ordered alphabetically by framework ID.
- Returns:
- list of discovered frameworks sorted by priority
-