diff --git a/header/src/main/java/org/zstack/header/zql/BeforeApiCallExtensionPoint.java b/header/src/main/java/org/zstack/header/zql/BeforeApiCallExtensionPoint.java new file mode 100644 index 00000000000..52c39772ff3 --- /dev/null +++ b/header/src/main/java/org/zstack/header/zql/BeforeApiCallExtensionPoint.java @@ -0,0 +1,25 @@ +package org.zstack.header.zql; + +/** + * BeforeApiCallExtensionPoint is an extension point that allows plugins + * to perform custom operations before executing API calls. + * + * This provides a hook for business modules to execute pre-processing logic + * (such as health checks, validation, etc.) before API operations are performed. + */ +public interface BeforeApiCallExtensionPoint { + /** + * Check if this extension supports the given VO class + * @param voClass the VO class to check + * @return true if this extension supports the VO class, false otherwise + */ + boolean supports(Class voClass); + + /** + * Perform operations before executing API call. + * This allows business modules to trigger health checks or other pre-processing logic. + * + * @param voClass the VO class type + */ + void beforeApiCall(Class voClass); +} diff --git a/header/src/main/java/org/zstack/header/zql/BeforeCallZWatchReturnWithExtensionPoint.java b/header/src/main/java/org/zstack/header/zql/BeforeCallZWatchReturnWithExtensionPoint.java new file mode 100644 index 00000000000..a4023785b2f --- /dev/null +++ b/header/src/main/java/org/zstack/header/zql/BeforeCallZWatchReturnWithExtensionPoint.java @@ -0,0 +1,28 @@ +package org.zstack.header.zql; + +import java.util.List; + +/** + * BeforeCallZWatchReturnWithExtensionPoint is an extension point that allows plugins + * to perform custom operations before executing ZQL return with queries. + * + * This provides a hook for business modules to execute pre-processing logic + * (such as health checks, validation, etc.) before monitoring data is retrieved. + */ +public interface BeforeCallZWatchReturnWithExtensionPoint { + /** + * Check if this extension supports the given VO class + * @param voClass the VO class to check + * @return true if this extension supports the VO class, false otherwise + */ + boolean supports(Class voClass); + + /** + * Perform operations before executing ZQL return with query. + * This allows business modules to trigger health checks or other pre-processing logic. + * + * @param voClass the VO class type + * @param uuids the list of resource UUIDs to process + */ + void beforeCallZWatch(Class voClass, List uuids); +}