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 2015/02/16 14:58:26 UTC
[6/6] syncope git commit: [SYNCOPE-643] Merge from 1_2_X
[SYNCOPE-643] Merge from 1_2_X
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/c981971c
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/c981971c
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/c981971c
Branch: refs/heads/master
Commit: c981971c97e06bbdbb83584585650b34eebe5f36
Parents: 21149fd 742b4ec
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Mon Feb 16 14:55:52 2015 +0100
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Mon Feb 16 14:55:52 2015 +0100
----------------------------------------------------------------------
.../syncope/core/provisioning/api/WorkflowResult.java | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/c981971c/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/WorkflowResult.java
----------------------------------------------------------------------
diff --cc core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/WorkflowResult.java
index a88e1e6,0000000..e1964e5
mode 100644,000000..100644
--- a/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/WorkflowResult.java
+++ b/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/WorkflowResult.java
@@@ -1,87 -1,0 +1,84 @@@
+/*
+ * 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.core.provisioning.api;
+
- import java.util.Collections;
++import java.util.HashSet;
+import java.util.Set;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import org.apache.syncope.common.lib.types.PropagationByResource;
+
+public class WorkflowResult<T> {
+
+ private T result;
+
+ private PropagationByResource propByRes;
+
+ private Set<String> performedTasks;
+
+ public WorkflowResult(final T result, final PropagationByResource propByRes, final String performedTask) {
+ this.result = result;
+ this.propByRes = propByRes;
- this.performedTasks = Collections.singleton(performedTask);
++ this.performedTasks = new HashSet<>();
++ this.performedTasks.add(performedTask);
+ }
+
+ public WorkflowResult(final T result, final PropagationByResource propByRes, final Set<String> performedTasks) {
+ this.result = result;
+ this.propByRes = propByRes;
- this.performedTasks = performedTasks;
++ this.performedTasks = new HashSet<>(performedTasks);
+ }
+
+ public T getResult() {
+ return result;
+ }
+
+ public void setResult(final T result) {
+ this.result = result;
+ }
+
+ public Set<String> getPerformedTasks() {
+ return performedTasks;
+ }
+
- public void setPerformedTasks(final Set<String> performedTasks) {
- this.performedTasks = performedTasks;
- }
-
+ public PropagationByResource getPropByRes() {
+ return propByRes;
+ }
+
+ public void setPropByRes(final PropagationByResource propByRes) {
+ this.propByRes = propByRes;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ return EqualsBuilder.reflectionEquals(this, obj);
+ }
+
+ @Override
+ public int hashCode() {
+ return HashCodeBuilder.reflectionHashCode(this);
+ }
+
+ @Override
+ public String toString() {
+ return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
+ }
+}