Skip to content

Commit

Permalink
cleanup missing refs fix after refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Apr 24, 2024
1 parent 9a656ff commit f18780e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import com.evolveum.midpoint.util.exception.SchemaException;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectReferenceType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType;
import com.intellij.notification.NotificationAction;
import com.intellij.notification.NotificationType;
import com.intellij.openapi.actionSystem.AnActionEvent;
Expand Down Expand Up @@ -154,6 +155,10 @@ private String cleanupObject(MidPointObject object) {
validator.setWarnPlannedRemovalVersion(current);

for (PrismObject<? extends ObjectType> obj : clonedObjects) {
if (ResourceType.COMPLEX_TYPE.equals(obj.getDefinition().getTypeName())) {
applyConnectorSchema((PrismObject<ResourceType>) obj);
}

CleanupResult cleanupResult = processor.process(obj);

ValidationResult validationResult = validator.validate(obj);
Expand All @@ -180,6 +185,10 @@ private String cleanupObject(MidPointObject object) {
return content;
}

private void applyConnectorSchema(PrismObject<ResourceType> resource) {
// todo apply connector schema
}

private void updateMissingReferencesSummary(MidPointObject object, List<CleanupItem<?>> messages) {
MissingRefObject missingRefObject =
buildObjectReferencesConfiguration(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import com.evolveum.midpoint.prism.PrismObject;
import com.evolveum.midpoint.studio.MidPointConstants;
import com.evolveum.midpoint.studio.client.MidPointObject;
import com.evolveum.midpoint.studio.impl.configuration.CleanupConfiguration;
import com.evolveum.midpoint.studio.impl.configuration.CleanupService;
import com.evolveum.midpoint.studio.impl.psi.search.ObjectFileBasedIndexImpl;
import com.evolveum.midpoint.studio.util.MavenUtils;
import com.evolveum.midpoint.studio.util.MidPointUtils;
Expand Down Expand Up @@ -36,6 +38,10 @@ public StudioCleanupListener(

this.project = project;
this.client = client;

CleanupService cs = CleanupService.get(project);
CleanupConfiguration configuration = cs.getSettings();
setWarnAboutMissingReferences(configuration.isWarnAboutMissingReferences());
}

@Override
Expand Down

0 comments on commit f18780e

Please sign in to comment.