Class FrameworkLoader

java.lang.Object
com.cloudforgeci.api.core.rules.FrameworkLoader

public final class FrameworkLoader extends Object
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:

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 Details

    • discover

      public static List<FrameworkRules<SystemContext>> 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