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
KaterynaHonchar committed Dec 21, 2018
2 parents 87aa7da + b20bb76 commit 0128832
Show file tree
Hide file tree
Showing 54 changed files with 3,914 additions and 3,646 deletions.
30 changes: 15 additions & 15 deletions .tx/config
@@ -1,15 +1,15 @@
[main]
host = https://www.transifex.com

[midpoint.admin-gui]
file_filter = gui/admin-gui/src/main/resources/localization/Midpoint_<lang>.properties
source_file = gui/admin-gui/src/main/resources/localization/Midpoint.properties
source_lang = en
type = UNICODEPROPERTIES

[midpoint.schema]
file_filter = infra/schema/src/main/resources/localization/schema_<lang>.properties
source_file = infra/schema/src/main/resources/localization/schema.properties
source_lang = en
type = UNICODEPROPERTIES

[main]
host = https://www.transifex.com
[midpoint.admin-gui]
file_filter = gui/admin-gui/src/main/resources/localization/Midpoint_<lang>.properties
source_file = gui/admin-gui/src/main/resources/localization/Midpoint.properties
source_lang = en
type = UNICODEPROPERTIES
[midpoint.schema]
file_filter = infra/schema/src/main/resources/localization/schema_<lang>.properties
source_file = infra/schema/src/main/resources/localization/schema.properties
source_lang = en
type = UNICODEPROPERTIES
2 changes: 1 addition & 1 deletion build-system/pom.xml
Expand Up @@ -682,7 +682,7 @@
<dependency>
<groupId>com.evolveum.polygon</groupId>
<artifactId>connector-csv</artifactId>
<version>2.2</version>
<version>2.3</version>
</dependency>
<dependency>
<groupId>com.evolveum.polygon</groupId>
Expand Down
Expand Up @@ -33,7 +33,6 @@

public class AutoCompleteItemDefinitionPanel extends AbstractAutoCompletePanel {


private static final long serialVersionUID = 1L;
private static final String ID_INPUT = "input";

Expand Down Expand Up @@ -73,18 +72,22 @@ protected void onConfigure() {

@Override
protected void onUpdate(AjaxRequestTarget target) {
String newValue = itemDefinitionAsStringModel.getObject();
if (StringUtils.isNotBlank(newValue)){
ItemDefinition<?> def = listChoices("").get(newValue);
if (def != null) {
model.setObject(def);
}
}
onUpdateAutoComplete(target, itemDefinitionAsStringModel, model);
}
});

add(input);
}

protected void onUpdateAutoComplete(AjaxRequestTarget target, final Model<String> itemDefinitionAsStringModel, final IModel<ItemDefinition<?>> model) {
String newValue = itemDefinitionAsStringModel.getObject();
if (StringUtils.isNotBlank(newValue)){
ItemDefinition<?> def = listChoices("").get(newValue);
if (def != null) {
model.setObject(def);
}
}
}

protected Map<String, ItemDefinition<?>> listChoices(String input){
return new HashMap<>();
Expand Down
Expand Up @@ -86,6 +86,12 @@ public boolean isPathDefined() {
return (path != null && itemDef == null && parentPath == null);
}


@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{ObjectType: [").append("], Parent: [").append(parentPath).append("], ItemDef: [")
.append(getItemDef()).append("], Path: [").append(path).append("] }");
return sb.toString();
}

}
Expand Up @@ -32,7 +32,7 @@
public class ItemPathPanel extends BasePanel<ItemPathDto> {

private static final long serialVersionUID = 1L;

private static final String ID_ITEM_PATH = "itemPath";
private static final String ID_NAMESPACE = "namespace";
private static final String ID_DEFINITION = "definition";
Expand Down Expand Up @@ -94,6 +94,7 @@ public boolean isVisible() {
public ItemPathDto getObject() {
return ItemPathPanel.this.getModelObject();
}

}) {

private static final long serialVersionUID = 1L;
Expand All @@ -102,6 +103,11 @@ public ItemPathDto getObject() {
protected Map<QName, Collection<ItemDefinition<?>>> getSchemaDefinitionMap() {
return initNamspaceDefinitionMap();
}

@Override
protected void onUpdateAutoCompletePanel(AjaxRequestTarget target) {
ItemPathPanel.this.onUpdate(ItemPathPanel.this.getModelObject());
}
};
itemDefPanel.setOutputMarkupId(true);
itemPathPanel.add(itemDefPanel);
Expand Down
Expand Up @@ -8,6 +8,7 @@

import org.apache.commons.lang.StringUtils;
import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
Expand All @@ -22,7 +23,7 @@
public class ItemPathSegmentPanel extends BasePanel<ItemPathDto> {

private static final long serialVersionUID = 1L;

private static final String ID_DEFINITION = "definition";
private static final String ID_PARENT = "parentPath";

Expand Down Expand Up @@ -75,11 +76,23 @@ protected Map<String, ItemDefinition<?>> listChoices(String input) {
return collectAvailableDefinitions(input);

}

@Override
protected void onUpdateAutoComplete(AjaxRequestTarget target,
Model<String> itemDefinitionAsStringModel, IModel<ItemDefinition<?>> model) {
super.onUpdateAutoComplete(target, itemDefinitionAsStringModel, model);
onUpdateAutoCompletePanel(target);
}

};
// itemDefPanel.getBaseFormComponent().add(new EmptyOnBlurAjaxFormUpdatingBehaviour());
itemDefPanel.setOutputMarkupId(true);
add(itemDefPanel);
}

protected void onUpdateAutoCompletePanel(AjaxRequestTarget target) {

}

private Map<String, ItemDefinition<?>> collectAvailableDefinitions(String input) {
Map<String, ItemDefinition<?>> toSelect = new HashMap<>();
Expand Down
Expand Up @@ -586,7 +586,7 @@ public CompiledUserProfile getCompiledUserProfile() {
Task task = createSimpleTask(PageBase.DOT_CLASS + "getCompiledUserProfile");
try {
compiledUserProfile = modelInteractionService.getCompiledUserProfile(task, task.getResult());
} catch (ObjectNotFoundException | SchemaException e) {
} catch (ObjectNotFoundException | SchemaException | CommunicationException | ConfigurationException | SecurityViolationException | ExpressionEvaluationException e) {
LoggingUtils.logUnexpectedException(LOGGER, "Cannot retrieve compiled user profile", e);
if (InternalsConfig.nonCriticalExceptionsAreFatal()) {
throw new SystemException("Cannot retrieve compiled user profile: " + e.getMessage(), e);
Expand Down
Expand Up @@ -23,8 +23,12 @@
import com.evolveum.midpoint.schema.result.OperationResult;
import com.evolveum.midpoint.task.api.Task;
import com.evolveum.midpoint.task.api.TaskManager;
import com.evolveum.midpoint.util.exception.CommunicationException;
import com.evolveum.midpoint.util.exception.ConfigurationException;
import com.evolveum.midpoint.util.exception.ExpressionEvaluationException;
import com.evolveum.midpoint.util.exception.ObjectNotFoundException;
import com.evolveum.midpoint.util.exception.SchemaException;
import com.evolveum.midpoint.util.exception.SecurityViolationException;
import com.evolveum.midpoint.util.exception.SystemException;
import com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour;
import com.evolveum.midpoint.web.security.MidPointApplication;
Expand Down Expand Up @@ -83,7 +87,7 @@ public boolean isVisible() {
CompiledUserProfile config;
try {
config = getModelInteractionService().getCompiledUserProfile(task, result);
} catch (ObjectNotFoundException | SchemaException e) {
} catch (ObjectNotFoundException | SchemaException | CommunicationException | ConfigurationException | SecurityViolationException | ExpressionEvaluationException e) {
throw new SystemException("Cannot load GUI configuration: " + e.getMessage(), e);
}

Expand Down
Expand Up @@ -26,8 +26,12 @@
import com.evolveum.midpoint.schema.constants.SchemaConstants;
import com.evolveum.midpoint.schema.result.OperationResult;
import com.evolveum.midpoint.util.QNameUtil;
import com.evolveum.midpoint.util.exception.CommunicationException;
import com.evolveum.midpoint.util.exception.ConfigurationException;
import com.evolveum.midpoint.util.exception.ExpressionEvaluationException;
import com.evolveum.midpoint.util.exception.ObjectNotFoundException;
import com.evolveum.midpoint.util.exception.SchemaException;
import com.evolveum.midpoint.util.exception.SecurityViolationException;
import com.evolveum.midpoint.web.component.prism.ContainerValueWrapper;
import com.evolveum.midpoint.web.component.prism.ContainerWrapper;
import com.evolveum.midpoint.web.session.RoleCatalogStorage;
Expand Down Expand Up @@ -433,7 +437,7 @@ public static int loadAssignmentsLimit(OperationResult result, PageBase pageBase
if (adminGuiConfig != null && adminGuiConfig.getRoleManagement() != null){
assignmentsLimit = adminGuiConfig.getRoleManagement().getAssignmentApprovalRequestLimit();
}
} catch (ObjectNotFoundException | SchemaException ex){
} catch (ObjectNotFoundException | SchemaException | CommunicationException | ConfigurationException | SecurityViolationException | ExpressionEvaluationException ex){
LOGGER.error("Error getting system configuration: {}", ex.getMessage(), ex);
}
return assignmentsLimit;
Expand Down
Expand Up @@ -303,7 +303,7 @@ private static <T extends ObjectType> SearchBoxModeType getDefaultSearchType(Mod
}
}
return null;
} catch (SchemaException | ObjectNotFoundException ex) {
} catch (SchemaException | ObjectNotFoundException | CommunicationException | ConfigurationException | SecurityViolationException | ExpressionEvaluationException ex) {
throw new SystemException(ex);
}
}
Expand Down
Expand Up @@ -48,8 +48,12 @@
import com.evolveum.midpoint.task.api.Task;
import com.evolveum.midpoint.util.QNameUtil;
import com.evolveum.midpoint.util.exception.AuthorizationException;
import com.evolveum.midpoint.util.exception.CommunicationException;
import com.evolveum.midpoint.util.exception.ConfigurationException;
import com.evolveum.midpoint.util.exception.ExpressionEvaluationException;
import com.evolveum.midpoint.util.exception.ObjectNotFoundException;
import com.evolveum.midpoint.util.exception.SchemaException;
import com.evolveum.midpoint.util.exception.SecurityViolationException;
import com.evolveum.midpoint.util.exception.SystemException;
import com.evolveum.midpoint.util.logging.LoggingUtils;
import com.evolveum.midpoint.util.logging.Trace;
Expand Down Expand Up @@ -703,7 +707,7 @@ public List<ObjectFormType> getObjectFormTypes() {
CompiledUserProfile adminGuiConfiguration;
try {
adminGuiConfiguration = getModelInteractionService().getCompiledUserProfile(task, result);
} catch (ObjectNotFoundException | SchemaException e) {
} catch (ObjectNotFoundException | SchemaException | CommunicationException | ConfigurationException | SecurityViolationException | ExpressionEvaluationException e) {
throw new SystemException("Cannot load GUI configuration: "+e.getMessage(), e);
}
ObjectFormsType objectFormsType = adminGuiConfiguration.getObjectForms();
Expand Down

0 comments on commit 0128832

Please sign in to comment.