Started implementing mdm passive mode

This commit is contained in:
Ken Stevens 2024-11-21 18:35:39 -05:00
parent dea9706652
commit 6c519ef81c
3 changed files with 18 additions and 0 deletions

View File

@ -48,6 +48,11 @@ public interface IBaseInterceptorService<POINTCUT extends IPointcut> extends IBa
*/
List<Object> getAllRegisteredInterceptors();
default boolean hasRegisteredInterceptor(Class<?> theInterceptorClass) {
return getAllRegisteredInterceptors().stream().anyMatch(t -> t.getClass().equals(theInterceptorClass));
}
/**
* Unregisters all registered interceptors.
*/

View File

@ -72,4 +72,7 @@ public interface IMdmSettings {
default void setAutoExpungeGoldenResources(boolean theShouldAutoExpunge) {
throw new UnsupportedOperationException(Msg.code(2427));
}
// In passive mode, the Patient/$match operation is available, but no mdm processing takes place.
boolean isPassiveModeEnabled();
}

View File

@ -42,6 +42,7 @@ public class MdmSettings implements IMdmSettings {
private String myGoldenResourcePartitionName;
private boolean mySearchAllPartitionForMatch = false;
private boolean myShouldAutoDeleteGoldenResources = true;
private boolean myPassiveModeEnabled = false;
/**
* If disabled, the underlying MDM system will operate under the following assumptions:
@ -169,4 +170,13 @@ public class MdmSettings implements IMdmSettings {
public void setAutoExpungeGoldenResources(boolean theShouldAutoExpunge) {
myShouldAutoDeleteGoldenResources = theShouldAutoExpunge;
}
public void setPassiveModeEnabled(boolean thePassiveModeEnabled) {
myPassiveModeEnabled = thePassiveModeEnabled;
}
@Override
public boolean isPassiveModeEnabled() {
return myPassiveModeEnabled;
}
}