Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Dec 12, 2017
2 parents 718a8d2 + 27a77c9 commit 76e5b12
Show file tree
Hide file tree
Showing 46 changed files with 2,230 additions and 476 deletions.
2 changes: 1 addition & 1 deletion build-system/pom.xml
Expand Up @@ -691,7 +691,7 @@
<dependency>
<groupId>com.evolveum.polygon</groupId>
<artifactId>connector-ldap</artifactId>
<version>1.5</version>
<version>1.5.1</version>
<exclusions>
<exclusion> <!-- Version in dependency of org.apache.servicemix.bundles:org.apache.servicemix.bundles.dom4j conflicts with xalan. Can be removed when connector version is bumped beyond 1.4.2.17 -->
<groupId>xml-apis</groupId>
Expand Down
2 changes: 1 addition & 1 deletion dist/src/main/bin/midpoint.bat
Expand Up @@ -62,7 +62,7 @@ goto execStop

:execStart
echo "%cd%\lib\midpoint.war"
start /b javaw -jar -Xms2048M -Xmx2048M -Djavax.net.ssl.trustStore=%MIDPOINT_HOME%\keystore.jceks -Djavax.net.ssl.trustStoreType=jceks -Dmidpoint.home=%MIDPOINT_HOME% %cd%\lib\midpoint.war > %BOOT_OUT% 2>&1 &
start /b javaw -jar -Xms2048M -Xmx2048M -Dpython.cachedir=%MIDPOINT_HOME%\tmp -Djavax.net.ssl.trustStore=%MIDPOINT_HOME%\keystore.jceks -Djavax.net.ssl.trustStoreType=jceks -Dmidpoint.home=%MIDPOINT_HOME% %cd%\lib\midpoint.war > %BOOT_OUT% 2>&1 &

:execStop
echo "%cd%\lib\midpoint.war"
Expand Down
8 changes: 6 additions & 2 deletions dist/src/main/bin/midpoint.sh
Expand Up @@ -20,8 +20,12 @@ USE_NOHUP="true"
if [ -z "$MIDPOINT_HOME" ] ; then
MIDPOINT_HOME="$SCRIPT_PATH../var"
fi
JAVA_OPTS="$JAVA_OPTS -Xms2048M -Xmx2048M -XX:PermSize=128m -XX:MaxPermSize=256m
-Djavax.net.ssl.trustStore=$MIDPOINT_HOME/keystore.jceks -Djavax.net.ssl.trustStoreType=jceks
JAVA_OPTS="$JAVA_OPTS
-Xms2048M
-Xmx2048M
-Dpython.cachedir=$MIDPOINT_HOME/tmp
-Djavax.net.ssl.trustStore=$MIDPOINT_HOME/keystore.jceks
-Djavax.net.ssl.trustStoreType=jceks
-Dmidpoint.home=$MIDPOINT_HOME"

# resolve links - $0 may be a softlink
Expand Down
Expand Up @@ -45,6 +45,7 @@
import com.evolveum.midpoint.xml.ns._public.common.common_3.RoleType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.UserType;
import com.evolveum.prism.xml.ns._public.types_3.PolyStringType;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.Validate;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -145,6 +146,12 @@ public void init() throws SchemaException {

securityContext.setAuthentication(null);

try {
cleanup();
} catch (IOException ex) {
LOGGER.error("Couldn't cleanup tmp folder with imported files", ex);
}

mainResult.recomputeStatus("Couldn't import objects.");

LOGGER.info("Initial object import finished ({} objects imported, {} errors)", count, errors);
Expand Down Expand Up @@ -214,6 +221,11 @@ private File getResource(String name) {
return new File(path);
}

private void cleanup() throws IOException {
Path destDir = Paths.get(configuration.getMidpointHome() + "/tmp/initial-objects");
FileUtils.deleteDirectory(destDir.toFile());
}

/**
* @param path jar:file:/<ABSOLUTE_PATH>/midpoint.war!/WEB-INF/classes!/initial-objects
* @param tmpDir
Expand Down
Expand Up @@ -20,7 +20,7 @@
<div class=btn-group>
<div wicket:id="addExpressionValueButton" />
</div>
<div wicket:id="shadowRefValueContainer" class="row">
<div wicket:id="shadowRefValueContainer">
<div class="row">
<h4 class="col-md-4 box-title"><wicket:message key="ExpressionValuePanel.shadowRefValueTitle"/></h4>
<a wicket:id="deleteShadowRefValueButton" class="btn btn-sm btn-danger pull-right" title="Remove">
Expand All @@ -30,7 +30,7 @@ <h4 class="col-md-4 box-title"><wicket:message key="ExpressionValuePanel.shadowR
<div wicket:id="shadowRefValueInput"/>

</div>
<div wicket:id="literalValueContainer" class="row">
<div wicket:id="literalValueContainer">
<div class="row">
<h4 class="col-md-4 box-title"><wicket:message key="ExpressionValuePanel.literalValueTitle"/></h4>
<a wicket:id="deleteLiteralValueButton" class="btn btn-sm btn-danger pull-right" title="Remove">
Expand All @@ -41,7 +41,7 @@ <h4 class="col-md-4 box-title"><wicket:message key="ExpressionValuePanel.literal

</div>

<div wicket:id="associationTargetSearchContainer" class="row">
<div wicket:id="associationTargetSearchContainer">
<div class="row">
<h4 class="col-md-4 box-title"><wicket:message key="ExpressionValuePanel.associationTargetSearchTitle" /></h4>
<a wicket:id="deleteTargetSearchExpressionButton" class="btn btn-sm btn-danger pull-right" title="Remove">
Expand Down
Expand Up @@ -294,7 +294,13 @@ protected void onUpdate(AjaxRequestTarget target){
if (getModelObject() == null){
getModel().setObject(new ExpressionType());
}
ExpressionUtil.updateAssociationTargetSearchPath(getModelObject(), new ItemPathType(pathValue));
try {
ExpressionUtil.updateAssociationTargetSearchPath(getModelObject(), new ItemPathType(pathValue));
} catch (Exception ex){
getPageBase().getFeedbackPanel().getFeedbackMessages().add(new FeedbackMessage(ExpressionValuePanel.this,
ex.getLocalizedMessage(), 0));
target.add(getPageBase().getFeedbackPanel());
}
}
});
targetSearchContainer.add(targetSearchFilterPathInput);
Expand Down
Expand Up @@ -22,7 +22,7 @@
<button wicket:id="showEmptyFields" wicket:message="title:PrismObjectPanel.showEmpty" class="btn btn-box-tool" trigger="hover" about="showEmptyFields"><i class="fa fa-arrows-alt"></i></button>
<button wicket:id="addChildContainer" wicket:message="title:PrismObjectPanel.addChildContainer" class="btn btn-box-tool" trigger="hover"><i class="fa fa-plus-circle"></i></button>
<button wicket:id="removeContainer" wicket:message="title:PrismObjectPanel.deleteContainer" class="btn btn-box-tool" trigger="hover"><i class="fa fa-minus-circle"></i></button>
<div class="pull-right" wicket:id="childContainersSelectorPanel">
<div class="col-md-2 pull-right" wicket:id="childContainersSelectorPanel">
<div class="col-xs-8" wicket:id="childContainersList" />
<div class="col-xs-2 btn btn-xs btn-success" wicket:id="addButton" />
</div>
Expand Down
Expand Up @@ -156,7 +156,7 @@ private void choosePerformed(AjaxRequestTarget target, T object){
LOGGER.trace("Choose operation performed: {} ({})", o.getName(), o.getOid());
}

target.add(get(ID_OBJECT_NAME));
target.add(get(ID_INPUT_CONTAINER).get(ID_OBJECT_NAME));
executeCustomAction(target, object);
}

Expand Down
Expand Up @@ -22,27 +22,27 @@

import javax.xml.namespace.QName;

import com.evolveum.midpoint.common.refinery.RefinedResourceSchemaImpl;
import com.evolveum.midpoint.prism.query.builder.QueryBuilder;
import com.evolveum.midpoint.web.session.SessionStorage;
import org.apache.commons.lang.StringUtils;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
import org.apache.wicket.extensions.markup.html.repeater.data.table.export.AbstractExportableColumn;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.markup.repeater.RepeatingView;
import org.apache.wicket.model.*;
import org.apache.wicket.model.AbstractReadOnlyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.StringResourceModel;
import org.apache.wicket.model.util.ListModel;
import org.apache.wicket.request.mapper.parameter.PageParameters;

import com.evolveum.midpoint.common.refinery.RefinedObjectClassDefinition;
import com.evolveum.midpoint.common.refinery.RefinedResourceSchema;
import com.evolveum.midpoint.common.refinery.RefinedResourceSchemaImpl;
import com.evolveum.midpoint.gui.api.GuiStyleConstants;
import com.evolveum.midpoint.gui.api.component.MainObjectListPanel;
import com.evolveum.midpoint.gui.api.component.ObjectBrowserPanel;
Expand All @@ -64,7 +64,7 @@
import com.evolveum.midpoint.prism.query.AndFilter;
import com.evolveum.midpoint.prism.query.ObjectFilter;
import com.evolveum.midpoint.prism.query.ObjectQuery;
import com.evolveum.midpoint.prism.query.RefFilter;
import com.evolveum.midpoint.prism.query.builder.QueryBuilder;
import com.evolveum.midpoint.schema.GetOperationOptions;
import com.evolveum.midpoint.schema.RetrieveOption;
import com.evolveum.midpoint.schema.SelectorOptions;
Expand All @@ -76,6 +76,7 @@
import com.evolveum.midpoint.schema.util.ShadowUtil;
import com.evolveum.midpoint.task.api.Task;
import com.evolveum.midpoint.task.api.TaskCategory;
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;
Expand Down Expand Up @@ -106,6 +107,7 @@
import com.evolveum.midpoint.web.page.admin.resources.ResourceContentTabPanel.Operation;
import com.evolveum.midpoint.web.page.admin.resources.content.PageAccount;
import com.evolveum.midpoint.web.page.admin.server.PageTaskAdd;
import com.evolveum.midpoint.web.session.SessionStorage;
import com.evolveum.midpoint.web.session.UserProfileStorage.TableId;
import com.evolveum.midpoint.web.util.OnePageParameterEncoder;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType;
Expand Down Expand Up @@ -467,6 +469,40 @@ private List<TaskType> getTasksForKind(List<PrismObject<TaskType>> tasks) {
PrismProperty<ShadowKindType> taskKind = task
.findProperty(new ItemPath(TaskType.F_EXTENSION, SchemaConstants.MODEL_EXTENSION_KIND));
ShadowKindType taskKindValue = null;

if (taskKind == null) {
PrismProperty<QName> taskObjectClass = task
.findProperty(new ItemPath(TaskType.F_EXTENSION, SchemaConstants.OBJECTCLASS_PROPERTY_NAME));

if (taskObjectClass == null) {
LOGGER.warn("Bad task definition. Task {} doesn't contain definition either of objectClass or kind/intent");
continue;
}

QName objectClass = getObjectClass();
if (objectClass == null) {
LOGGER.trace("Trying to determine objectClass for kind: {}, intent: {}", getKind(), getIntent());
RefinedObjectClassDefinition objectClassDef = null;
try {
objectClassDef = getDefinitionByKind();
} catch (SchemaException e) {
LOGGER.error("Failed to search for objectClass definition. Reason: {}", e.getMessage(), e);
}
if (objectClassDef == null) {
LOGGER.warn("Cannot find any definition for kind: {}, intent: {}", getKind(), getIntent());
continue;
}

objectClass = objectClassDef.getTypeName();
}

if (QNameUtil.match(objectClass, taskObjectClass.getRealValue())) {
tasksForKind.add(task.asObjectable());
}

continue;
}

if (taskKind != null) {
taskKindValue = taskKind.getRealValue();

Expand Down
Expand Up @@ -3137,7 +3137,7 @@ LdapAuthenticationProvider.badCredentials=Invalid username and/or password.
LdapAuthenticationProvider.emptyUsername=Empty username.
LdapAuthentication.incorrect.value=MidPoint principal type doesn't match.
LdapAuthentication.bad.user=Unknown user.
UserProfileServiceImpl.unknownUser=Couldn''t find user.
UserProfileServiceImpl.unknownUser=Couldn't find user.
AbstractLdapAuthenticationProvider.emptyPassword=Empty password.
BindAuthenticator.badCredentials=Invalid username and/or password.
WfDeltasPanel.label.deltaIn=Process input: delta(s) to be approved
Expand Down

0 comments on commit 76e5b12

Please sign in to comment.