Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Evolveum/midpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Kateryna Honchar committed May 25, 2022
2 parents 0023b0b + dbb0645 commit ef40699
Show file tree
Hide file tree
Showing 211 changed files with 3,673 additions and 2,237 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,10 @@ public class GuiStyleConstants {
*/
public static final String CLASS_BUTTON_OVERLAY_PLUS = "fa fa-plus";

public static final String CLASS_FILE_TEXT = "fa fa-file-text-o";
public static final String CLASS_FILE_EXCEL = "fa fa-file-excel-o";
public static final String CLASS_FILE_TEXT = "fas fa-file-alt";
public static final String CLASS_FILE_EXCEL = "fas fa-file-excel";
public static final String CLASS_FILE_BLACK_FILLED = "fa fa-file";
public static final String CLASS_FILE_WHITE_FILLED = "fa fa-file-o";
public static final String CLASS_FILE_WHITE_FILLED = "far fa-file";
public static final String CLASS_FILE_ARCHIVE = "fa fa-file-archive-o";
public static final String CLASS_LOCK_STATUS = "fa fa-lock";
public static final String CLASS_POLICY_RULES_ICON = "fa fa-balance-scale";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

@PageDescriptor(
urls = {
@Url(mountUrl = "/admin/archetypeNew")
@Url(mountUrl = "/admin/archetype")
},
encoder = OnePageParameterEncoder.class,
action = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

@PageDescriptor(
urls = {
@Url(mountUrl = "/admin/caseNew")
@Url(mountUrl = "/admin/case")
},
encoder = OnePageParameterEncoder.class, action = {
@AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_CASES_ALL_URL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ private boolean isVisibleRefresSchemaButton(ResourceType resource) {
if (!isEditingObject()) {
return false;
}
if (!resource.getAdditionalConnector().isEmpty()) {
if (!resource.getAdditionalConnector().isEmpty()) { // TODO what is this?
if (resource.getCapabilities() == null) {
return false;
}
Expand All @@ -190,7 +190,7 @@ private boolean isVisibleRefresSchemaButton(ResourceType resource) {
if (configuredCapability == null) {
return false;
}
return configuredCapability.isEnabled();
return !Boolean.FALSE.equals(configuredCapability.isEnabled());
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

@PageDescriptor(
urls = {
@Url(mountUrl = "/admin/newObjectCollection")
@Url(mountUrl = "/admin/objectCollection")
},
encoder = OnePageParameterEncoder.class,
action = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

@PageDescriptor(
urls = {
@Url(mountUrl = "/admin/newObjectTemplate")
@Url(mountUrl = "/admin/objectTemplate")
},
encoder = OnePageParameterEncoder.class,
action = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
@PageDescriptor(
urls = {
@Url(mountUrl = "/admin/orgHistoryNew", matchUrlForSecurity = "/admin/orgUnitHistory")
@Url(mountUrl = "/admin/orgHistory", matchUrlForSecurity = "/admin/orgUnitHistory")
},
action = {
@AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_ORG_ALL_URL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

@PageDescriptor(
urls = {
@Url(mountUrl = "/admin/reportNew")
@Url(mountUrl = "/admin/report")
},
encoder = OnePageParameterEncoder.class,
action = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

@PageDescriptor(
urls = {
@Url(mountUrl = "/admin/resourceNew")
@Url(mountUrl = "/admin/resource")
},
action = {
@AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_RESOURCES_ALL_URL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

@PageDescriptor(
urls = {
@Url(mountUrl = "/admin/roleNew", matchUrlForSecurity = "/admin/roleNew")
@Url(mountUrl = "/admin/role", matchUrlForSecurity = "/admin/role")
},
encoder = OnePageParameterEncoder.class, action = {
@AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_ROLES_ALL_URL, label = "PageAdminRoles.auth.roleAll.label", description = "PageAdminRoles.auth.roleAll.description"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*/
@PageDescriptor(
urls = {
@Url(mountUrl = "/admin/roleHistoryNew")
@Url(mountUrl = "/admin/roleHistory")
},
action = {
@AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_ROLES_ALL_URL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

@PageDescriptor(
urls = {
@Url(mountUrl = "/admin/serviceNew", matchUrlForSecurity = "/admin/serviceNew")
@Url(mountUrl = "/admin/service", matchUrlForSecurity = "/admin/service")
},
encoder = OnePageParameterEncoder.class, action = {
@AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_SERVICES_ALL_URL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/
@PageDescriptor(
urls = {
@Url(mountUrl = "/admin/serviceHistoryNew")
@Url(mountUrl = "/admin/serviceHistory")
},
encoder = OnePageParameterEncoder.class, action = {
@AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_SERVICES_ALL_URL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

@PageDescriptor(
urls = {
@Url(mountUrl = "/admin/taskNew")
@Url(mountUrl = "/admin/task")
},
encoder = OnePageParameterEncoder.class,
action = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

@PageDescriptor(
urls = {
@Url(mountUrl = "/admin/userNew", matchUrlForSecurity = "/admin/userNew")
@Url(mountUrl = "/admin/user", matchUrlForSecurity = "/admin/user")
},
encoder = OnePageParameterEncoder.class,
action = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/
@PageDescriptor(
urls = {
@Url(mountUrl = "/admin/userHistoryNew")
@Url(mountUrl = "/admin/userHistory")
},
action = {
@AuthorizationAction(actionUri = AuthorizationConstants.AUTZ_UI_USERS_ALL_URL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

@PageDescriptor(
urls = {
@Url(mountUrl = "/self/profile/org/unitNew")
@Url(mountUrl = "/self/profile/org")
},
action = {
@AuthorizationAction(actionUri = PageSelf.AUTH_SELF_ALL_URI,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

@PageDescriptor(
urls = {
@Url(mountUrl = "/self/profile/roleNew")
@Url(mountUrl = "/self/profile/role")
},
action = {
@AuthorizationAction(actionUri = PageSelf.AUTH_SELF_ALL_URI,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

@PageDescriptor(
urls = {
@Url(mountUrl = "/self/profile/serviceNew")
@Url(mountUrl = "/self/profile/service")
},
action = {
@AuthorizationAction(actionUri = PageSelf.AUTH_SELF_ALL_URI,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

@PageDescriptor(
urls = {
@Url(mountUrl = "/self/profile/userNew")
@Url(mountUrl = "/self/profile/user")
},
action = {
@AuthorizationAction(actionUri = PageSelf.AUTH_SELF_ALL_URI,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import org.springframework.context.annotation.Profile;
import org.springframework.core.Ordered;

import com.evolveum.midpoint.model.common.SystemObjectCache;
import com.evolveum.midpoint.repo.common.SystemObjectCache;

/**
* Custom configuration (factory) for embedded tomcat factory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.springframework.boot.web.server.WebServer;
import org.springframework.boot.web.servlet.ServletContextInitializer;

import com.evolveum.midpoint.model.common.SystemObjectCache;
import com.evolveum.midpoint.repo.common.SystemObjectCache;

/**
* Custom tomcat factory that used to hack embedded Tomcat setup.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
package com.evolveum.midpoint.web.boot;

import com.evolveum.midpoint.model.common.SystemObjectCache;
import com.evolveum.midpoint.repo.common.SystemObjectCache;

import com.evolveum.midpoint.prism.PrismObject;
import com.evolveum.midpoint.schema.result.OperationResult;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,10 @@

import com.evolveum.midpoint.task.api.TaskManager;

import org.apache.catalina.Context;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.valves.ValveBase;

import com.evolveum.midpoint.model.common.SystemObjectCache;
import com.evolveum.midpoint.util.logging.Trace;
import com.evolveum.midpoint.util.logging.TraceManager;

import org.apache.commons.lang3.StringUtils;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/
package com.evolveum.midpoint.web.boot;

import com.evolveum.midpoint.model.common.SystemObjectCache;
import com.evolveum.midpoint.util.logging.Trace;
import com.evolveum.midpoint.util.logging.TraceManager;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ private List<ACAttributeDto> prepareAssignmentAttributes(AssignmentType assignme

try {
PrismContext prismContext = pageBase.getPrismContext();
ResourceSchema refinedSchema = ResourceSchemaFactory.getCompleteSchema(resource, LayerType.PRESENTATION);
ResourceSchema refinedSchema = ResourceSchemaFactory.getCompleteSchemaRequired(resource, LayerType.PRESENTATION);
ResourceObjectDefinition objectClassDefinition = refinedSchema
.findObjectDefinition(ShadowKindType.ACCOUNT, construction.getIntent());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ private List<ACAttributeDto> loadAttributes() {
PrismObject<ResourceType> resource = getReference(construction.getResourceRef(), result);

PrismContext prismContext = getPageBase().getPrismContext();
ResourceSchema refinedSchema = ResourceSchemaFactory.getCompleteSchema(resource, LayerType.PRESENTATION);
ResourceSchema refinedSchema = ResourceSchemaFactory.getCompleteSchemaRequired(resource, LayerType.PRESENTATION);
ResourceObjectDefinition objectClassDefinition = refinedSchema
.findObjectDefinition(ShadowKindType.ACCOUNT, construction.getIntent());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
import com.evolveum.midpoint.gui.api.util.WebModelServiceUtils;
import com.evolveum.midpoint.init.InitialDataImport;
import com.evolveum.midpoint.model.api.ModelPublicConstants;
import com.evolveum.midpoint.model.common.SystemObjectCache;
import com.evolveum.midpoint.repo.common.SystemObjectCache;
import com.evolveum.midpoint.prism.PrismObject;
import com.evolveum.midpoint.prism.delta.ObjectDelta;
import com.evolveum.midpoint.prism.query.NotFilter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.evolveum.midpoint.common.LocalizationService;
import com.evolveum.midpoint.common.configuration.api.MidpointConfiguration;
import com.evolveum.midpoint.gui.api.page.PageAdminLTE;
import com.evolveum.midpoint.gui.api.page.PageBase;
import com.evolveum.midpoint.gui.api.util.MidPointApplicationConfiguration;
import com.evolveum.midpoint.gui.api.util.WebComponentUtil;
import com.evolveum.midpoint.gui.api.util.WebModelServiceUtils;
Expand All @@ -23,7 +22,7 @@
import com.evolveum.midpoint.gui.impl.converter.QueryTypeConverter;
import com.evolveum.midpoint.gui.impl.page.login.PageLogin;
import com.evolveum.midpoint.model.api.*;
import com.evolveum.midpoint.model.common.SystemObjectCache;
import com.evolveum.midpoint.repo.common.SystemObjectCache;
import com.evolveum.midpoint.prism.PrismContext;
import com.evolveum.midpoint.prism.PrismObject;
import com.evolveum.midpoint.prism.crypto.Protector;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
<displayOrder>20</displayOrder>
<display>
<label>File format</label>
<cssClass>fa fa-file-text-o</cssClass>
<cssClass>fas fa-file-alt</cssClass>
<icon>
<cssClass>fa fa-file-text-o</cssClass>
<cssClass>fas fa-file-alt</cssClass>
</icon>
</display>
<container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ default ResourceAttributeDefinition<?> getDisplayNameAttribute() {

/**
* Returns the delineation of the set of objects belonging to this object type.
*
* Note that this tells only about information stored right in the definition bean, i.e. legacy configuration
* is not provided here. The complete picture is provided by {@link SynchronizationPolicy#getDelineation()}.
*/
@NotNull ResourceObjectTypeDelineation getDelineation();

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

import com.evolveum.midpoint.prism.PrismObject;
import com.evolveum.midpoint.schema.constants.SchemaConstants;
import com.evolveum.midpoint.schema.util.ShadowUtil;
import com.evolveum.midpoint.util.MiscUtil;
import com.evolveum.midpoint.util.QNameUtil;
import com.evolveum.midpoint.util.exception.ConfigurationException;
Expand All @@ -29,7 +30,8 @@
import static com.evolveum.midpoint.util.MiscUtil.argCheck;

/**
* Methods for determining object definition for given kind/intent/object class.
* Methods for determining object definition for given kind/intent/object class. They build upon basic methods
* for definition lookup in {@link ResourceSchema}.
*
* There are two basic methods:
*
Expand Down Expand Up @@ -70,12 +72,12 @@ public class ResourceObjectDefinitionResolver {
String intent;

// Ignoring "UNKNOWN" values
if (shadow.getKind() == null || shadow.getKind() == ShadowKindType.UNKNOWN) {
if (ShadowUtil.isNotKnown(shadow.getKind())) {
kind = null;
intent = null;
} else {
kind = shadow.getKind();
if (SchemaConstants.INTENT_UNKNOWN.equals(shadow.getIntent())) {
if (ShadowUtil.isNotKnown(shadow.getIntent())) {
intent = null;
} else {
intent = shadow.getIntent();
Expand All @@ -87,6 +89,7 @@ public class ResourceObjectDefinitionResolver {
if (kind != null) {
structuralDefinition = resourceSchema.findObjectDefinition(kind, intent, objectClassName);
} else if (objectClassName != null) {
// TODO or findObjectClassDefinition?
structuralDefinition = resourceSchema.findDefinitionForObjectClass(objectClassName);
} else {
structuralDefinition = null;
Expand Down Expand Up @@ -179,6 +182,7 @@ public static ResourceObjectDefinition getObjectDefinitionPrecisely(
// Kind is null or unknown, so the object class name must be specified
// FIXME Sometimes we want to look for the raw OC definition, e.g. when searching for all items in OC. (MID-7470.)
// But maybe that's out of scope of this method, and should be resolved in ProvisioningContextFactory.
// TODO or findObjectClassDefinition here?
objectDefinition = resourceSchema.findDefinitionForObjectClass(objectClassName);
if (objectDefinition == null) {
throw new ConfigurationException("No object type or class definition for object class: " + objectClassName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public boolean isDefaultForKind() {
}

/** Sets the delineation and freezes the holder. */
public void setDelineation(@NotNull ResourceObjectTypeDelineation value) {
void setDelineation(@NotNull ResourceObjectTypeDelineation value) {
delineation.setValue(value);
delineation.freeze();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.jetbrains.annotations.Nullable;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
Expand Down Expand Up @@ -80,4 +81,21 @@ public static ResourceObjectTypeDelineation of(
return searchHierarchyScope;
}

public @NotNull List<SearchFilterType> getAllFilterClauses() {
List<SearchFilterType> all = new ArrayList<>();
if (filter != null) {
all.add(filter);
}
all.addAll(filterClauses);
return all;
}

public @Nullable ExpressionType getClassificationCondition() {
return classificationCondition;
}

@NotNull ResourceObjectTypeDelineation classificationCondition(ExpressionType condition) {
return new ResourceObjectTypeDelineation(
baseContext, searchHierarchyScope, filter, filterClauses, condition);
}
}

0 comments on commit ef40699

Please sign in to comment.