@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface MongockSupport
This annotation allows Flamingock to recognise and execute legacy Mongock changes
(@ChangeUnit) without requiring any modification to those immutable classes.
It serves as a bridge layer for systems migrating from Mongock to Flamingock while
maintaining operational continuity.
Annotate a configuration or adapter class with @MongockSupport to enable
Flamingock to discover and register Mongock-originated changes.
In Flamingock, every change unit must be associated with a target system, typically declared
via @TargetSystem(id="..."). Since legacy Mongock changes cannot be altered,
this annotation provides a unified way to assign all imported Mongock changes to a specific
target system.
@MongockSupport(targetSystem = "mongock-target-system")
public class MongockChangeAdapter {
// This class enables Flamingock to run Mongock changes
// originally defined with @ChangeUnit annotations.
}
Note: This annotation should only be used when integrating or migrating
from Mongock. For new Flamingock changes, use TargetSystem directly
within the change class definition.
| Modifier and Type | Required Element and Description |
|---|---|
java.lang.String |
targetSystem
Defines the identifier of the target system to which all Mongock-originated
change units will be bound.
|
| Modifier and Type | Optional Element and Description |
|---|---|
java.lang.String |
emptyOriginAllowed
Determines whether Flamingock should fail when importing from Mongock and the origin
collection/table is empty.
|
java.lang.String |
origin
Defines the origin collection/table name where Mongock audit entries are stored.
|
public abstract java.lang.String targetSystem
This value acts as a logical grouping or context key used by Flamingock to differentiate between multiple systems or databases managed by the same instance.
Example:
@MongockSupport(targetSystem = "mongock-target-system")
public class LegacyMongockSupport { }
public abstract java.lang.String origin
This value is optional. When empty (default), Flamingock will use Mongock's default origin (i.e., the default audit collection/table name used by Mongock in the corresponding driver).
Examples:
@MongockSupport(targetSystem = "mongock-target-system", origin = "mongockChangeLog")
public class LegacyMongockSupport { }
public abstract java.lang.String emptyOriginAllowed
Expected literal values are "true" or "false".
If empty (default), it will be treated as "false".
"true" to allow empty origin, "false" to fail; empty treated as "false"