Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feature/user-search
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Aug 13, 2015
2 parents a2d7d15 + 9bd8697 commit fb7fd2f
Show file tree
Hide file tree
Showing 71 changed files with 3,012 additions and 2,244 deletions.
1 change: 1 addition & 0 deletions build-system/pom.xml
Expand Up @@ -828,6 +828,7 @@
</property>
</properties>
<systemPropertyVariables>
<javax.net.ssl.trustStore>src/test/resources/truststore.jks</javax.net.ssl.trustStore>
<midpoint.home>target/midpoint-home</midpoint.home>
<java.util.logging.config.file>${project.build.directory}/test-classes/logging.properties</java.util.logging.config.file>
</systemPropertyVariables>
Expand Down
Expand Up @@ -22,7 +22,7 @@
<div wicket:id="deleteHostsPopup" />

<form wicket:id="searchForm" class="form-inline pull-right search-form">
<div wicket:id="basichSearch" />
<div wicket:id="basicSearch" />
</form>

<form wicket:id="mainForm" class="clearfix form-horizontal">
Expand Down
Expand Up @@ -104,7 +104,7 @@ public class PageResources extends PageAdminResources {
private static final String OPERATION_DELETE_HOSTS = DOT_CLASS + "deleteHosts";
private static final String OPERATION_CONNECTOR_DISCOVERY = DOT_CLASS + "connectorDiscovery";

private static final String ID_BASIC_SEARCH = "basichSearch";
private static final String ID_BASIC_SEARCH = "basicSearch";
private static final String ID_SEARCH_FORM = "searchForm";
private static final String ID_DELETE_RESOURCES_POPUP = "deleteResourcesPopup";
private static final String ID_DELETE_HOSTS_POPUP = "deleteHostsPopup";
Expand Down
Expand Up @@ -39,6 +39,7 @@
import com.evolveum.midpoint.util.MiscUtil;
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.logging.LoggingUtils;
import com.evolveum.midpoint.util.logging.Trace;
import com.evolveum.midpoint.util.logging.TraceManager;
Expand Down Expand Up @@ -1184,8 +1185,8 @@ private void suspendPerformed(AjaxRequestTarget target) {
result.recordWarning("Task suspension has been successfully requested; please check for its completion using task list.");
}
}
} catch (RuntimeException e) {
result.recordFatalError("Couldn't suspend the task due to an unexpected exception", e);
} catch (ObjectNotFoundException|SchemaException|SecurityViolationException|RuntimeException e) {
result.recordFatalError("Couldn't suspend the task", e);
}

showResultInSession(result);
Expand All @@ -1202,8 +1203,8 @@ private void resumePerformed(AjaxRequestTarget target) {
if (result.isSuccess()) {
result.recordStatus(OperationResultStatus.SUCCESS, "The task has been successfully resumed.");
}
} catch (RuntimeException e) {
result.recordFatalError("Couldn't resume the task due to an unexpected exception", e);
} catch (ObjectNotFoundException|SchemaException|SecurityViolationException|RuntimeException e) {
result.recordFatalError("Couldn't resume the task", e);
}

showResultInSession(result);
Expand All @@ -1220,8 +1221,8 @@ private void runNowPerformed(AjaxRequestTarget target) {
if (result.isSuccess()) {
result.recordStatus(OperationResultStatus.SUCCESS, "The task has been successfully scheduled to run.");
}
} catch (RuntimeException e) {
result.recordFatalError("Couldn't schedule the task due to an unexpected exception", e);
} catch (ObjectNotFoundException|SchemaException|SecurityViolationException|RuntimeException e) {
result.recordFatalError("Couldn't schedule the task", e);
}

showResultInSession(result);
Expand Down
Expand Up @@ -23,6 +23,9 @@
import com.evolveum.midpoint.security.api.AuthorizationConstants;
import com.evolveum.midpoint.task.api.Task;
import com.evolveum.midpoint.task.api.TaskExecutionStatus;
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.logging.LoggingUtils;
import com.evolveum.midpoint.util.logging.Trace;
import com.evolveum.midpoint.util.logging.TraceManager;
Expand Down Expand Up @@ -809,8 +812,8 @@ private void suspendTasksPerformed(AjaxRequestTarget target) {
result.recordWarning("Task(s) suspension has been successfully requested; please check for its completion using task list.");
}
}
} catch (RuntimeException e) {
result.recordFatalError("Couldn't suspend the task(s) due to an unexpected exception", e);
} catch (ObjectNotFoundException|SchemaException|SecurityViolationException|RuntimeException e) {
result.recordFatalError("Couldn't suspend the task(s)", e);
}
showResult(result);

Expand All @@ -833,8 +836,8 @@ private void resumeTasksPerformed(AjaxRequestTarget target) {
if (result.isSuccess()) {
result.recordStatus(OperationResultStatus.SUCCESS, "The task(s) have been successfully resumed.");
}
} catch (RuntimeException e) {
result.recordFatalError("Couldn't resume the task(s) due to an unexpected exception", e);
} catch (ObjectNotFoundException|SchemaException|SecurityViolationException|RuntimeException e) {
result.recordFatalError("Couldn't resume the task(s)", e);
}
showResult(result);

Expand All @@ -857,8 +860,8 @@ private void deleteTasksPerformed(AjaxRequestTarget target) {
if (result.isSuccess()) {
result.recordStatus(OperationResultStatus.SUCCESS, "The task(s) have been successfully deleted.");
}
} catch (RuntimeException e) {
result.recordFatalError("Couldn't delete the task(s) because of an unexpected exception", e);
} catch (ObjectNotFoundException|SchemaException|SecurityViolationException|RuntimeException e) {
result.recordFatalError("Couldn't delete the task(s)", e);
}
showResult(result);

Expand All @@ -884,8 +887,8 @@ private void scheduleTasksPerformed(AjaxRequestTarget target) {
if (result.isSuccess()) {
result.recordStatus(OperationResultStatus.SUCCESS, "The task(s) have been successfully scheduled.");
}
} catch (RuntimeException e) {
result.recordFatalError("Couldn't schedule the task(s) due to an unexpected exception.", e);
} catch (ObjectNotFoundException|SchemaException|SecurityViolationException|RuntimeException e) {
result.recordFatalError("Couldn't schedule the task(s)", e);
}
showResult(result);

Expand Down Expand Up @@ -918,8 +921,8 @@ private void stopSchedulersAndTasksPerformed(AjaxRequestTarget target) {
result.recordWarning("Selected node scheduler(s) have been successfully paused; however, some of the tasks they were executing are still running on them. Please check their completion using task list.");
}
}
} catch (RuntimeException e) {
result.recordFatalError("Couldn't stop schedulers due to an unexpected exception.", e);
} catch (SecurityViolationException|ObjectNotFoundException|SchemaException|RuntimeException e) {
result.recordFatalError("Couldn't stop schedulers due", e);
}
showResult(result);

Expand All @@ -942,8 +945,8 @@ private void startSchedulersPerformed(AjaxRequestTarget target) {
if (result.isSuccess()) {
result.recordStatus(OperationResultStatus.SUCCESS, "Selected node scheduler(s) have been successfully started.");
}
} catch (RuntimeException e) {
result.recordFatalError("Couldn't start the scheduler(s) because of unexpected exception.", e);
} catch (SecurityViolationException|ObjectNotFoundException|SchemaException|RuntimeException e) {
result.recordFatalError("Couldn't start the scheduler(s)", e);
}

showResult(result);
Expand All @@ -967,8 +970,8 @@ private void stopSchedulersPerformed(AjaxRequestTarget target) {
if (result.isSuccess()) {
result.recordStatus(OperationResultStatus.SUCCESS, "Selected node scheduler(s) have been successfully stopped.");
}
} catch (RuntimeException e) {
result.recordFatalError("Couldn't stop the scheduler(s) because of unexpected exception.", e);
} catch (SecurityViolationException|ObjectNotFoundException|SchemaException|RuntimeException e) {
result.recordFatalError("Couldn't stop the scheduler(s)", e);
}
showResult(result);

Expand All @@ -989,7 +992,7 @@ private void deleteNodesPerformed(AjaxRequestTarget target) {
Task task = createSimpleTask(OPERATION_DELETE_NODES);

for (NodeDto nodeDto : nodeDtoList) {
Collection<ObjectDelta<? extends ObjectType>> deltas = new ArrayList<ObjectDelta<? extends ObjectType>>();
Collection<ObjectDelta<? extends ObjectType>> deltas = new ArrayList<>();
deltas.add(ObjectDelta.createDeleteDelta(NodeType.class, nodeDto.getOid(), getPrismContext()));
try {
getModelService().executeChanges(deltas, null, task, result);
Expand Down Expand Up @@ -1028,8 +1031,8 @@ private void deactivateServiceThreadsPerformed(AjaxRequestTarget target) {
result.recordWarning("Deactivation of service threads on local node have been successfully requested; however, some of the tasks are still running. Please check their completion using task list.");
}
}
} catch (RuntimeException e) {
result.recordFatalError("Couldn't deactivate service threads on this node because of an unexpected exception.", e);
} catch (RuntimeException|SchemaException|SecurityViolationException e) {
result.recordFatalError("Couldn't deactivate service threads on this node", e);
}
showResult(result);

Expand All @@ -1048,8 +1051,8 @@ private void reactivateServiceThreadsPerformed(AjaxRequestTarget target) {
if (result.isSuccess()) {
result.recordStatus(OperationResultStatus.SUCCESS, "Service threads on local node have been successfully reactivated.");
}
} catch (RuntimeException e) {
result.recordFatalError("Couldn't reactivate service threads on local node because of an unexpected exception.", e);
} catch (RuntimeException|SchemaException|SecurityViolationException e) {
result.recordFatalError("Couldn't reactivate service threads on local node", e);
}
showResult(result);

Expand All @@ -1068,8 +1071,8 @@ private void synchronizeTasksPerformed(AjaxRequestTarget target) {
if (result.isSuccess()) { // brutal hack - the subresult's message contains statistics
result.recordStatus(OperationResultStatus.SUCCESS, result.getLastSubresult().getMessage());
}
} catch (RuntimeException e) {
result.recordFatalError("Couldn't synchronize tasks because of an unexpected exception.", e);
} catch (RuntimeException|SchemaException|SecurityViolationException e) {
result.recordFatalError("Couldn't synchronize tasks", e);
}
showResult(result);

Expand Down Expand Up @@ -1122,7 +1125,7 @@ private ObjectQuery createTaskQuery(){

ObjectQuery query = null;
try {
List<ObjectFilter> filters = new ArrayList<ObjectFilter>();
List<ObjectFilter> filters = new ArrayList<>();
if (status != null) {
ObjectFilter filter = status.createFilter(TaskType.class, getPrismContext());
if (filter != null) {
Expand Down
Expand Up @@ -333,21 +333,15 @@ private String getTaskObjectName(TaskType taskType, TaskManager taskManager, Mod

private void fillInParentTaskAttributes(TaskType taskType, TaskService taskService, TaskDtoProviderOptions options, OperationResult thisOpResult) {
if (options.isGetTaskParent() && taskType.getParent() != null) {
Throwable failReason = null;
try {
//TaskType parentTaskType = taskService.getTaskByIdentifier(taskType.getParent(), GetOperationOptions.createRetrieveNameOnlyOptions(), thisOpResult).asObjectable();
TaskType parentTaskType = taskService.getTaskByIdentifier(taskType.getParent(), null, thisOpResult).asObjectable();
if (parentTaskType != null) {
parentTaskName = parentTaskType.getName() != null ? parentTaskType.getName().getOrig() : "(unnamed)"; // todo i18n
parentTaskOid = parentTaskType.getOid();
}
} catch (SchemaException e) {
failReason = e;
} catch (ObjectNotFoundException e) {
failReason = e;
}
if (failReason != null) {
LoggingUtils.logException(LOGGER, "Couldn't retrieve parent task for task {}", failReason, taskType.getOid());
} catch (SchemaException|ObjectNotFoundException|SecurityViolationException|ConfigurationException e) {
LoggingUtils.logException(LOGGER, "Couldn't retrieve parent task for task {}", e, taskType.getOid());
}
}
}
Expand Down
Expand Up @@ -270,6 +270,9 @@ ActivationType.effectiveStatus=Effective status
ActivationType.validFrom=Valid from
ActivationType.validTo=Valid to

LockoutStatusType.NORMAL=Normal
LockoutStatusType.LOCKED=Locked

operation.com.evolveum.midpoint.common.operation.import.object=Import object
operation.com.evolveum.midpoint.common.validator.Validator.objectBasicsCheck=Basic checks
operation.com.evolveum.midpoint.common.validator.Validator.resourceNamespaceCheck=Resource namespace check
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

0 comments on commit fb7fd2f

Please sign in to comment.