You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2016/02/26 17:52:41 UTC
[1/4] syncope git commit: Upgrading Spring
Repository: syncope
Updated Branches:
refs/heads/master c22269170 -> 2c8815aba
Upgrading Spring
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/83c428ea
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/83c428ea
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/83c428ea
Branch: refs/heads/master
Commit: 83c428eab2a25eabea02277e96acaa8a0f61ccc9
Parents: c102dd2
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Thu Feb 25 16:55:17 2016 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Fri Feb 26 12:08:17 2016 +0100
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/83c428ea/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 3a55931..2b8c515 100644
--- a/pom.xml
+++ b/pom.xml
@@ -333,7 +333,7 @@ under the License.
<jackson.version>2.7.1</jackson.version>
- <spring.version>4.2.4.RELEASE</spring.version>
+ <spring.version>4.2.5.RELEASE</spring.version>
<spring-security.version>4.0.3.RELEASE</spring-security.version>
<openjpa.version>2.4.1</openjpa.version>
[2/4] syncope git commit: [SYNCOPE-744][SYNCOPE-750] Further
improvements for jobs and executions widget
Posted by il...@apache.org.
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/ReportDataBinderImpl.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/ReportDataBinderImpl.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/ReportDataBinderImpl.java
index 6057f0e..2f67926 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/ReportDataBinderImpl.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/ReportDataBinderImpl.java
@@ -23,7 +23,7 @@ import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.report.AbstractReportletConf;
import org.apache.syncope.core.provisioning.api.data.ReportDataBinder;
import org.apache.syncope.common.lib.report.ReportletConf;
-import org.apache.syncope.common.lib.to.ReportExecTO;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.ReportTO;
import org.apache.syncope.common.lib.types.ClientExceptionType;
import org.apache.syncope.core.persistence.api.dao.ReportExecDAO;
@@ -104,7 +104,7 @@ public class ReportDataBinderImpl implements ReportDataBinder {
}
for (ReportExec reportExec : report.getExecs()) {
- reportTO.getExecutions().add(getReportExecTO(reportExec));
+ reportTO.getExecutions().add(getExecTO(reportExec));
}
String triggerName = JobNamer.getTriggerName(JobNamer.getJobKey(report).getName());
@@ -123,15 +123,22 @@ public class ReportDataBinderImpl implements ReportDataBinder {
}
@Override
- public ReportExecTO getReportExecTO(final ReportExec execution) {
- ReportExecTO executionTO = new ReportExecTO();
- executionTO.setKey(execution.getKey());
- BeanUtils.copyProperties(execution, executionTO, IGNORE_REPORT_EXECUTION_PROPERTIES);
+ public String buildReference(final Report report) {
+ return "Report "
+ + report.getKey() + " "
+ + report.getName();
+ }
+
+ @Override
+ public ExecTO getExecTO(final ReportExec execution) {
+ ExecTO execTO = new ExecTO();
+ execTO.setKey(execution.getKey());
+ BeanUtils.copyProperties(execution, execTO, IGNORE_REPORT_EXECUTION_PROPERTIES);
if (execution.getKey() != null) {
- executionTO.setKey(execution.getKey());
+ execTO.setKey(execution.getKey());
}
- executionTO.setReport(execution.getReport().getKey());
+ execTO.setReference(buildReference(execution.getReport()));
- return executionTO;
+ return execTO;
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/TaskDataBinderImpl.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/TaskDataBinderImpl.java b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/TaskDataBinderImpl.java
index 299b457..837650b 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/TaskDataBinderImpl.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/TaskDataBinderImpl.java
@@ -31,7 +31,7 @@ import org.apache.syncope.common.lib.to.PropagationTaskTO;
import org.apache.syncope.common.lib.to.PushTaskTO;
import org.apache.syncope.common.lib.to.SchedTaskTO;
import org.apache.syncope.common.lib.to.SyncTaskTO;
-import org.apache.syncope.common.lib.to.TaskExecTO;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.types.ClientExceptionType;
import org.apache.syncope.common.lib.types.MatchingRule;
import org.apache.syncope.common.lib.types.TaskType;
@@ -248,20 +248,33 @@ public class TaskDataBinderImpl implements TaskDataBinder {
}
@Override
- public TaskExecTO getTaskExecTO(final TaskExec execution) {
- TaskExecTO executionTO = new TaskExecTO();
- BeanUtils.copyProperties(execution, executionTO, IGNORE_TASK_EXECUTION_PROPERTIES);
+ public String buildReference(final Task task) {
+ return taskUtilsFactory.getInstance(task).getType().name() + " "
+ + "Task "
+ + task.getKey() + " "
+ + (task instanceof SchedTask
+ ? SchedTask.class.cast(task).getName() == null
+ ? StringUtils.EMPTY
+ : SchedTask.class.cast(task).getName()
+ : task instanceof PropagationTask
+ ? PropagationTask.class.cast(task).getConnObjectKey()
+ : StringUtils.EMPTY);
+ }
+
+ @Override
+ public ExecTO getExecTO(final TaskExec execution) {
+ ExecTO execTO = new ExecTO();
+ BeanUtils.copyProperties(execution, execTO, IGNORE_TASK_EXECUTION_PROPERTIES);
if (execution.getKey() != null) {
- executionTO.setKey(execution.getKey());
+ execTO.setKey(execution.getKey());
}
if (execution.getTask() != null && execution.getTask().getKey() != null) {
- executionTO.setTask(execution.getTask().getKey());
- executionTO.setType(taskUtilsFactory.getInstance(execution.getTask()).getType());
+ execTO.setReference(buildReference(execution.getTask()));
}
- return executionTO;
+ return execTO;
}
private void setExecTime(final SchedTaskTO taskTO, final Task task) {
@@ -297,7 +310,7 @@ public class TaskDataBinderImpl implements TaskDataBinder {
if (details) {
for (TaskExec execution : task.getExecs()) {
if (execution != null) {
- taskTO.getExecutions().add(getTaskExecTO(execution));
+ taskTO.getExecutions().add(getExecTO(execution));
}
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportServiceImpl.java
index d72e484..800d8ef 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/ReportServiceImpl.java
@@ -27,7 +27,7 @@ import javax.ws.rs.core.Response;
import javax.ws.rs.core.StreamingOutput;
import org.apache.syncope.common.lib.to.BulkActionResult;
import org.apache.syncope.common.lib.to.JobTO;
-import org.apache.syncope.common.lib.to.ReportExecTO;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.ReportTO;
import org.apache.syncope.common.lib.types.JobAction;
import org.apache.syncope.common.lib.types.ReportExecExportFormat;
@@ -88,7 +88,7 @@ public class ReportServiceImpl extends AbstractServiceImpl implements ReportServ
}
@Override
- public ReportExecTO execute(final ExecuteQuery query) {
+ public ExecTO execute(final ExecuteQuery query) {
return logic.execute(query.getKey(), query.getStartAt());
}
@@ -98,7 +98,7 @@ public class ReportServiceImpl extends AbstractServiceImpl implements ReportServ
}
@Override
- public List<ReportExecTO> listRecentExecutions(final int size) {
+ public List<ExecTO> listRecentExecutions(final int size) {
return logic.listRecentExecutions(size);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/TaskServiceImpl.java
----------------------------------------------------------------------
diff --git a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/TaskServiceImpl.java b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/TaskServiceImpl.java
index 0a1bf17..e7cf1c6 100644
--- a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/TaskServiceImpl.java
+++ b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/TaskServiceImpl.java
@@ -30,7 +30,7 @@ import org.apache.syncope.common.lib.to.PagedResult;
import org.apache.syncope.common.lib.to.PushTaskTO;
import org.apache.syncope.common.lib.to.SchedTaskTO;
import org.apache.syncope.common.lib.to.SyncTaskTO;
-import org.apache.syncope.common.lib.to.TaskExecTO;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.types.JobAction;
import org.apache.syncope.common.rest.api.RESTHeaders;
import org.apache.syncope.common.rest.api.beans.BulkExecDeleteQuery;
@@ -69,7 +69,7 @@ public class TaskServiceImpl extends AbstractServiceImpl implements TaskService
}
@Override
- public TaskExecTO execute(final ExecuteQuery query) {
+ public ExecTO execute(final ExecuteQuery query) {
return logic.execute(query.getKey(), query.getStartAt(), query.getDryRun());
}
@@ -110,7 +110,7 @@ public class TaskServiceImpl extends AbstractServiceImpl implements TaskService
}
@Override
- public PagedResult<TaskExecTO> listExecutions(final TaskExecQuery query) {
+ public PagedResult<ExecTO> listExecutions(final TaskExecQuery query) {
return buildPagedResult(
logic.listExecutions(
query.getKey(),
@@ -123,7 +123,7 @@ public class TaskServiceImpl extends AbstractServiceImpl implements TaskService
}
@Override
- public List<TaskExecTO> listRecentExecutions(final int max) {
+ public List<ExecTO> listRecentExecutions(final int max) {
return logic.listRecentExecutions(max);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/fit/console-reference/pom.xml
----------------------------------------------------------------------
diff --git a/fit/console-reference/pom.xml b/fit/console-reference/pom.xml
index a713d6d..62d9dc9 100644
--- a/fit/console-reference/pom.xml
+++ b/fit/console-reference/pom.xml
@@ -368,64 +368,6 @@ under the License.
<resource>
<directory>${basedir}/../../common/rest-api/target/classes</directory>
</resource>
-
- <resource>
- <directory>${basedir}/../../core/logic/target/classes</directory>
- <excludes>
- <exclude>logicContext.xml</exclude>
- </excludes>
- </resource>
- <resource>
- <directory>${basedir}/../../core/rest-cxf/target/classes</directory>
- <excludes>
- <exclude>restCXFContext.xml</exclude>
- </excludes>
- </resource>
- <resource>
- <directory>${basedir}/../../core/misc/target/classes</directory>
- <excludes>
- <exclude>securityContext.xml</exclude>
- </excludes>
- </resource>
- <resource>
- <directory>${basedir}/../../core/persistence-api/target/classes</directory>
- </resource>
- <resource>
- <directory>${basedir}/../../core/persistence-jpa/target/classes</directory>
- <excludes>
- <exclude>persistenceContext.xml</exclude>
- </excludes>
- </resource>
- <resource>
- <directory>${basedir}/../../core/provisioning-api/target/classes</directory>
- </resource>
- <resource>
- <directory>${basedir}/../../core/provisioning-java/target/classes</directory>
- <excludes>
- <exclude>provisioningContext.xml</exclude>
- </excludes>
- </resource>
- <resource>
- <directory>${basedir}/../../core/workflow-api/target/classes</directory>
- </resource>
- <resource>
- <directory>${basedir}/../../core/workflow-java/target/classes</directory>
- <excludes>
- <exclude>workflowContext.xml</exclude>
- </excludes>
- </resource>
- <resource>
- <directory>${basedir}/../../core/workflow-activiti/target/classes</directory>
- <excludes>
- <exclude>workflowActivitiContext.xml</exclude>
- </excludes>
- </resource>
- <resource>
- <directory>${basedir}/../../ext/camel/provisioning-camel/target/classes</directory>
- <excludes>
- <exclude>provisioningCamelContext.xml</exclude>
- </excludes>
- </resource>
<resource>
<directory>${basedir}/../../client/console/target/classes</directory>
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java
index ea590b8..0c41d5b 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/console/TopologyITCase.java
@@ -64,11 +64,11 @@ public class TopologyITCase extends AbstractConsoleITCase {
wicketTester.clickLink("body:topologyLI:topology");
wicketTester.executeAjaxEvent("body:resources:2:resources:0:res", Constants.ON_CLICK);
wicketTester.clickLink("body:toggle:togglePanelContainer:container:actions:synchronization");
- wicketTester.clickLink("body:toggle:outherObjectsRepeater:1:outher:form:content:tasks:firstLevelContainer:"
+ wicketTester.clickLink("body:toggle:outerObjectsRepeater:1:outer:form:content:tasks:firstLevelContainer:"
+ "first:container:content:searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable:"
+ "body:rows:1:cells:10:cell:panelExecute:executeLink");
wicketTester.clickLink(
- "body:toggle:outherObjectsRepeater:1:outher:form:content:tasks:firstLevelContainer:first:"
+ "body:toggle:outerObjectsRepeater:1:outer:form:content:tasks:firstLevelContainer:first:"
+ "container:content:startAt:togglePanelContainer:startAtForm:startAt");
wicketTester.assertInfoMessages("Operation executed successfully");
}
@@ -78,12 +78,12 @@ public class TopologyITCase extends AbstractConsoleITCase {
wicketTester.clickLink("body:topologyLI:topology");
wicketTester.executeAjaxEvent("body:resources:5:resources:0:res", Constants.ON_CLICK);
wicketTester.clickLink("body:toggle:togglePanelContainer:container:actions:push");
- wicketTester.clickLink("body:toggle:outherObjectsRepeater:1:outher:form:content:tasks:firstLevelContainer:"
+ wicketTester.clickLink("body:toggle:outerObjectsRepeater:1:outer:form:content:tasks:firstLevelContainer:"
+ "first:container:content:searchContainer:resultTable:tablePanel:groupForm:checkgroup:dataTable:"
+ "body:rows:1:cells:9:cell:panelEdit:editLink");
final FormTester formTester = wicketTester.newFormTester(
- "body:toggle:outherObjectsRepeater:1:outher:form:content:"
+ "body:toggle:outerObjectsRepeater:1:outer:form:content:"
+ "tasks:firstLevelContainer:first:container:content:wizard:form");
formTester.setValue("view:description:textField", "test");
@@ -99,11 +99,11 @@ public class TopologyITCase extends AbstractConsoleITCase {
wicketTester.executeAjaxEvent("body:syncope", Constants.ON_CLICK);
wicketTester.clickLink("body:toggle:togglePanelContainer:container:actions:tasks");
wicketTester.clickLink(
- "body:toggle:outherObjectsRepeater:1:outher:form:content:tasks:firstLevelContainer:first:"
+ "body:toggle:outerObjectsRepeater:1:outer:form:content:tasks:firstLevelContainer:first:"
+ "container:content:add");
FormTester formTester = wicketTester.newFormTester(
- "body:toggle:outherObjectsRepeater:1:outher:form:content:tasks:firstLevelContainer:first:"
+ "body:toggle:outerObjectsRepeater:1:outer:form:content:tasks:firstLevelContainer:first:"
+ "container:content:wizard:form");
formTester.setValue("view:name:textField", "test");
formTester.select("view:jobDelegateClassName:dropDownChoiceField", 0);
@@ -112,11 +112,11 @@ public class TopologyITCase extends AbstractConsoleITCase {
wicketTester.cleanupFeedbackMessages();
formTester = wicketTester.newFormTester(
- "body:toggle:outherObjectsRepeater:1:outher:form:content:tasks:firstLevelContainer:first:"
+ "body:toggle:outerObjectsRepeater:1:outer:form:content:tasks:firstLevelContainer:first:"
+ "container:content:wizard:form");
wicketTester.assertComponent(
- "body:toggle:outherObjectsRepeater:1:outher:form:content:tasks:firstLevelContainer:"
+ "body:toggle:outerObjectsRepeater:1:outer:form:content:tasks:firstLevelContainer:"
+ "first:container:content:wizard:form:view:schedule:seconds:textField", TextField.class);
formTester.submit("buttons:finish");
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractTaskITCase.java
index b9ec955..00ce952 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/AbstractTaskITCase.java
@@ -24,9 +24,7 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import java.util.Set;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
@@ -36,9 +34,9 @@ import java.util.concurrent.TimeUnit;
import org.apache.commons.collections4.IterableUtils;
import org.apache.commons.collections4.Predicate;
import org.apache.syncope.common.lib.to.AbstractTaskTO;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.NotificationTaskTO;
import org.apache.syncope.common.lib.to.PagedResult;
-import org.apache.syncope.common.lib.to.TaskExecTO;
import org.apache.syncope.common.lib.to.UserTO;
import org.apache.syncope.common.lib.types.TaskType;
import org.apache.syncope.common.rest.api.beans.ExecuteQuery;
@@ -53,7 +51,7 @@ public abstract class AbstractTaskITCase extends AbstractITCase {
protected static final Long SCHED_TASK_ID = 5L;
- protected static class ThreadExec implements Callable<TaskExecTO> {
+ protected static class ThreadExec implements Callable<ExecTO> {
private final TaskService taskService;
@@ -73,7 +71,7 @@ public abstract class AbstractTaskITCase extends AbstractITCase {
}
@Override
- public TaskExecTO call() throws Exception {
+ public ExecTO call() throws Exception {
return execProvisioningTask(taskService, taskKey, maxWaitSeconds, dryRun);
}
}
@@ -93,7 +91,7 @@ public abstract class AbstractTaskITCase extends AbstractITCase {
}
}
- protected static TaskExecTO execTask(final TaskService taskService, final Long taskKey, final String initialStatus,
+ protected static ExecTO execTask(final TaskService taskService, final Long taskKey, final String initialStatus,
final int maxWaitSeconds, final boolean dryRun) {
AbstractTaskTO taskTO = taskService.read(taskKey, true);
@@ -101,7 +99,7 @@ public abstract class AbstractTaskITCase extends AbstractITCase {
assertNotNull(taskTO.getExecutions());
int preSyncSize = taskTO.getExecutions().size();
- TaskExecTO execution = taskService.execute(
+ ExecTO execution = taskService.execute(
new ExecuteQuery.Builder().key(taskTO.getKey()).dryRun(dryRun).build());
assertEquals(initialStatus, execution.getStatus());
@@ -128,23 +126,23 @@ public abstract class AbstractTaskITCase extends AbstractITCase {
return taskTO.getExecutions().get(taskTO.getExecutions().size() - 1);
}
- public static TaskExecTO execProvisioningTask(
+ public static ExecTO execProvisioningTask(
final TaskService taskService, final Long taskKey, final int maxWaitSeconds, final boolean dryRun) {
return execTask(taskService, taskKey, "JOB_FIRED", maxWaitSeconds, dryRun);
}
- protected static TaskExecTO execNotificationTask(
+ protected static ExecTO execNotificationTask(
final TaskService taskService, final Long taskKey, final int maxWaitSeconds) {
return execTask(taskService, taskKey, NotificationJob.Status.SENT.name(), maxWaitSeconds, false);
}
- protected Map<Long, TaskExecTO> execProvisioningTasks(final TaskService taskService,
+ protected void execProvisioningTasks(final TaskService taskService,
final Set<Long> taskKeys, final int maxWaitSeconds, final boolean dryRun) throws Exception {
ExecutorService service = Executors.newFixedThreadPool(taskKeys.size());
- List<Future<TaskExecTO>> futures = new ArrayList<>();
+ List<Future<ExecTO>> futures = new ArrayList<>();
for (Long key : taskKeys) {
futures.add(service.submit(new ThreadExec(taskService, key, maxWaitSeconds, dryRun)));
@@ -155,16 +153,11 @@ public abstract class AbstractTaskITCase extends AbstractITCase {
}
}
- Map<Long, TaskExecTO> res = new HashMap<>();
-
- for (Future<TaskExecTO> future : futures) {
- TaskExecTO taskExecTO = future.get(100, TimeUnit.SECONDS);
- res.put(taskExecTO.getTask(), taskExecTO);
+ for (Future<ExecTO> future : futures) {
+ future.get(100, TimeUnit.SECONDS);
}
service.shutdownNow();
-
- return res;
}
protected NotificationTaskTO findNotificationTaskBySender(final String sender) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MultitenancyITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MultitenancyITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MultitenancyITCase.java
index c70029a..bfbf63d 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MultitenancyITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/MultitenancyITCase.java
@@ -41,7 +41,7 @@ import org.apache.syncope.common.lib.to.ProvisioningResult;
import org.apache.syncope.common.lib.to.RealmTO;
import org.apache.syncope.common.lib.to.ResourceTO;
import org.apache.syncope.common.lib.to.SyncTaskTO;
-import org.apache.syncope.common.lib.to.TaskExecTO;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.UserTO;
import org.apache.syncope.common.lib.types.AnyTypeKind;
import org.apache.syncope.common.lib.types.IntMappingType;
@@ -204,7 +204,7 @@ public class MultitenancyITCase extends AbstractITCase {
assertNotNull(resource);
// synchronize
- TaskExecTO execution = AbstractTaskITCase.execProvisioningTask(
+ ExecTO execution = AbstractTaskITCase.execProvisioningTask(
adminClient.getService(TaskService.class), task.getKey(), 50, false);
// verify execution status
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationTaskITCase.java
index a08d1fd..a2852bc 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/NotificationTaskITCase.java
@@ -43,7 +43,7 @@ import org.apache.syncope.common.lib.to.GroupTO;
import org.apache.syncope.common.lib.to.MembershipTO;
import org.apache.syncope.common.lib.to.NotificationTO;
import org.apache.syncope.common.lib.to.NotificationTaskTO;
-import org.apache.syncope.common.lib.to.TaskExecTO;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.UserTO;
import org.apache.syncope.common.lib.types.AnyTypeKind;
import org.apache.syncope.common.lib.types.IntMappingType;
@@ -197,7 +197,7 @@ public class NotificationTaskITCase extends AbstractTaskITCase {
assertNotNull(taskTO);
assertFalse(taskTO.isExecuted());
assertFalse(taskTO.getExecutions().isEmpty());
- for (TaskExecTO exec : taskTO.getExecutions()) {
+ for (ExecTO exec : taskTO.getExecutions()) {
assertEquals(NotificationJob.Status.NOT_SENT.name(), exec.getStatus());
}
} finally {
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PropagationTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PropagationTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PropagationTaskITCase.java
index 9686e20..6868d7b 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PropagationTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PropagationTaskITCase.java
@@ -29,7 +29,7 @@ import org.apache.syncope.common.lib.to.AbstractTaskTO;
import org.apache.syncope.common.lib.to.BulkAction;
import org.apache.syncope.common.lib.to.PagedResult;
import org.apache.syncope.common.lib.to.PropagationTaskTO;
-import org.apache.syncope.common.lib.to.TaskExecTO;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.UserTO;
import org.apache.syncope.common.lib.types.TaskType;
import org.apache.syncope.common.rest.api.beans.ExecuteQuery;
@@ -143,7 +143,7 @@ public class PropagationTaskITCase extends AbstractTaskITCase {
assertFalse(task.getExecutions().isEmpty());
// check list executions
- PagedResult<TaskExecTO> execs = taskService.listExecutions(
+ PagedResult<ExecTO> execs = taskService.listExecutions(
new TaskExecQuery.Builder().key(1L).page(1).size(2).build());
assertTrue(execs.getTotalCount() >= execs.getResult().size());
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PushTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PushTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PushTaskITCase.java
index 3dafc94..90c98e8 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PushTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PushTaskITCase.java
@@ -41,7 +41,7 @@ import org.apache.syncope.common.lib.to.PushTaskTO;
import org.apache.syncope.common.lib.to.ResourceTO;
import org.apache.syncope.common.lib.to.GroupTO;
import org.apache.syncope.common.lib.to.ProvisionTO;
-import org.apache.syncope.common.lib.to.TaskExecTO;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.types.AnyTypeKind;
import org.apache.syncope.common.lib.types.AttrSchemaType;
import org.apache.syncope.common.lib.types.IntMappingType;
@@ -327,7 +327,7 @@ public class PushTaskITCase extends AbstractTaskITCase {
assertNotNull(push);
// execute the new task
- TaskExecTO pushExec = execProvisioningTask(taskService, push.getKey(), 50, false);
+ ExecTO pushExec = execProvisioningTask(taskService, push.getKey(), 50, false);
assertEquals(PropagationTaskExecStatus.SUCCESS, PropagationTaskExecStatus.valueOf(pushExec.getStatus()));
} finally {
groupService.delete(groupTO.getKey());
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ReportITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ReportITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ReportITCase.java
index 1179671..ff32f2c 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ReportITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/ReportITCase.java
@@ -38,7 +38,7 @@ import org.apache.syncope.common.lib.report.AuditReportletConf;
import org.apache.syncope.common.lib.report.UserReportletConf;
import org.apache.syncope.common.lib.to.BulkActionResult;
import org.apache.syncope.common.lib.to.LoggerTO;
-import org.apache.syncope.common.lib.to.ReportExecTO;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.ReportTO;
import org.apache.syncope.common.lib.types.AuditElements;
import org.apache.syncope.common.lib.types.AuditLoggerName;
@@ -149,7 +149,7 @@ public class ReportITCase extends AbstractITCase {
}
private Long execute(final Long reportKey) {
- ReportExecTO execution = reportService.execute(new ExecuteQuery.Builder().key(reportKey).build());
+ ExecTO execution = reportService.execute(new ExecuteQuery.Builder().key(reportKey).build());
assertNotNull(execution);
int i = 0;
@@ -294,7 +294,7 @@ public class ReportITCase extends AbstractITCase {
reportTO = createReport(reportTO);
assertNotNull(reportTO);
- ReportExecTO execution = reportService.execute(new ExecuteQuery.Builder().key(reportTO.getKey()).build());
+ ExecTO execution = reportService.execute(new ExecuteQuery.Builder().key(reportTO.getKey()).build());
assertNotNull(execution);
int maxit = 50;
@@ -323,7 +323,7 @@ public class ReportITCase extends AbstractITCase {
// Execute (multiple requests)
for (int i = 0; i < 10; i++) {
- ReportExecTO execution = reportService.execute(new ExecuteQuery.Builder().key(reportTO.getKey()).build());
+ ExecTO execution = reportService.execute(new ExecuteQuery.Builder().key(reportTO.getKey()).build());
assertNotNull(execution);
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SchedTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SchedTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SchedTaskITCase.java
index 20768fd..e3283a0 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SchedTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SchedTaskITCase.java
@@ -38,7 +38,7 @@ import org.apache.syncope.common.lib.to.PagedResult;
import org.apache.syncope.common.lib.to.PushTaskTO;
import org.apache.syncope.common.lib.to.SchedTaskTO;
import org.apache.syncope.common.lib.to.SyncTaskTO;
-import org.apache.syncope.common.lib.to.TaskExecTO;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.types.JobAction;
import org.apache.syncope.common.lib.types.TaskType;
import org.apache.syncope.common.rest.api.beans.ExecuteQuery;
@@ -123,7 +123,7 @@ public class SchedTaskITCase extends AbstractTaskITCase {
i++;
} while (task.getExecutions().isEmpty() && i < maxit);
- PagedResult<TaskExecTO> execs =
+ PagedResult<ExecTO> execs =
taskService.listExecutions(new TaskExecQuery.Builder().key(task.getKey()).build());
assertEquals(1, execs.getTotalCount());
assertTrue(execs.getResult().get(0).getStart().after(initial));
@@ -198,7 +198,7 @@ public class SchedTaskITCase extends AbstractTaskITCase {
} while (jobs.size() < 1 && i < maxit);
assertEquals(1, jobs.size());
- assertEquals(task.getKey(), jobs.get(0).getReferenceKey(), 0);
+ assertEquals("SCHEDULED Task " + task.getKey() + " " + task.getName(), jobs.get(0).getReference());
taskService.actionJob(task.getKey(), JobAction.STOP);
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SyncTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SyncTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SyncTaskITCase.java
index b039776..27478eb 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SyncTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/SyncTaskITCase.java
@@ -56,7 +56,7 @@ import org.apache.syncope.common.lib.policy.SyncPolicyTO;
import org.apache.syncope.common.lib.to.MappingItemTO;
import org.apache.syncope.common.lib.to.ProvisioningResult;
import org.apache.syncope.common.lib.to.SyncTaskTO;
-import org.apache.syncope.common.lib.to.TaskExecTO;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.UserTO;
import org.apache.syncope.common.lib.types.AnyTypeKind;
import org.apache.syncope.common.lib.types.CipherAlgorithm;
@@ -258,9 +258,9 @@ public class SyncTaskITCase extends AbstractTaskITCase {
@Test
public void dryRun() {
- TaskExecTO execution = execProvisioningTask(taskService, SYNC_TASK_ID, 50, true);
+ ExecTO execution = execProvisioningTask(taskService, SYNC_TASK_ID, 50, true);
assertEquals(
- "Execution of task " + execution.getTask() + " failed with message " + execution.getMessage(),
+ "Execution of " + execution.getReference() + " failed with message " + execution.getMessage(),
"SUCCESS", execution.getStatus());
}
@@ -269,7 +269,7 @@ public class SyncTaskITCase extends AbstractTaskITCase {
UserTO userTO = null;
JdbcTemplate jdbcTemplate = new JdbcTemplate(testDataSource);
try {
- TaskExecTO execution = execProvisioningTask(taskService, 7L, 50, false);
+ ExecTO execution = execProvisioningTask(taskService, 7L, 50, false);
assertNotNull(execution.getStatus());
assertEquals(PropagationTaskExecStatus.SUCCESS, PropagationTaskExecStatus.valueOf(execution.getStatus()));
@@ -337,7 +337,7 @@ public class SyncTaskITCase extends AbstractTaskITCase {
ldapCleanup();
// 0. synchronize
- TaskExecTO execution = execProvisioningTask(taskService, 11L, 50, false);
+ ExecTO execution = execProvisioningTask(taskService, 11L, 50, false);
// 1. verify execution status
assertEquals(PropagationTaskExecStatus.SUCCESS, PropagationTaskExecStatus.valueOf(execution.getStatus()));
@@ -475,7 +475,7 @@ public class SyncTaskITCase extends AbstractTaskITCase {
task.getReconciliationFilterBuilderClassName());
// 3. exec task
- TaskExecTO execution = execProvisioningTask(taskService, task.getKey(), 50, false);
+ ExecTO execution = execProvisioningTask(taskService, task.getKey(), 50, false);
assertNotNull(execution.getStatus());
assertEquals(PropagationTaskExecStatus.SUCCESS, PropagationTaskExecStatus.valueOf(execution.getStatus()));
@@ -554,7 +554,7 @@ public class SyncTaskITCase extends AbstractTaskITCase {
assertFalse(actual.getTemplates().get(AnyTypeKind.USER.name()).getResources().isEmpty());
assertFalse(((UserTO) actual.getTemplates().get(AnyTypeKind.USER.name())).getMemberships().isEmpty());
- TaskExecTO execution = execProvisioningTask(taskService, actual.getKey(), 50, false);
+ ExecTO execution = execProvisioningTask(taskService, actual.getKey(), 50, false);
assertEquals(PropagationTaskExecStatus.SUCCESS, PropagationTaskExecStatus.valueOf(execution.getStatus()));
userTO = readUser("testuser2");
@@ -661,7 +661,7 @@ public class SyncTaskITCase extends AbstractTaskITCase {
assertEquals(1, result.getPropagationStatuses().size());
assertEquals(PropagationTaskExecStatus.SUCCESS, result.getPropagationStatuses().get(0).getStatus());
- TaskExecTO taskExecTO = execProvisioningTask(taskService, 24L, 50, false);
+ ExecTO taskExecTO = execProvisioningTask(taskService, 24L, 50, false);
assertNotNull(taskExecTO.getStatus());
assertEquals(PropagationTaskExecStatus.SUCCESS, PropagationTaskExecStatus.valueOf(taskExecTO.getStatus()));
@@ -768,7 +768,7 @@ public class SyncTaskITCase extends AbstractTaskITCase {
assertEquals(actual.getKey(), syncTask.getKey());
assertEquals(actual.getJobDelegateClassName(), syncTask.getJobDelegateClassName());
- TaskExecTO execution = execProvisioningTask(taskService, syncTask.getKey(), 50, false);
+ ExecTO execution = execProvisioningTask(taskService, syncTask.getKey(), 50, false);
assertEquals(PropagationTaskExecStatus.SUCCESS, PropagationTaskExecStatus.valueOf(execution.getStatus()));
// 5. Test the sync'd user
@@ -837,7 +837,7 @@ public class SyncTaskITCase extends AbstractTaskITCase {
syncTask = getObject(taskResponse.getLocation(), TaskService.class, SyncTaskTO.class);
assertNotNull(syncTask);
- TaskExecTO execution = execProvisioningTask(taskService, syncTask.getKey(), 50, false);
+ ExecTO execution = execProvisioningTask(taskService, syncTask.getKey(), 50, false);
assertEquals(PropagationTaskExecStatus.SUCCESS, PropagationTaskExecStatus.valueOf(execution.getStatus()));
// 7. Test the sync'd user
[3/4] syncope git commit: [SYNCOPE-744][SYNCOPE-750] Further
improvements for jobs and executions widget
Posted by il...@apache.org.
[SYNCOPE-744][SYNCOPE-750] Further improvements for jobs and executions widget
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/c102dd24
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/c102dd24
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/c102dd24
Branch: refs/heads/master
Commit: c102dd24a0d5cc4e185ae684ad7ac39573b4469f
Parents: c222691
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Thu Feb 25 14:37:41 2016 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Fri Feb 26 12:08:17 2016 +0100
----------------------------------------------------------------------
.../commands/report/ReportResultManager.java | 10 +-
.../cli/commands/task/TaskResultManager.java | 10 +-
.../commands/task/TaskSyncopeOperations.java | 4 +-
.../client/console/SyncopeConsoleSession.java | 5 +-
.../panels/AbstractSearchResultPanel.java | 11 ++
.../console/panels/AnySearchResultPanel.java | 2 +-
.../client/console/panels/SchemaTypePanel.java | 31 +----
.../client/console/panels/TogglePanel.java | 10 +-
.../console/panels/WorkflowTogglePanel.java | 4 +-
.../client/console/rest/TaskRestClient.java | 4 +-
.../client/console/tasks/TaskExecutions.java | 52 ++++-----
.../console/topology/TopologyTogglePanel.java | 8 +-
.../data/table/BooleanPropertyColumn.java | 56 +++++++++
.../repeater/data/table/DatePropertyColumn.java | 2 -
.../client/console/widgets/JobWidget.java | 116 ++++++-------------
.../META-INF/resources/css/syncopeConsole.css | 4 +-
.../client/console/panels/TogglePanel.html | 4 +-
.../client/console/widgets/JobWidget.properties | 4 +-
.../console/widgets/JobWidget_it.properties | 4 +-
.../console/widgets/JobWidget_pt_BR.properties | 4 +-
.../syncope/common/lib/to/AbstractExecTO.java | 59 ----------
.../syncope/common/lib/to/AbstractTaskTO.java | 4 +-
.../apache/syncope/common/lib/to/ExecTO.java | 71 ++++++++++++
.../org/apache/syncope/common/lib/to/JobTO.java | 20 +---
.../syncope/common/lib/to/ReportExecTO.java | 40 -------
.../apache/syncope/common/lib/to/ReportTO.java | 4 +-
.../syncope/common/lib/to/TaskExecTO.java | 51 --------
.../common/rest/api/service/ReportService.java | 6 +-
.../common/rest/api/service/TaskService.java | 8 +-
.../syncope/core/logic/AbstractJobLogic.java | 8 +-
.../syncope/core/logic/NotificationLogic.java | 6 +-
.../apache/syncope/core/logic/ReportLogic.java | 27 +++--
.../apache/syncope/core/logic/TaskLogic.java | 43 ++++---
.../provisioning/api/data/ReportDataBinder.java | 6 +-
.../provisioning/api/data/TaskDataBinder.java | 10 +-
.../java/data/ReportDataBinderImpl.java | 25 ++--
.../java/data/TaskDataBinderImpl.java | 31 +++--
.../rest/cxf/service/ReportServiceImpl.java | 6 +-
.../core/rest/cxf/service/TaskServiceImpl.java | 8 +-
fit/console-reference/pom.xml | 58 ----------
.../syncope/fit/console/TopologyITCase.java | 16 +--
.../syncope/fit/core/AbstractTaskITCase.java | 29 ++---
.../syncope/fit/core/MultitenancyITCase.java | 4 +-
.../fit/core/NotificationTaskITCase.java | 4 +-
.../syncope/fit/core/PropagationTaskITCase.java | 4 +-
.../apache/syncope/fit/core/PushTaskITCase.java | 4 +-
.../apache/syncope/fit/core/ReportITCase.java | 8 +-
.../syncope/fit/core/SchedTaskITCase.java | 6 +-
.../apache/syncope/fit/core/SyncTaskITCase.java | 20 ++--
49 files changed, 396 insertions(+), 535 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/client/cli/src/main/java/org/apache/syncope/client/cli/commands/report/ReportResultManager.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/report/ReportResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/report/ReportResultManager.java
index ef8991d..a7234b1 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/report/ReportResultManager.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/report/ReportResultManager.java
@@ -24,7 +24,7 @@ import org.apache.syncope.client.cli.commands.CommonsResultManager;
import org.apache.syncope.common.lib.report.AbstractReportletConf;
import org.apache.syncope.common.lib.report.UserReportletConf;
import org.apache.syncope.common.lib.to.JobTO;
-import org.apache.syncope.common.lib.to.ReportExecTO;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.ReportTO;
public class ReportResultManager extends CommonsResultManager {
@@ -64,20 +64,20 @@ public class ReportResultManager extends CommonsResultManager {
}
}
- public void printReportExecutions(final List<ReportExecTO> reportExecTOs) {
- for (final ReportExecTO reportExecTO : reportExecTOs) {
+ public void printReportExecutions(final List<ExecTO> reportExecTOs) {
+ for (final ExecTO reportExecTO : reportExecTOs) {
System.out.println(" REPORT EXEC ID: " + reportExecTO.getKey());
System.out.println(" status: " + reportExecTO.getStatus());
System.out.println(" message: " + reportExecTO.getMessage());
System.out.println(" start date: " + reportExecTO.getStart());
System.out.println(" end date: " + reportExecTO.getEnd());
- System.out.println(" report id: " + reportExecTO.getReport());
+ System.out.println(" report: " + reportExecTO.getReference());
}
}
public void printJobs(final List<JobTO> jobTOs) {
for (final JobTO jobTO : jobTOs) {
- System.out.println(" REPORT ID/NAME: " + jobTO.getReferenceKey() + "/" + jobTO.getReferenceName());
+ System.out.println(" REPORT: " + jobTO.getReference());
System.out.println(" status: " + jobTO.getStatus());
System.out.println(" start date: " + jobTO.getStart());
System.out.println(" running: " + jobTO.isRunning());
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskResultManager.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskResultManager.java
index 40cc323..1072deb 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskResultManager.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskResultManager.java
@@ -30,7 +30,7 @@ import org.apache.syncope.common.lib.to.PropagationTaskTO;
import org.apache.syncope.common.lib.to.PushTaskTO;
import org.apache.syncope.common.lib.to.SchedTaskTO;
import org.apache.syncope.common.lib.to.SyncTaskTO;
-import org.apache.syncope.common.lib.to.TaskExecTO;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.types.TaskType;
public class TaskResultManager extends CommonsResultManager {
@@ -195,11 +195,11 @@ public class TaskResultManager extends CommonsResultManager {
}
}
- public void printTaskExecTOs(final List<TaskExecTO> taskExecTOs) {
- for (final TaskExecTO taskExecTO : taskExecTOs) {
+ public void printTaskExecTOs(final List<ExecTO> taskExecTOs) {
+ for (final ExecTO taskExecTO : taskExecTOs) {
System.out.println(" EXECUTIONS: ");
System.out.println(" - task execution key: " + taskExecTO.getKey());
- System.out.println(" task: " + taskExecTO.getTask());
+ System.out.println(" task: " + taskExecTO.getReference());
System.out.println(" message: ");
System.out.println(" ############### <BEGIN MESSAGE> ###############");
System.out.println(" message: " + taskExecTO.getMessage());
@@ -213,7 +213,7 @@ public class TaskResultManager extends CommonsResultManager {
public void printJobs(final List<JobTO> jobTOs) {
for (final JobTO jobTO : jobTOs) {
- System.out.println(" TASK ID/NAME: " + jobTO.getReferenceKey() + "/" + jobTO.getReferenceName());
+ System.out.println(" TASK: " + jobTO.getReference());
System.out.println(" status: " + jobTO.getStatus());
System.out.println(" start date: " + jobTO.getStart());
System.out.println(" running: " + jobTO.isRunning());
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskSyncopeOperations.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskSyncopeOperations.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskSyncopeOperations.java
index 14b4cd1..a1651ca 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskSyncopeOperations.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskSyncopeOperations.java
@@ -21,8 +21,8 @@ package org.apache.syncope.client.cli.commands.task;
import java.util.List;
import org.apache.syncope.client.cli.SyncopeServices;
import org.apache.syncope.common.lib.to.AbstractTaskTO;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.JobTO;
-import org.apache.syncope.common.lib.to.TaskExecTO;
import org.apache.syncope.common.lib.types.TaskType;
import org.apache.syncope.common.rest.api.beans.ExecuteQuery;
import org.apache.syncope.common.rest.api.beans.TaskQuery;
@@ -56,7 +56,7 @@ public class TaskSyncopeOperations {
taskService.deleteExecution(Long.valueOf(executionKey));
}
- public TaskExecTO execute(final String executionKey, final boolean dryRun) {
+ public ExecTO execute(final String executionKey, final boolean dryRun) {
return taskService.execute(new ExecuteQuery.Builder().key(Long.valueOf(executionKey)).dryRun(dryRun).build());
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
index 16e4c26..f08e1cd 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleSession.java
@@ -30,6 +30,7 @@ import javax.ws.rs.core.EntityTag;
import javax.ws.rs.core.MediaType;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.time.FastDateFormat;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.cxf.jaxrs.client.WebClient;
import org.apache.syncope.client.console.commons.Constants;
@@ -206,9 +207,9 @@ public class SyncopeConsoleSession extends AuthenticatedWebSession {
WebClient.client(serviceInstance).reset();
}
- public DateFormat getDateFormat() {
+ public FastDateFormat getDateFormat() {
Locale locale = getLocale() == null ? Locale.ENGLISH : getLocale();
- return DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, locale);
+ return FastDateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, locale);
}
public NotificationPanel getNotificationPanel() {
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
index ccc019b..2463707 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
@@ -76,6 +76,8 @@ public abstract class AbstractSearchResultPanel<
private boolean checkBoxEnabled;
+ private boolean showPaginator;
+
/**
* Result table.
*/
@@ -127,6 +129,7 @@ public abstract class AbstractSearchResultPanel<
this.filtered = builder.filtered;
this.checkBoxEnabled = builder.checkBoxEnabled;
+ this.showPaginator = builder.showPaginator;
this.restClient = builder.restClient;
@@ -158,6 +161,7 @@ public abstract class AbstractSearchResultPanel<
// ---------------------------
final Form<?> paginatorForm = new Form<>("paginator");
paginatorForm.setOutputMarkupPlaceholderTag(true);
+ paginatorForm.setVisible(showPaginator);
container.add(paginatorForm);
final DropDownChoice<Integer> rowsChooser = new DropDownChoice<>(
@@ -302,6 +306,8 @@ public abstract class AbstractSearchResultPanel<
protected boolean checkBoxEnabled = true;
+ protected boolean showPaginator = true;
+
/**
* Filter used in case of filtered search.
*/
@@ -324,6 +330,11 @@ public abstract class AbstractSearchResultPanel<
return this;
}
+ public Builder<T, W, E> hidePaginator() {
+ this.showPaginator = false;
+ return this;
+ }
+
public Builder<T, W, E> setFiql(final String fiql) {
this.fiql = fiql;
return this;
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java
index 100afbd..dc6388a 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java
@@ -168,7 +168,7 @@ public abstract class AnySearchResultPanel<T extends AnyTO>
return new StatusPanel(
panelId,
((ProvisioningResult<T>) result).getAny(),
- new ListModel<StatusBean>(new ArrayList<StatusBean>()),
+ new ListModel<>(new ArrayList<StatusBean>()),
CollectionUtils.collect(
((ProvisioningResult<T>) result).getPropagationStatuses(),
new SerializableTransformer<PropagationStatus, Pair<ConnObjectTO, ConnObjectWrapper>>() {
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java
index 718896b..a912bde 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java
@@ -35,6 +35,7 @@ import org.apache.syncope.client.console.commons.SearchableDataProvider;
import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
import org.apache.syncope.client.console.panels.SchemaTypePanel.SchemaProvider;
import org.apache.syncope.client.console.rest.SchemaRestClient;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.BooleanPropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
@@ -44,7 +45,6 @@ import org.apache.syncope.common.lib.to.AbstractSchemaTO;
import org.apache.syncope.common.lib.types.SchemaType;
import org.apache.syncope.common.lib.types.StandardEntitlement;
import org.apache.syncope.common.rest.api.service.SchemaService;
-import org.apache.wicket.AttributeModifier;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
@@ -54,14 +54,11 @@ import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder;
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.PropertyColumn;
-import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.ResourceModel;
-import org.springframework.beans.BeanWrapper;
-import org.springframework.beans.BeanWrapperImpl;
import org.springframework.util.ReflectionUtils;
public class SchemaTypePanel extends AbstractTypesPanel<AbstractSchemaTO, SchemaProvider> {
@@ -113,7 +110,7 @@ public class SchemaTypePanel extends AbstractTypesPanel<AbstractSchemaTO, Schema
SyncopeConsoleSession.get().getService(
SchemaService.class).update(schemaType, modelObject);
}
-
+
info(getString(Constants.OPERATION_SUCCEEDED));
modal.close(target);
} catch (Exception e) {
@@ -158,29 +155,7 @@ public class SchemaTypePanel extends AbstractTypesPanel<AbstractSchemaTO, Schema
if (clazzField != null) {
if (clazzField.getType().equals(Boolean.class) || clazzField.getType().equals(boolean.class)) {
- columns.add(new AbstractColumn<AbstractSchemaTO, String>(new ResourceModel(field), field) {
-
- private static final long serialVersionUID = 8263694778917279290L;
-
- @Override
- public void populateItem(final Item<ICellPopulator<AbstractSchemaTO>> item,
- final String componentId, final IModel<AbstractSchemaTO> model) {
-
- BeanWrapper bwi = new BeanWrapperImpl(model.getObject());
- Object obj = bwi.getPropertyValue(field);
-
- item.add(new Label(componentId, StringUtils.EMPTY));
- if (Boolean.valueOf(obj.toString())) {
- item.add(new AttributeModifier("class", "glyphicon glyphicon-ok"));
- item.add(new AttributeModifier("style", "display: table-cell; text-align: center;"));
- }
- }
-
- @Override
- public String getCssClass() {
- return "short_fixedsize";
- }
- });
+ columns.add(new BooleanPropertyColumn<AbstractSchemaTO>(new ResourceModel(field), field, field));
} else {
final IColumn<AbstractSchemaTO, String> column = new PropertyColumn<AbstractSchemaTO, String>(
new ResourceModel(field), field, field) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/client/console/src/main/java/org/apache/syncope/client/console/panels/TogglePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/TogglePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/TogglePanel.java
index 0df1e8b..8280e58 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/TogglePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/TogglePanel.java
@@ -59,7 +59,7 @@ public abstract class TogglePanel<T extends Serializable> extends Panel {
private final Label header;
- private List<Component> outherObjects = new ArrayList<>();
+ private List<Component> outerObjects = new ArrayList<>();
public TogglePanel(final String id) {
super(id);
@@ -97,7 +97,7 @@ public abstract class TogglePanel<T extends Serializable> extends Panel {
}
}));
- add(new ListView<Component>("outherObjectsRepeater", outherObjects) {
+ add(new ListView<Component>("outerObjectsRepeater", outerObjects) {
private static final long serialVersionUID = -9180479401817023838L;
@@ -113,13 +113,13 @@ public abstract class TogglePanel<T extends Serializable> extends Panel {
/**
* Add object outside the main container.
* Use this method just to be not influenced by specific inner object css'.
- * Be sure to provide <tt>outher</tt> as id.
+ * Be sure to provide <tt>outer</tt> as id.
*
* @param childs components to be added.
* @return the current panel instance.
*/
- public TogglePanel<T> addOutherObject(final Component... childs) {
- outherObjects.addAll(Arrays.asList(childs));
+ public TogglePanel<T> addOuterObject(final Component... childs) {
+ outerObjects.addAll(Arrays.asList(childs));
return this;
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/client/console/src/main/java/org/apache/syncope/client/console/panels/WorkflowTogglePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/WorkflowTogglePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/WorkflowTogglePanel.java
index f7bdc96..cc6d577 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/WorkflowTogglePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/WorkflowTogglePanel.java
@@ -47,8 +47,8 @@ public class WorkflowTogglePanel extends TogglePanel<String> {
public WorkflowTogglePanel(final String id, final PageReference pageRef, final Image workflowDefDiagram) {
super(id);
- modal = new BaseModal<>("outher");
- addOutherObject(modal);
+ modal = new BaseModal<>("outer");
+ addOuterObject(modal);
modal.size(Modal.Size.Large);
container = new WebMarkupContainer("container");
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java
index 1e158e5..92ff15a 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/TaskRestClient.java
@@ -30,7 +30,7 @@ import org.apache.syncope.common.lib.to.PropagationTaskTO;
import org.apache.syncope.common.lib.to.PushTaskTO;
import org.apache.syncope.common.lib.to.SchedTaskTO;
import org.apache.syncope.common.lib.to.SyncTaskTO;
-import org.apache.syncope.common.lib.to.TaskExecTO;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.types.TaskType;
import org.apache.syncope.common.rest.api.beans.ExecuteQuery;
import org.apache.syncope.common.rest.api.beans.TaskExecQuery;
@@ -113,7 +113,7 @@ public class TaskRestClient extends BaseRestClient implements ExecutionRestClien
getResult();
}
- public List<TaskExecTO> listExecutions(final Long taskId, final int page, final int size) {
+ public List<ExecTO> listExecutions(final Long taskId, final int page, final int size) {
return getService(TaskService.class).
listExecutions(new TaskExecQuery.Builder().key(taskId).page(page).size(size).build()).getResult();
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/client/console/src/main/java/org/apache/syncope/client/console/tasks/TaskExecutions.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/TaskExecutions.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/TaskExecutions.java
index f7bd09b..9fc136d 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/tasks/TaskExecutions.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/TaskExecutions.java
@@ -38,7 +38,7 @@ import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.AbstractTaskTO;
-import org.apache.syncope.common.lib.to.TaskExecTO;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.types.StandardEntitlement;
import org.apache.wicket.PageReference;
import org.apache.wicket.ajax.AjaxRequestTarget;
@@ -50,7 +50,7 @@ import org.apache.wicket.model.ResourceModel;
import org.apache.wicket.model.StringResourceModel;
public abstract class TaskExecutions
- extends AbstractSearchResultPanel<TaskExecTO, TaskExecTO, TaskExecProvider, TaskRestClient> {
+ extends AbstractSearchResultPanel<ExecTO, ExecTO, TaskExecProvider, TaskRestClient> {
private static final long serialVersionUID = 2039393934721149162L;
@@ -69,46 +69,46 @@ public abstract class TaskExecutions
protected abstract void next(final String title, final SecondLevel secondLevel, final AjaxRequestTarget target);
@Override
- protected List<IColumn<TaskExecTO, String>> getColumns() {
- final List<IColumn<TaskExecTO, String>> columns = new ArrayList<IColumn<TaskExecTO, String>>();
+ protected List<IColumn<ExecTO, String>> getColumns() {
+ final List<IColumn<ExecTO, String>> columns = new ArrayList<>();
- columns.add(new PropertyColumn<TaskExecTO, String>(new ResourceModel("key"), "key", "key"));
+ columns.add(new PropertyColumn<ExecTO, String>(new ResourceModel("key"), "key", "key"));
- columns.add(new DatePropertyColumn<TaskExecTO>(new ResourceModel("start"), "start", "start"));
+ columns.add(new DatePropertyColumn<ExecTO>(new ResourceModel("start"), "start", "start"));
- columns.add(new DatePropertyColumn<TaskExecTO>(new ResourceModel("end"), "end", "end"));
+ columns.add(new DatePropertyColumn<ExecTO>(new ResourceModel("end"), "end", "end"));
- columns.add(new PropertyColumn<TaskExecTO, String>(new ResourceModel("status"), "status", "status"));
+ columns.add(new PropertyColumn<ExecTO, String>(new ResourceModel("status"), "status", "status"));
- columns.add(new ActionColumn<TaskExecTO, String>(new ResourceModel("actions", "")) {
+ columns.add(new ActionColumn<ExecTO, String>(new ResourceModel("actions", "")) {
private static final long serialVersionUID = -3503023501954863131L;
@Override
- public ActionLinksPanel<TaskExecTO> getActions(
- final String componentId, final IModel<TaskExecTO> model) {
+ public ActionLinksPanel<ExecTO> getActions(
+ final String componentId, final IModel<ExecTO> model) {
- final TaskExecTO taskExecutionTO = model.getObject();
+ final ExecTO taskExecutionTO = model.getObject();
- final ActionLinksPanel.Builder<TaskExecTO> panel = ActionLinksPanel.builder(pageRef);
+ final ActionLinksPanel.Builder<ExecTO> panel = ActionLinksPanel.builder(pageRef);
panel.
- add(new ActionLink<TaskExecTO>() {
+ add(new ActionLink<ExecTO>() {
private static final long serialVersionUID = -3722207913631435501L;
@Override
- public void onClick(final AjaxRequestTarget target, final TaskExecTO ignore) {
+ public void onClick(final AjaxRequestTarget target, final ExecTO ignore) {
next(new StringResourceModel("execution.view", TaskExecutions.this, model).getObject(),
new ExecMessage(model.getObject().getMessage()), target);
}
}, ActionLink.ActionType.SEARCH, StandardEntitlement.TASK_READ).
- add(new ActionLink<TaskExecTO>() {
+ add(new ActionLink<ExecTO>() {
private static final long serialVersionUID = -3722207913631435501L;
@Override
- public void onClick(final AjaxRequestTarget target, final TaskExecTO ignore) {
+ public void onClick(final AjaxRequestTarget target, final ExecTO ignore) {
try {
restClient.deleteExecution(taskExecutionTO.getKey());
taskTO.getExecutions().remove(taskExecutionTO);
@@ -162,28 +162,28 @@ public abstract class TaskExecutions
return bulkActions;
}
- protected class TaskExecProvider extends SearchableDataProvider<TaskExecTO> {
+ protected class TaskExecProvider extends SearchableDataProvider<ExecTO> {
private static final long serialVersionUID = 8943636537120648961L;
- private final SortableDataProviderComparator<TaskExecTO> comparator;
+ private final SortableDataProviderComparator<ExecTO> comparator;
private final Long taskId;
public TaskExecProvider(final Long taskId, final int paginatorRows) {
super(paginatorRows);
this.taskId = taskId;
- comparator = new SortableDataProviderComparator<TaskExecTO>(this);
+ comparator = new SortableDataProviderComparator<>(this);
}
- public SortableDataProviderComparator<TaskExecTO> getComparator() {
+ public SortableDataProviderComparator<ExecTO> getComparator() {
return comparator;
}
@Override
- public Iterator<TaskExecTO> iterator(final long first, final long count) {
+ public Iterator<ExecTO> iterator(final long first, final long count) {
final int page = ((int) first / paginatorRows);
- List<TaskExecTO> list = taskRestClient.listExecutions(taskId, (page < 0 ? 0 : page) + 1, paginatorRows);
+ List<ExecTO> list = taskRestClient.listExecutions(taskId, (page < 0 ? 0 : page) + 1, paginatorRows);
Collections.sort(list, comparator);
return list.iterator();
}
@@ -194,14 +194,14 @@ public abstract class TaskExecutions
}
@Override
- public IModel<TaskExecTO> model(final TaskExecTO taskExecution) {
+ public IModel<ExecTO> model(final ExecTO taskExecution) {
- return new AbstractReadOnlyModel<TaskExecTO>() {
+ return new AbstractReadOnlyModel<ExecTO>() {
private static final long serialVersionUID = 7485475149862342421L;
@Override
- public TaskExecTO getObject() {
+ public ExecTO getObject() {
return taskExecution;
}
};
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java
index 3a21e64..424b212 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/topology/TopologyTogglePanel.java
@@ -70,14 +70,14 @@ public class TopologyTogglePanel extends TogglePanel<Serializable> {
super(id);
this.pageRef = pageRef;
- resourceModal = new BaseModal<>("outher");
+ resourceModal = new BaseModal<>("outer");
resourceModal.addSumbitButton();
resourceModal.size(Modal.Size.Large);
- addOutherObject(resourceModal);
+ addOuterObject(resourceModal);
- taskModal = new BaseModal<>("outher");
+ taskModal = new BaseModal<>("outer");
taskModal.size(Modal.Size.Large);
- addOutherObject(taskModal);
+ addOuterObject(taskModal);
container = new WebMarkupContainer("container");
container.setOutputMarkupPlaceholderTag(true);
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/BooleanPropertyColumn.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/BooleanPropertyColumn.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/BooleanPropertyColumn.java
new file mode 100644
index 0000000..843fd3a
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/BooleanPropertyColumn.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.wicket.AttributeModifier;
+import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.model.IModel;
+import org.springframework.beans.BeanWrapper;
+import org.springframework.beans.BeanWrapperImpl;
+
+/**
+ * Format column's value as boolean.
+ */
+public class BooleanPropertyColumn<T> extends PropertyColumn<T, String> {
+
+ private static final long serialVersionUID = 3527840552172947705L;
+
+ public BooleanPropertyColumn(final IModel<String> displayModel, final String sortProperty,
+ final String propertyExpression) {
+
+ super(displayModel, sortProperty, propertyExpression);
+ }
+
+ @Override
+ public void populateItem(final Item<ICellPopulator<T>> item, final String componentId, final IModel<T> rowModel) {
+
+ BeanWrapper bwi = new BeanWrapperImpl(rowModel.getObject());
+ Object obj = bwi.getPropertyValue(getPropertyExpression());
+
+ item.add(new Label(componentId, StringUtils.EMPTY));
+ if (Boolean.valueOf(obj.toString())) {
+ item.add(new AttributeModifier("class", "glyphicon glyphicon-ok"));
+ item.add(new AttributeModifier("style", "display: table-cell; text-align: center;"));
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/DatePropertyColumn.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/DatePropertyColumn.java b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/DatePropertyColumn.java
index 992cfcf..fec996b 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/DatePropertyColumn.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/wicket/extensions/markup/html/repeater/data/table/DatePropertyColumn.java
@@ -20,7 +20,6 @@ package org.apache.syncope.client.console.wicket.extensions.markup.html.repeater
import java.util.Date;
import org.apache.syncope.client.console.SyncopeConsoleSession;
-
import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
import org.apache.wicket.markup.html.basic.Label;
@@ -42,7 +41,6 @@ public class DatePropertyColumn<T> extends PropertyColumn<T, String> {
@Override
public void populateItem(final Item<ICellPopulator<T>> item, final String componentId, final IModel<T> rowModel) {
-
IModel<?> date = getDataModel(rowModel);
String convertedDate = "";
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java b/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java
index 7d1c907..ff04109 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/widgets/JobWidget.java
@@ -18,26 +18,23 @@
*/
package org.apache.syncope.client.console.widgets;
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.apache.syncope.client.console.SyncopeConsoleSession;
import org.apache.syncope.client.console.commons.SearchableDataProvider;
import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
import org.apache.syncope.client.console.panels.AbstractSearchResultPanel;
import org.apache.syncope.client.console.rest.BaseRestClient;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.BooleanPropertyColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
import org.apache.syncope.client.console.wizards.WizardMgtPanel;
-import org.apache.syncope.common.lib.to.AbstractExecTO;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.JobTO;
-import org.apache.syncope.common.lib.to.ReportExecTO;
-import org.apache.syncope.common.lib.to.TaskExecTO;
import org.apache.syncope.common.rest.api.service.NotificationService;
import org.apache.syncope.common.rest.api.service.ReportService;
import org.apache.syncope.common.rest.api.service.TaskService;
@@ -57,7 +54,7 @@ public class JobWidget extends AbstractWidget {
private final List<JobTO> available;
- private final List<AbstractExecTO> recent;
+ private final List<ExecTO> recent;
public JobWidget(final String id, final PageReference pageRef) {
super(id);
@@ -75,10 +72,10 @@ public class JobWidget extends AbstractWidget {
add(new AvailableJobsPanel("available", pageRef));
- List<ReportExecTO> reportExecs = SyncopeConsoleSession.get().
+ List<ExecTO> reportExecs = SyncopeConsoleSession.get().
getService(ReportService.class).listRecentExecutions(10);
- List<TaskExecTO> taskExecs = SyncopeConsoleSession.get().
+ List<ExecTO> taskExecs = SyncopeConsoleSession.get().
getService(TaskService.class).listRecentExecutions(10);
recent = new ArrayList<>();
@@ -126,37 +123,17 @@ public class JobWidget extends AbstractWidget {
@Override
protected List<IColumn<JobTO, String>> getColumns() {
- final List<IColumn<JobTO, String>> columns = new ArrayList<>();
-
- for (Field field : JobTO.class.getDeclaredFields()) {
- if (field != null && !Modifier.isStatic(field.getModifiers())) {
- final String fieldName = field.getName();
- if (field.getType().isArray()
- || Collection.class.isAssignableFrom(field.getType())
- || Map.class.isAssignableFrom(field.getType())) {
-
- columns.add(new PropertyColumn<JobTO, String>(
- new ResourceModel(field.getName()), field.getName()));
- } else {
- columns.add(new PropertyColumn<JobTO, String>(
- new ResourceModel(field.getName()), field.getName(), field.getName()) {
-
- private static final long serialVersionUID = -6902459669035442212L;
-
- @Override
- public String getCssClass() {
- String css = super.getCssClass();
- if ("referenceKey".equals(fieldName)) {
- css = StringUtils.isBlank(css)
- ? "medium_fixedsize"
- : css + " medium_fixedsize";
- }
- return css;
- }
- });
- }
- }
- }
+ List<IColumn<JobTO, String>> columns = new ArrayList<>();
+
+ columns.add(new PropertyColumn<JobTO, String>(new ResourceModel("reference"), "reference", "reference"));
+
+ columns.add(new BooleanPropertyColumn<JobTO>(new ResourceModel("running"), "running", "running"));
+
+ columns.add(new BooleanPropertyColumn<JobTO>(new ResourceModel("scheduled"), "scheduled", "scheduled"));
+
+ columns.add(new DatePropertyColumn<JobTO>(new ResourceModel("start"), "start", "start"));
+
+ columns.add(new PropertyColumn<JobTO, String>(new ResourceModel("status"), "status", "status"));
return columns;
}
@@ -193,24 +170,23 @@ public class JobWidget extends AbstractWidget {
}
protected class RecentExecPanel extends AbstractSearchResultPanel<
- AbstractExecTO, AbstractExecTO, RecentExecProvider, BaseRestClient> {
+ ExecTO, ExecTO, RecentExecProvider, BaseRestClient> {
private static final long serialVersionUID = -8214546246301342868L;
public RecentExecPanel(final String id, final PageReference pageRef) {
- super(id, new Builder<AbstractExecTO, AbstractExecTO, BaseRestClient>(null, pageRef) {
+ super(id, new Builder<ExecTO, ExecTO, BaseRestClient>(null, pageRef) {
private static final long serialVersionUID = 8769126634538601689L;
@Override
- protected WizardMgtPanel<AbstractExecTO> newInstance(final String id) {
+ protected WizardMgtPanel<ExecTO> newInstance(final String id) {
return new RecentExecPanel(id, pageRef);
}
- }.disableCheckBoxes());
+ }.disableCheckBoxes().hidePaginator());
rows = ROWS;
initResultTable();
- container.get("paginator").setVisible(false);
}
@Override
@@ -229,49 +205,27 @@ public class JobWidget extends AbstractWidget {
}
@Override
- protected List<IColumn<AbstractExecTO, String>> getColumns() {
- final List<IColumn<AbstractExecTO, String>> columns = new ArrayList<>();
-
- for (Field field : AbstractExecTO.class.getDeclaredFields()) {
- if (field != null && !Modifier.isStatic(field.getModifiers())) {
- final String fieldName = field.getName();
- if (field.getType().isArray()
- || Collection.class.isAssignableFrom(field.getType())
- || Map.class.isAssignableFrom(field.getType())) {
-
- columns.add(new PropertyColumn<AbstractExecTO, String>(
- new ResourceModel(field.getName()), field.getName()));
- } else {
- columns.add(new PropertyColumn<AbstractExecTO, String>(
- new ResourceModel(field.getName()), field.getName(), field.getName()) {
-
- private static final long serialVersionUID = -6902459669035442212L;
-
- @Override
- public String getCssClass() {
- String css = super.getCssClass();
- if ("key".equals(fieldName)) {
- css = StringUtils.isBlank(css)
- ? "medium_fixedsize"
- : css + " medium_fixedsize";
- }
- return css;
- }
- });
- }
- }
- }
+ protected List<IColumn<ExecTO, String>> getColumns() {
+ List<IColumn<ExecTO, String>> columns = new ArrayList<>();
+
+ columns.add(new PropertyColumn<ExecTO, String>(new ResourceModel("reference"), "reference", "reference"));
+
+ columns.add(new DatePropertyColumn<ExecTO>(new ResourceModel("start"), "start", "start"));
+
+ columns.add(new DatePropertyColumn<ExecTO>(new ResourceModel("end"), "end", "end"));
+
+ columns.add(new PropertyColumn<ExecTO, String>(new ResourceModel("status"), "status", "status"));
return columns;
}
}
- protected final class RecentExecProvider extends SearchableDataProvider<AbstractExecTO> {
+ protected final class RecentExecProvider extends SearchableDataProvider<ExecTO> {
private static final long serialVersionUID = 2835707012690698633L;
- private final SortableDataProviderComparator<AbstractExecTO> comparator;
+ private final SortableDataProviderComparator<ExecTO> comparator;
private RecentExecProvider() {
super(ROWS);
@@ -280,7 +234,7 @@ public class JobWidget extends AbstractWidget {
}
@Override
- public Iterator<AbstractExecTO> iterator(final long first, final long count) {
+ public Iterator<ExecTO> iterator(final long first, final long count) {
Collections.sort(recent, comparator);
return recent.subList((int) first, (int) first + (int) count).iterator();
}
@@ -291,7 +245,7 @@ public class JobWidget extends AbstractWidget {
}
@Override
- public IModel<AbstractExecTO> model(final AbstractExecTO object) {
+ public IModel<ExecTO> model(final ExecTO object) {
return new CompoundPropertyModel<>(object);
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css b/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css
index a2dd0d1..b6ceeb9 100644
--- a/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css
+++ b/client/console/src/main/resources/META-INF/resources/css/syncopeConsole.css
@@ -255,7 +255,7 @@ span.overridable div.checkbox {
padding: 0px;
}
-div#outher.modal-lg {
+div#outer.modal-lg {
width: 1200px;
}
@@ -502,4 +502,4 @@ END - Result page
.nav-tabs-custom > .nav-tabs > li.active {
border-top-color: #d2d6de !important;
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/client/console/src/main/resources/org/apache/syncope/client/console/panels/TogglePanel.html
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/TogglePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/TogglePanel.html
index c5abcba..a8c6fab 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/TogglePanel.html
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/TogglePanel.html
@@ -98,8 +98,8 @@ under the License.
<wicket:child/>
</div>
- <span wicket:id="outherObjectsRepeater">
- <div wicket:id="outher"/>
+ <span wicket:id="outerObjectsRepeater">
+ <div wicket:id="outer"/>
</span>
</wicket:panel>
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/client/console/src/main/resources/org/apache/syncope/client/console/widgets/JobWidget.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/JobWidget.properties b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/JobWidget.properties
index a3d33ac..48ba26a 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/JobWidget.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/JobWidget.properties
@@ -14,9 +14,9 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-referenceKey=Key
-referenceName=Name
+reference=Reference
running=Running
scheduled=Scheduled
start=Start
message=Message
+end=End
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/client/console/src/main/resources/org/apache/syncope/client/console/widgets/JobWidget_it.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/JobWidget_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/JobWidget_it.properties
index a3d33ac..48ba26a 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/JobWidget_it.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/JobWidget_it.properties
@@ -14,9 +14,9 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-referenceKey=Key
-referenceName=Name
+reference=Reference
running=Running
scheduled=Scheduled
start=Start
message=Message
+end=End
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/client/console/src/main/resources/org/apache/syncope/client/console/widgets/JobWidget_pt_BR.properties
----------------------------------------------------------------------
diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/JobWidget_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/JobWidget_pt_BR.properties
index a3d33ac..48ba26a 100644
--- a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/JobWidget_pt_BR.properties
+++ b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/JobWidget_pt_BR.properties
@@ -14,9 +14,9 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-referenceKey=Key
-referenceName=Name
+reference=Reference
running=Running
scheduled=Scheduled
start=Start
message=Message
+end=End
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractExecTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractExecTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractExecTO.java
deleted file mode 100644
index c9165dc..0000000
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractExecTO.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.common.lib.to;
-
-import javax.xml.bind.annotation.XmlType;
-
-@XmlType
-public class AbstractExecTO extends AbstractStartEndBean implements EntityTO<Long> {
-
- private static final long serialVersionUID = -4621191979198357081L;
-
- private Long key;
-
- private String status;
-
- private String message;
-
- @Override
- public Long getKey() {
- return key;
- }
-
- @Override
- public void setKey(final Long key) {
- this.key = key;
- }
-
- public String getMessage() {
- return message;
- }
-
- public void setMessage(final String message) {
- this.message = message;
- }
-
- public String getStatus() {
- return status;
- }
-
- public void setStatus(final String status) {
- this.status = status;
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractTaskTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractTaskTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractTaskTO.java
index f6606e3..0c6356b 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractTaskTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractTaskTO.java
@@ -42,7 +42,7 @@ public abstract class AbstractTaskTO extends AbstractStartEndBean implements Ent
private String latestExecStatus;
- private final List<TaskExecTO> executions = new ArrayList<>();
+ private final List<ExecTO> executions = new ArrayList<>();
@Override
public Long getKey() {
@@ -66,7 +66,7 @@ public abstract class AbstractTaskTO extends AbstractStartEndBean implements Ent
@XmlElementWrapper(name = "executions")
@XmlElement(name = "execution")
@JsonProperty("executions")
- public List<TaskExecTO> getExecutions() {
+ public List<ExecTO> getExecutions() {
return executions;
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/common/lib/src/main/java/org/apache/syncope/common/lib/to/ExecTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ExecTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ExecTO.java
new file mode 100644
index 0000000..1a81ddf
--- /dev/null
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ExecTO.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.common.lib.to;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "exec")
+@XmlType()
+public class ExecTO extends AbstractStartEndBean implements EntityTO<Long> {
+
+ private static final long serialVersionUID = -4621191979198357081L;
+
+ private Long key;
+
+ private String reference;
+
+ private String status;
+
+ private String message;
+
+ @Override
+ public Long getKey() {
+ return key;
+ }
+
+ @Override
+ public void setKey(final Long key) {
+ this.key = key;
+ }
+
+ public String getReference() {
+ return reference;
+ }
+
+ public void setReference(final String reference) {
+ this.reference = reference;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(final String message) {
+ this.message = message;
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(final String status) {
+ this.status = status;
+ }
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/common/lib/src/main/java/org/apache/syncope/common/lib/to/JobTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/JobTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/JobTO.java
index a50429d..8d7d81c 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/JobTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/JobTO.java
@@ -29,9 +29,7 @@ public class JobTO extends AbstractBaseBean {
private static final long serialVersionUID = -7254450981751326711L;
- private Long referenceKey;
-
- private String referenceName;
+ private String reference;
private boolean running;
@@ -41,20 +39,12 @@ public class JobTO extends AbstractBaseBean {
private Date start;
- public Long getReferenceKey() {
- return referenceKey;
- }
-
- public void setReferenceKey(final Long referenceKey) {
- this.referenceKey = referenceKey;
- }
-
- public String getReferenceName() {
- return referenceName;
+ public String getReference() {
+ return reference;
}
- public void setReferenceName(final String referenceName) {
- this.referenceName = referenceName;
+ public void setReference(final String reference) {
+ this.reference = reference;
}
public boolean isRunning() {
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportExecTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportExecTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportExecTO.java
deleted file mode 100644
index 5d78c58..0000000
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportExecTO.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.common.lib.to;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-@XmlRootElement(name = "reportExec")
-@XmlType
-public class ReportExecTO extends AbstractExecTO {
-
- private static final long serialVersionUID = -1025555939724089215L;
-
- private long report;
-
- public long getReport() {
- return report;
- }
-
- public void setReport(final long report) {
- this.report = report;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportTO.java
index d6bba9e..7260796 100644
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportTO.java
+++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ReportTO.java
@@ -43,7 +43,7 @@ public class ReportTO extends AbstractStartEndBean implements EntityTO<Long> {
private String cronExpression;
- private final List<ReportExecTO> executions = new ArrayList<>();
+ private final List<ExecTO> executions = new ArrayList<>();
private String latestExecStatus;
@@ -92,7 +92,7 @@ public class ReportTO extends AbstractStartEndBean implements EntityTO<Long> {
@XmlElementWrapper(name = "executions")
@XmlElement(name = "execution")
@JsonProperty("executions")
- public List<ReportExecTO> getExecutions() {
+ public List<ExecTO> getExecutions() {
return executions;
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/common/lib/src/main/java/org/apache/syncope/common/lib/to/TaskExecTO.java
----------------------------------------------------------------------
diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/TaskExecTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/TaskExecTO.java
deleted file mode 100644
index 314c51c..0000000
--- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/TaskExecTO.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.common.lib.to;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import org.apache.syncope.common.lib.types.TaskType;
-
-@XmlRootElement(name = "taskExec")
-@XmlType
-public class TaskExecTO extends AbstractExecTO {
-
- private static final long serialVersionUID = -5401795154606268973L;
-
- private long task;
-
- private TaskType type;
-
- public long getTask() {
- return task;
- }
-
- public void setTask(final long task) {
- this.task = task;
- }
-
- public TaskType getType() {
- return type;
- }
-
- public void setType(final TaskType type) {
- this.type = type;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
index 7914eb0..4c259d6 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ReportService.java
@@ -35,8 +35,8 @@ import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.apache.syncope.common.lib.to.BulkActionResult;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.JobTO;
-import org.apache.syncope.common.lib.to.ReportExecTO;
import org.apache.syncope.common.lib.to.ReportTO;
import org.apache.syncope.common.lib.types.JobAction;
import org.apache.syncope.common.lib.types.ReportExecExportFormat;
@@ -107,7 +107,7 @@ public interface ReportService extends JAXRSService {
@GET
@Path("executions/recent")
@Produces({ JAXRSService.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<ReportExecTO> listRecentExecutions(@Min(1) @QueryParam(JAXRSService.PARAM_MAX) @DefaultValue("25") int max);
+ List<ExecTO> listRecentExecutions(@Min(1) @QueryParam(JAXRSService.PARAM_MAX) @DefaultValue("25") int max);
/**
* Deletes report execution with matching key.
@@ -138,7 +138,7 @@ public interface ReportService extends JAXRSService {
@POST
@Path("{key}/execute")
@Produces({ JAXRSService.APPLICATION_XML, MediaType.APPLICATION_JSON })
- ReportExecTO execute(@BeanParam ExecuteQuery query);
+ ExecTO execute(@BeanParam ExecuteQuery query);
/**
* Exports the report execution with matching key in the requested format.
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
----------------------------------------------------------------------
diff --git a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
index 15eb358..f0ba128 100644
--- a/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
+++ b/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/TaskService.java
@@ -37,10 +37,10 @@ import javax.ws.rs.core.Response;
import org.apache.syncope.common.lib.to.AbstractTaskTO;
import org.apache.syncope.common.lib.to.BulkAction;
import org.apache.syncope.common.lib.to.BulkActionResult;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.JobTO;
import org.apache.syncope.common.lib.to.PagedResult;
import org.apache.syncope.common.lib.to.SchedTaskTO;
-import org.apache.syncope.common.lib.to.TaskExecTO;
import org.apache.syncope.common.lib.types.JobAction;
import org.apache.syncope.common.rest.api.beans.BulkExecDeleteQuery;
import org.apache.syncope.common.rest.api.beans.ExecuteQuery;
@@ -117,7 +117,7 @@ public interface TaskService extends JAXRSService {
@GET
@Path("{key}/executions")
@Produces({ JAXRSService.APPLICATION_XML, MediaType.APPLICATION_JSON })
- PagedResult<TaskExecTO> listExecutions(@BeanParam TaskExecQuery query);
+ PagedResult<ExecTO> listExecutions(@BeanParam TaskExecQuery query);
/**
* Returns the list of recently completed task executions, ordered by end date descendent.
@@ -128,7 +128,7 @@ public interface TaskService extends JAXRSService {
@GET
@Path("executions/recent")
@Produces({ JAXRSService.APPLICATION_XML, MediaType.APPLICATION_JSON })
- List<TaskExecTO> listRecentExecutions(@Min(1) @QueryParam(JAXRSService.PARAM_MAX) @DefaultValue("25") int max);
+ List<ExecTO> listRecentExecutions(@Min(1) @QueryParam(JAXRSService.PARAM_MAX) @DefaultValue("25") int max);
/**
* Deletes the task execution matching the provided key.
@@ -159,7 +159,7 @@ public interface TaskService extends JAXRSService {
@POST
@Path("{key}/execute")
@Produces({ JAXRSService.APPLICATION_XML, MediaType.APPLICATION_JSON })
- TaskExecTO execute(@BeanParam ExecuteQuery query);
+ ExecTO execute(@BeanParam ExecuteQuery query);
/**
* Executes the provided bulk action.
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/core/logic/src/main/java/org/apache/syncope/core/logic/AbstractJobLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/AbstractJobLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/AbstractJobLogic.java
index f6d6efb..c06cb62 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/AbstractJobLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/AbstractJobLogic.java
@@ -23,7 +23,6 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import org.apache.commons.collections4.ComparatorUtils;
-import org.apache.commons.lang3.tuple.Pair;
import org.apache.syncope.common.lib.AbstractBaseBean;
import org.apache.syncope.common.lib.to.JobTO;
import org.apache.syncope.common.lib.types.JobAction;
@@ -82,7 +81,7 @@ abstract class AbstractJobLogic<T extends AbstractBaseBean> extends AbstractTran
@Autowired
protected SchedulerFactoryBean scheduler;
- protected abstract Pair<Long, String> getReference(final JobKey jobKey);
+ protected abstract String getReference(final JobKey jobKey);
protected List<JobTO> listJobs(final int max) {
List<JobTO> jobTOs = new ArrayList<>();
@@ -93,12 +92,11 @@ abstract class AbstractJobLogic<T extends AbstractBaseBean> extends AbstractTran
JobTO jobTO = new JobTO();
- Pair<Long, String> reference = getReference(jobKey);
+ String reference = getReference(jobKey);
if (reference != null) {
jobTOs.add(jobTO);
- jobTO.setReferenceKey(reference.getLeft());
- jobTO.setReferenceName(reference.getRight());
+ jobTO.setReference(reference);
List<? extends Trigger> jobTriggers = scheduler.getScheduler().getTriggersOfJob(jobKey);
if (jobTriggers.isEmpty()) {
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/core/logic/src/main/java/org/apache/syncope/core/logic/NotificationLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/NotificationLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/NotificationLogic.java
index 86a0d9a..ebe72a3 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/NotificationLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/NotificationLogic.java
@@ -24,11 +24,11 @@ import java.util.List;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.Transformer;
import org.apache.commons.lang3.ArrayUtils;
-import org.apache.commons.lang3.tuple.Pair;
import org.apache.syncope.common.lib.to.JobTO;
import org.apache.syncope.common.lib.to.NotificationTO;
import org.apache.syncope.common.lib.types.JobAction;
import org.apache.syncope.common.lib.types.StandardEntitlement;
+import org.apache.syncope.core.logic.notification.NotificationJob;
import org.apache.syncope.core.persistence.api.dao.NotFoundException;
import org.apache.syncope.core.persistence.api.dao.NotificationDAO;
import org.apache.syncope.core.persistence.api.entity.Notification;
@@ -105,8 +105,8 @@ public class NotificationLogic extends AbstractJobLogic<NotificationTO> {
}
@Override
- protected Pair<Long, String> getReference(final JobKey jobKey) {
- return JobManager.NOTIFICATION_JOB.equals(jobKey) ? Pair.of(0L, jobKey.getName()) : null;
+ protected String getReference(final JobKey jobKey) {
+ return JobManager.NOTIFICATION_JOB.equals(jobKey) ? NotificationJob.class.getSimpleName() : null;
}
public JobTO getJob() {
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/core/logic/src/main/java/org/apache/syncope/core/logic/ReportLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/ReportLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/ReportLogic.java
index 56f3d13..447de24 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/ReportLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/ReportLogic.java
@@ -38,9 +38,8 @@ import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.Transformer;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.ArrayUtils;
-import org.apache.commons.lang3.tuple.Pair;
import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.to.ReportExecTO;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.ReportTO;
import org.apache.syncope.common.lib.types.ClientExceptionType;
import org.apache.syncope.common.lib.types.ReportExecExportFormat;
@@ -154,7 +153,7 @@ public class ReportLogic extends AbstractJobLogic<ReportTO> {
}
@PreAuthorize("hasRole('" + StandardEntitlement.REPORT_EXECUTE + "')")
- public ReportExecTO execute(final Long key, final Date startAt) {
+ public ExecTO execute(final Long key, final Date startAt) {
Report report = reportDAO.find(key);
if (report == null) {
throw new NotFoundException("Report " + key);
@@ -181,8 +180,8 @@ public class ReportLogic extends AbstractJobLogic<ReportTO> {
throw sce;
}
- ReportExecTO result = new ReportExecTO();
- result.setReport(key);
+ ExecTO result = new ExecTO();
+ result.setReference(binder.buildReference(report));
result.setStart(new Date());
result.setStatus(ReportExecStatus.STARTED.name());
result.setMessage("Job fired; waiting for results...");
@@ -290,24 +289,24 @@ public class ReportLogic extends AbstractJobLogic<ReportTO> {
}
@PreAuthorize("hasRole('" + StandardEntitlement.REPORT_LIST + "')")
- public List<ReportExecTO> listRecentExecutions(final int max) {
- return CollectionUtils.collect(reportExecDAO.findRecent(max), new Transformer<ReportExec, ReportExecTO>() {
+ public List<ExecTO> listRecentExecutions(final int max) {
+ return CollectionUtils.collect(reportExecDAO.findRecent(max), new Transformer<ReportExec, ExecTO>() {
@Override
- public ReportExecTO transform(final ReportExec reportExec) {
- return binder.getReportExecTO(reportExec);
+ public ExecTO transform(final ReportExec reportExec) {
+ return binder.getExecTO(reportExec);
}
- }, new ArrayList<ReportExecTO>());
+ }, new ArrayList<ExecTO>());
}
@PreAuthorize("hasRole('" + StandardEntitlement.REPORT_DELETE + "')")
- public ReportExecTO deleteExecution(final Long executionKey) {
+ public ExecTO deleteExecution(final Long executionKey) {
ReportExec reportExec = reportExecDAO.find(executionKey);
if (reportExec == null) {
throw new NotFoundException("Report execution " + executionKey);
}
- ReportExecTO reportExecToDelete = binder.getReportExecTO(reportExec);
+ ExecTO reportExecToDelete = binder.getExecTO(reportExec);
reportExecDAO.delete(reportExec);
return reportExecToDelete;
}
@@ -338,11 +337,11 @@ public class ReportLogic extends AbstractJobLogic<ReportTO> {
}
@Override
- protected Pair<Long, String> getReference(final JobKey jobKey) {
+ protected String getReference(final JobKey jobKey) {
Long key = JobNamer.getReportKeyFromJobName(jobKey.getName());
Report report = reportDAO.find(key);
- return report == null ? null : Pair.of(key, report.getName());
+ return report == null ? null : binder.buildReference(report);
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/core/logic/src/main/java/org/apache/syncope/core/logic/TaskLogic.java
----------------------------------------------------------------------
diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/TaskLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/TaskLogic.java
index 24fbf16..ccfa519 100644
--- a/core/logic/src/main/java/org/apache/syncope/core/logic/TaskLogic.java
+++ b/core/logic/src/main/java/org/apache/syncope/core/logic/TaskLogic.java
@@ -26,13 +26,12 @@ import java.util.Map;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.Transformer;
import org.apache.commons.lang3.ArrayUtils;
-import org.apache.commons.lang3.tuple.Pair;
import org.apache.syncope.common.lib.SyncopeClientException;
import org.apache.syncope.common.lib.to.AbstractTaskTO;
import org.apache.syncope.common.lib.to.BulkActionResult;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.JobTO;
import org.apache.syncope.common.lib.to.SchedTaskTO;
-import org.apache.syncope.common.lib.to.TaskExecTO;
import org.apache.syncope.common.lib.types.AnyTypeKind;
import org.apache.syncope.common.lib.types.ClientExceptionType;
import org.apache.syncope.common.lib.types.JobAction;
@@ -176,23 +175,23 @@ public class TaskLogic extends AbstractJobLogic<AbstractTaskTO> {
}
@PreAuthorize("hasRole('" + StandardEntitlement.TASK_EXECUTE + "')")
- public TaskExecTO execute(final Long taskKey, final Date startAt, final boolean dryRun) {
+ public ExecTO execute(final Long taskKey, final Date startAt, final boolean dryRun) {
Task task = taskDAO.find(taskKey);
if (task == null) {
throw new NotFoundException("Task " + taskKey);
}
TaskUtils taskUtils = taskUtilsFactory.getInstance(task);
- TaskExecTO result = null;
+ ExecTO result = null;
switch (taskUtils.getType()) {
case PROPAGATION:
TaskExec propExec = taskExecutor.execute((PropagationTask) task);
- result = binder.getTaskExecTO(propExec);
+ result = binder.getExecTO(propExec);
break;
case NOTIFICATION:
TaskExec notExec = notificationJobDelegate.executeSingle((NotificationTask) task);
- result = binder.getTaskExecTO(notExec);
+ result = binder.getExecTO(notExec);
break;
case SCHEDULED:
@@ -225,8 +224,8 @@ public class TaskLogic extends AbstractJobLogic<AbstractTaskTO> {
throw sce;
}
- result = new TaskExecTO();
- result.setTask(taskKey);
+ result = new ExecTO();
+ result.setReference(binder.buildReference(task));
result.setStart(new Date());
result.setStatus("JOB_FIRED");
result.setMessage("Job fired; waiting for results...");
@@ -265,7 +264,7 @@ public class TaskLogic extends AbstractJobLogic<AbstractTaskTO> {
}
@PreAuthorize("hasRole('" + StandardEntitlement.TASK_READ + "')")
- public List<TaskExecTO> listExecutions(
+ public List<ExecTO> listExecutions(
final Long taskKey, final int page, final int size, final List<OrderByClause> orderByClauses) {
Task task = taskDAO.find(taskKey);
@@ -274,34 +273,34 @@ public class TaskLogic extends AbstractJobLogic<AbstractTaskTO> {
}
return CollectionUtils.collect(taskExecDAO.findAll(task, page, size, orderByClauses),
- new Transformer<TaskExec, TaskExecTO>() {
+ new Transformer<TaskExec, ExecTO>() {
@Override
- public TaskExecTO transform(final TaskExec taskExec) {
- return binder.getTaskExecTO(taskExec);
+ public ExecTO transform(final TaskExec taskExec) {
+ return binder.getExecTO(taskExec);
}
- }, new ArrayList<TaskExecTO>());
+ }, new ArrayList<ExecTO>());
}
@PreAuthorize("hasRole('" + StandardEntitlement.TASK_LIST + "')")
- public List<TaskExecTO> listRecentExecutions(final int max) {
- return CollectionUtils.collect(taskExecDAO.findRecent(max), new Transformer<TaskExec, TaskExecTO>() {
+ public List<ExecTO> listRecentExecutions(final int max) {
+ return CollectionUtils.collect(taskExecDAO.findRecent(max), new Transformer<TaskExec, ExecTO>() {
@Override
- public TaskExecTO transform(final TaskExec taskExec) {
- return binder.getTaskExecTO(taskExec);
+ public ExecTO transform(final TaskExec taskExec) {
+ return binder.getExecTO(taskExec);
}
- }, new ArrayList<TaskExecTO>());
+ }, new ArrayList<ExecTO>());
}
@PreAuthorize("hasRole('" + StandardEntitlement.TASK_DELETE + "')")
- public TaskExecTO deleteExecution(final Long execKey) {
+ public ExecTO deleteExecution(final Long execKey) {
TaskExec taskExec = taskExecDAO.find(execKey);
if (taskExec == null) {
throw new NotFoundException("Task execution " + execKey);
}
- TaskExecTO taskExecutionToDelete = binder.getTaskExecTO(taskExec);
+ ExecTO taskExecutionToDelete = binder.getExecTO(taskExec);
taskExecDAO.delete(taskExec);
return taskExecutionToDelete;
}
@@ -332,11 +331,11 @@ public class TaskLogic extends AbstractJobLogic<AbstractTaskTO> {
}
@Override
- protected Pair<Long, String> getReference(final JobKey jobKey) {
+ protected String getReference(final JobKey jobKey) {
Long key = JobNamer.getTaskKeyFromJobName(jobKey.getName());
Task task = taskDAO.find(key);
- return task == null || !(task instanceof SchedTask) ? null : Pair.of(key, ((SchedTask) task).getName());
+ return task == null || !(task instanceof SchedTask) ? null : binder.buildReference(task);
}
@Override
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ReportDataBinder.java
----------------------------------------------------------------------
diff --git a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ReportDataBinder.java b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ReportDataBinder.java
index 4c93cef..22a14e6 100644
--- a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ReportDataBinder.java
+++ b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ReportDataBinder.java
@@ -18,7 +18,7 @@
*/
package org.apache.syncope.core.provisioning.api.data;
-import org.apache.syncope.common.lib.to.ReportExecTO;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.ReportTO;
import org.apache.syncope.core.persistence.api.entity.Report;
import org.apache.syncope.core.persistence.api.entity.ReportExec;
@@ -27,7 +27,9 @@ public interface ReportDataBinder {
void getReport(Report report, ReportTO reportTO);
- ReportExecTO getReportExecTO(ReportExec execution);
+ String buildReference(Report report);
+
+ ExecTO getExecTO(ReportExec execution);
ReportTO getReportTO(Report report);
http://git-wip-us.apache.org/repos/asf/syncope/blob/c102dd24/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/TaskDataBinder.java
----------------------------------------------------------------------
diff --git a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/TaskDataBinder.java b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/TaskDataBinder.java
index dcaca2b..2c7bedf 100644
--- a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/TaskDataBinder.java
+++ b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/TaskDataBinder.java
@@ -19,8 +19,8 @@
package org.apache.syncope.core.provisioning.api.data;
import org.apache.syncope.common.lib.to.AbstractTaskTO;
+import org.apache.syncope.common.lib.to.ExecTO;
import org.apache.syncope.common.lib.to.SchedTaskTO;
-import org.apache.syncope.common.lib.to.TaskExecTO;
import org.apache.syncope.core.persistence.api.entity.task.SchedTask;
import org.apache.syncope.core.persistence.api.entity.task.Task;
import org.apache.syncope.core.persistence.api.entity.task.TaskExec;
@@ -30,10 +30,12 @@ public interface TaskDataBinder {
SchedTask createSchedTask(SchedTaskTO taskTO, TaskUtils taskUtil);
- TaskExecTO getTaskExecTO(TaskExec execution);
+ void updateSchedTask(SchedTask task, SchedTaskTO taskTO, TaskUtils taskUtil);
- <T extends AbstractTaskTO> T getTaskTO(Task task, TaskUtils taskUtil, boolean details);
+ String buildReference(Task task);
- void updateSchedTask(SchedTask task, SchedTaskTO taskTO, TaskUtils taskUtil);
+ ExecTO getExecTO(TaskExec execution);
+
+ <T extends AbstractTaskTO> T getTaskTO(Task task, TaskUtils taskUtil, boolean details);
}
[4/4] syncope git commit: Upgrading Spring Security
Posted by il...@apache.org.
Upgrading Spring Security
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/2c8815ab
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/2c8815ab
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/2c8815ab
Branch: refs/heads/master
Commit: 2c8815aba5e75212e495e2bfd97aed0ebf7de458
Parents: 83c428e
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Fri Feb 26 17:52:29 2016 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Fri Feb 26 17:52:29 2016 +0100
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/2c8815ab/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 2b8c515..1c94d32 100644
--- a/pom.xml
+++ b/pom.xml
@@ -334,7 +334,7 @@ under the License.
<jackson.version>2.7.1</jackson.version>
<spring.version>4.2.5.RELEASE</spring.version>
- <spring-security.version>4.0.3.RELEASE</spring-security.version>
+ <spring-security.version>4.0.4.RELEASE</spring-security.version>
<openjpa.version>2.4.1</openjpa.version>
<commons-dbcp.version>2.1.1</commons-dbcp.version>