Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Evolveum/midpoint
Browse files Browse the repository at this point in the history
* 'master' of github.com:Evolveum/midpoint: (48 commits)
  Shuffle sync-related class names
  Add missing resource-related XSD documentation
  changed search button to new component
  dropping support for JDK 11, midPoint language level is now 17
  midpoint-jar POM: removal of JDBC dependencies, useless here
  fix for NPE in ConnectorConfigurationPropertyWrapperFactory
  fix code after review (javadoc in ModelService and cleanup code in ModelController)
  button component for search panel
  removal of WAR module, no more WAR here, only JAR
  native repo: operationResult.computeStatusIfUnknown() -> close()
  Add a draft of javadoc for OperationResult
  MID-7937: fixed build for JDK 17.0.3 and Windows
  Revert "MID-7746: adding new repo mapping for resource/admOpState/admAvailStatus"
  fix for assert of discovered connector configuration properties (provisioning tests)
  popover arrow style fix
  adding new resource wizard step for discovered connector configuration
  MID-7746: adding new repo mapping for resource/admOpState/admAvailStatus
  MID-7746: adding new repo mapping for resource/admOpState/admAvailStatus
  Reduce resource schema related magic
  Improve classification algorithm
  ...
  • Loading branch information
katkav committed Jun 29, 2022
2 parents 67b8ec0 + 4c2fb43 commit bd92e88
Show file tree
Hide file tree
Showing 263 changed files with 6,222 additions and 4,101 deletions.
1 change: 1 addition & 0 deletions config/sql/native-new/postgres-new-audit.sql
Original file line number Diff line number Diff line change
Expand Up @@ -339,4 +339,5 @@ limit 50;
*/

-- Initializing the last change number used in postgres-new-upgrade.sql.
-- This is important to avoid applying any change more than once.
call apply_audit_change(2, $$ SELECT 1 $$, true);
21 changes: 20 additions & 1 deletion config/sql/native-new/postgres-new-upgrade.sql
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ Current database name is ''%'', schema name is ''%''.', current_database(), curr
END
$$;

-- SCHEMA-COMMIT 4.4: commit 69e8c29b
-- SCHEMA-COMMIT 4.4: commit 20ad200b
-- see: https://github.com/Evolveum/midpoint/blob/20ad200bd10a114fd70d2d131c0d11b5cd920150/config/sql/native-new/postgres-new.sql

-- changes for 4.4.1

Expand Down Expand Up @@ -92,6 +93,7 @@ CREATE INDEX m_message_template_modifyTimestamp_idx ON m_message_template (modif
$aa$);

-- MID-7487 Identity matching
-- We add the new enum value in separate change, because it must be committed before it is used.
call apply_change(4, $aa$
CREATE TYPE CorrelationSituationType AS ENUM ('UNCERTAIN', 'EXISTING_OWNER', 'NO_OWNER', 'ERROR');
$aa$);
Expand All @@ -110,6 +112,23 @@ CREATE INDEX m_shadow_correlationCaseOpenTimestamp_idx ON m_shadow (correlationC
CREATE INDEX m_shadow_correlationCaseCloseTimestamp_idx ON m_shadow (correlationCaseCloseTimestamp);
$aa$);

-- SCHEMA-COMMIT 4.5: commit c5f19c9e

-- changes for 4.6

-- MID-7746
-- We add the new enum value in separate change, because it must be committed before it is used.
call apply_change(6, $aa$
CREATE TYPE AdministrativeAvailabilityStatusType AS ENUM ('MAINTENANCE', 'OPERATIONAL');
$aa$);

call apply_change(7, $aa$
ALTER TABLE m_resource
ADD COLUMN administrativeOperationalStateAdministrativeAvailabilityStatus AdministrativeAvailabilityStatusType;
$aa$);

-- SCHEMA-COMMIT 4.6: commit TODO

-- WRITE CHANGES ABOVE ^^
-- IMPORTANT: update apply_change number at the end of postgres-new.sql
-- to match the number used in the last change here!
8 changes: 7 additions & 1 deletion config/sql/native-new/postgres-new.sql
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ CREATE TYPE AccessCertificationCampaignStateType AS ENUM (

CREATE TYPE ActivationStatusType AS ENUM ('ENABLED', 'DISABLED', 'ARCHIVED');

CREATE TYPE AdministrativeAvailabilityStatusType AS ENUM ('MAINTENANCE', 'OPERATIONAL');

CREATE TYPE AvailabilityStatusType AS ENUM ('DOWN', 'UP', 'BROKEN');

CREATE TYPE CorrelationSituationType AS ENUM ('UNCERTAIN', 'EXISTING_OWNER', 'NO_OWNER', 'ERROR');
Expand Down Expand Up @@ -827,6 +829,9 @@ CREATE TABLE m_resource (
objectType ObjectType GENERATED ALWAYS AS ('RESOURCE') STORED
CHECK (objectType = 'RESOURCE'),
businessAdministrativeState ResourceAdministrativeStateType,
-- administrativeOperationalState/administrativeAvailabilityStatus
administrativeOperationalStateAdministrativeAvailabilityStatus AdministrativeAvailabilityStatusType,
-- operationalState/lastAvailabilityStatus
operationalStateLastAvailabilityStatus AvailabilityStatusType,
connectorRefTargetOid UUID,
connectorRefTargetType ObjectType,
Expand Down Expand Up @@ -1903,4 +1908,5 @@ END $$;
-- endregion

-- Initializing the last change number used in postgres-new-upgrade.sql.
call apply_change(5, $$ SELECT 1 $$, true);
-- This is important to avoid applying any change more than once.
call apply_change(7, $$ SELECT 1 $$, true);
15 changes: 1 addition & 14 deletions dist/javadoc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
<maven.install.skip>true</maven.install.skip>
<!-- This enables build without -DskipTests option (e.g. full build). -->
<maven.test.skip>true</maven.test.skip>
<!-- Profile for JDK11 sets additional javadocs options for java 11 (which are removed in java 13+). -->
<javadoc.options></javadoc.options>
</properties>

Expand Down Expand Up @@ -75,7 +74,7 @@
<debug>false</debug>

<!--
TODO: Not usable yet, see https://github.com/asciidoctor/asciidoclet/pull/96 for the progress on JDK 11 support.
TODO: Not usable yet, see https://github.com/asciidoctor/asciidoclet/pull/96 for the progress on JDK 11+ support.
Currently fails on:
[ERROR] javadoc: error - invalid flag: -author
Expand Down Expand Up @@ -117,16 +116,4 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>active-on-jdk-11</id>
<activation>
<jdk>11</jdk>
</activation>
<properties>
<javadoc.options>--no-module-directories</javadoc.options>
</properties>
</profile>
</profiles>
</project>
14 changes: 1 addition & 13 deletions dist/midpoint-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

<properties>
<maven.test.skip>true</maven.test.skip>
<!-- Profile for JDK11 sets additional javadocs options for java 11 (which are removed in java 13+). -->
<javadoc.options></javadoc.options>
</properties>

Expand Down Expand Up @@ -93,7 +92,7 @@
<additionalJOption>${javadoc.options}</additionalJOption>

<!--
TODO: Not usable yet, see https://github.com/asciidoctor/asciidoclet/pull/96 for the progress on JDK 11 support.
TODO: Not usable yet, see https://github.com/asciidoctor/asciidoclet/pull/96 for the progress on JDK 11+ support.
Currently fails on:
[ERROR] javadoc: error - invalid flag: -author
Expand Down Expand Up @@ -129,15 +128,4 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>active-on-jdk-11</id>
<activation>
<jdk>11</jdk>
</activation>
<properties>
<javadoc.options>--no-module-directories</javadoc.options>
</properties>
</profile>
</profiles>
</project>
5 changes: 0 additions & 5 deletions dist/src/main/assembly/dist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
<source>../gui/midpoint-jar/target/midpoint.jar</source>
<destName>lib/midpoint.jar</destName>
</file>
<!-- TODO: temporary, will go away during 2022-06 -->
<file>
<source>../gui/midpoint-war/target/midpoint.war</source>
<destName>lib/midpoint.war</destName>
</file>
</files>
<fileSets>
<fileSet>
Expand Down
7 changes: 6 additions & 1 deletion gui/admin-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@
<artifactId>model-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.provisioning</groupId>
<artifactId>provisioning-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.model</groupId>
<artifactId>model-common</artifactId>
Expand Down Expand Up @@ -738,7 +743,7 @@

<!--
We use both main and test classes downstream.
We can't use JAR plugin for main classes, Maven requires different classifier than for
TODO (still true?): We can't use JAR plugin for main classes, Maven requires different classifier than for
the main artifact (which is WAR for admin-gui).
-->
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* and European Union Public License. See LICENSE file for details.
*/

package com.evolveum.midpoint.gui.impl.page.self.requestAccess;
package com.evolveum.midpoint.gui.api.component;

import java.io.Serializable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* and European Union Public License. See LICENSE file for details.
*/

package com.evolveum.midpoint.gui.impl.page.self.requestAccess;
package com.evolveum.midpoint.gui.api.component;

import java.io.Serializable;
import java.util.List;
Expand All @@ -22,7 +22,6 @@
import org.apache.wicket.markup.html.panel.Fragment;
import org.apache.wicket.model.IModel;

import com.evolveum.midpoint.gui.api.component.BasePanel;
import com.evolveum.midpoint.web.component.util.VisibleBehaviour;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

package com.evolveum.midpoint.gui.api.component.wizard;

import com.evolveum.midpoint.gui.api.util.WebComponentUtil;
import com.evolveum.midpoint.web.component.AjaxSubmitButton;
import com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour;
import com.evolveum.midpoint.web.component.util.VisibleBehaviour;
Expand Down Expand Up @@ -66,7 +67,7 @@ public void onClick(AjaxRequestTarget target) {
back.add(getBackBehaviour());
back.setOutputMarkupId(true);
back.setOutputMarkupPlaceholderTag(true);
back.add(AttributeAppender.append("class", () -> !back.isEnabledInHierarchy() ? "disabled" : null));
WebComponentUtil.addDisabledClassBehavior(back);
add(back);

AjaxSubmitButton next = new AjaxSubmitButton(ID_NEXT) {
Expand All @@ -84,7 +85,7 @@ protected void onError(AjaxRequestTarget target) {
next.add(getNextBehaviour());
next.setOutputMarkupId(true);
next.setOutputMarkupPlaceholderTag(true);
next.add(AttributeAppender.append("class", () -> !next.isEnabledInHierarchy() ? "disabled" : null));
WebComponentUtil.addDisabledClassBehavior(next);
add(next);

Label nextLabel = new Label(ID_NEXT_LABEL, () -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

package com.evolveum.midpoint.gui.api.component.wizard;

import com.evolveum.midpoint.gui.api.util.WebComponentUtil;

import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
Expand Down Expand Up @@ -39,8 +41,8 @@ public WizardHeader(String id, IModel<String> currentPanelTitle, IModel<String>
}

@Override
protected void onConfigure() {
super.onConfigure();
protected void onBeforeRender() {
super.onBeforeRender();

addOrReplace(createHeaderContent(ID_CONTENT));
}
Expand Down Expand Up @@ -70,7 +72,7 @@ public void onClick(AjaxRequestTarget target) {
};
next.setOutputMarkupId(true);
next.setOutputMarkupPlaceholderTag(true);
next.add(AttributeAppender.append("class", () -> !next.isEnabledInHierarchy() ? "disabled" : null));
WebComponentUtil.addDisabledClassBehavior(next);

next.add(new BehaviourDelegator(() -> getNextVisibilityBehaviour()));

Expand All @@ -93,7 +95,7 @@ public void onClick(AjaxRequestTarget target) {
};
back.setOutputMarkupId(true);
back.setOutputMarkupPlaceholderTag(true);
back.add(AttributeAppender.append("class", () -> !back.isEnabledInHierarchy() ? "disabled" : null));
WebComponentUtil.addDisabledClassBehavior(back);

back.add(new BehaviourDelegator(() -> getBackVisibilityBehaviour()));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/
package com.evolveum.midpoint.gui.api.factory.wrapper;

import com.evolveum.midpoint.provisioning.api.DiscoveredConfiguration;
import com.evolveum.midpoint.schema.ResourceShadowCoordinates;
import com.evolveum.midpoint.schema.processor.ResourceAssociationDefinition;
import com.evolveum.midpoint.gui.api.prism.ItemStatus;
Expand All @@ -14,12 +15,14 @@
import com.evolveum.midpoint.prism.path.ItemPath;
import com.evolveum.midpoint.schema.result.OperationResult;
import com.evolveum.midpoint.task.api.Task;
import com.evolveum.midpoint.util.DisplayableValue;
import com.evolveum.midpoint.util.annotation.Experimental;
import com.evolveum.midpoint.util.exception.SchemaException;
import com.evolveum.midpoint.xml.ns._public.common.common_3.*;

import org.jetbrains.annotations.NotNull;

import javax.xml.namespace.QName;
import java.util.*;

/**
Expand Down Expand Up @@ -63,6 +66,8 @@ public class WrapperContext {
private GuiObjectDetailsPageType detailsPageTypeConfiguration;
private Collection<VirtualContainersSpecificationType> virtualContainers = new ArrayList<>();

private DiscoveredConfiguration connectorConfigurationSuggestions;

public WrapperContext(Task task, OperationResult result) {
this.task = task;
this.result = result != null ? result : new OperationResult("temporary"); // TODO !!!
Expand Down Expand Up @@ -245,6 +250,14 @@ public void setDetailsPageTypeConfiguration(GuiObjectDetailsPageType detailsPage
this.detailsPageTypeConfiguration = detailsPageTypeConfiguration;
}

public DiscoveredConfiguration getConnectorConfigurationSuggestions() {
return connectorConfigurationSuggestions;
}

public void setConnectorConfigurationSuggestions(DiscoveredConfiguration connectorConfigurationSuggestions) {
this.connectorConfigurationSuggestions = connectorConfigurationSuggestions;
}

public WrapperContext clone() {
WrapperContext ctx = new WrapperContext(task,result);
ctx.setAuthzPhase(authzPhase);
Expand All @@ -261,6 +274,7 @@ public WrapperContext clone() {
ctx.setMetadataItemProcessingSpec(metadataItemProcessingSpec);
ctx.lookupTableCache = lookupTableCache;
ctx.setDetailsPageTypeConfiguration(detailsPageTypeConfiguration);
ctx.setConnectorConfigurationSuggestions(connectorConfigurationSuggestions);
return ctx;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
import com.evolveum.midpoint.gui.api.prism.wrapper.ItemWrapper;
import com.evolveum.midpoint.gui.api.prism.wrapper.PrismContainerValueWrapper;
import com.evolveum.midpoint.gui.api.prism.wrapper.PrismValueWrapper;
import com.evolveum.midpoint.gui.api.registry.DataProviderRegistry;
import com.evolveum.midpoint.gui.api.registry.GuiComponentRegistry;
import com.evolveum.midpoint.gui.api.util.ModelServiceLocator;
import com.evolveum.midpoint.gui.api.util.WebComponentUtil;
Expand Down Expand Up @@ -232,6 +233,9 @@ public abstract class PageAdminLTE extends WebPage implements ModelServiceLocato
@SpringBean
private GuiComponentRegistry registry;

@SpringBean
private DataProviderRegistry dataProviderRegistry;

@SpringBean
private DefaultGuiConfigurationCompiler guiConfigurationRegistry;

Expand Down Expand Up @@ -540,6 +544,10 @@ public GuiComponentRegistry getRegistry() {
return registry;
}

public DataProviderRegistry getDataProviderRegistry() {
return dataProviderRegistry;
}

public CacheDispatcher getCacheDispatcher() {
return cacheDispatcher;
}
Expand Down Expand Up @@ -583,6 +591,7 @@ public Task getPageTask() {
return pageTask;
}

@Override
@Contract(pure = true)
public PrismContext getPrismContext() {
return getMidpointApplication().getPrismContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@
import com.evolveum.midpoint.gui.impl.prism.wrapper.PrismPropertyValueWrapper;
import com.evolveum.midpoint.prism.PrismProperty;
import com.evolveum.midpoint.prism.PrismPropertyDefinition;
import com.evolveum.midpoint.util.DisplayableValue;
import com.evolveum.midpoint.xml.ns._public.common.common_3.LookupTableType;

import java.util.Collection;

/**
* @author katka
*
Expand All @@ -19,5 +22,4 @@ public interface PrismPropertyWrapper<T> extends ItemWrapper<PrismProperty<T>, P

String getPredefinedValuesOid();
void setPredefinedValuesOid(String oid);

}

0 comments on commit bd92e88

Please sign in to comment.