http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/client/console/src/main/resources/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder$Profile.html ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder$Profile.html b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder$Profile.html index 1925785..a50f801 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder$Profile.html +++ b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder$Profile.html @@ -23,9 +23,9 @@ under the License. <div class="form-group"><span wicket:id="name">[id]</span></div> <div class="form-group"><span wicket:id="description">[anyKey]</span></div> <div class="form-group"><span wicket:id="active">[active]</span></div> - <span wicket:id="syncTaskSpecifics"> + <span wicket:id="pullTaskSpecifics"> <div class="form-group"><span wicket:id="destinationRealm">[destinationRealm]</span></div> - <div class="form-group"><span wicket:id="syncMode">[syncMode]</span></div> + <div class="form-group"><span wicket:id="pullMode">[pullMode]</span></div> <div class="form-group"><span wicket:id="reconciliationFilterBuilderClassName">[filter]</span></div> </span> <div class="form-group"><span wicket:id="jobDelegateClassName">[jobDelegateClassName]</span></div> @@ -36,7 +36,7 @@ under the License. <div class="form-group"><span wicket:id="performCreate">[performCreate]</span></div> <div class="form-group"><span wicket:id="performUpdate">[performUpdate]</span></div> <div class="form-group"><span wicket:id="performDelete">[performDelete]</span></div> - <div class="form-group"><span wicket:id="syncStatus">[syncStatus]</span></div> + <div class="form-group"><span wicket:id="pullStatus">[pullStatus]</span></div> </span> <div class="form-group"><span wicket:id="lastExec">[lastExec]</span></div>
http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/client/console/src/main/resources/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder$Profile.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder$Profile.properties b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder$Profile.properties index 10c27ec..91d6e03 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder$Profile.properties +++ b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder$Profile.properties @@ -19,10 +19,10 @@ description=Description jobDelegateClassName=Class matchingRule=Matching rule unmatchingRule=Unmatching rule -performCreate=Synchronize created objects -performUpdate=Synchronize updated objects -performDelete=Synchronize deleted objects -syncStatus=Synchronize status +performCreate=Create pulled objects +performUpdate=Update pulled objects +performDelete=Delete pulled objects +pullStatus=Pull status lastExec=Last Execution nextExec=Next Execution detail=Detail http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/client/console/src/main/resources/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder$Profile_it.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder$Profile_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder$Profile_it.properties index 62edea3..a0f3cd4 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder$Profile_it.properties +++ b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder$Profile_it.properties @@ -19,10 +19,10 @@ description=Description jobDelegateClassName=Class matchingRule=Regola di matching unmatchingRule=Regola di unmatching -performCreate=Sincronizza oggetti creati -performUpdate=Sincronizza oggetti modificati -performDelete=Sincronizza oggetti rimossi -syncStatus=Sincronizza stato +performCreate=Crea oggetti da pull +performUpdate=Aggiorna oggetti da pull +performDelete=Rimuovi oggetti da pull +pullStatus=Recupera stato lastExec=Last Execution nextExec=Next Execution detail=Detail http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/client/console/src/main/resources/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder$Profile_pt_BR.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder$Profile_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder$Profile_pt_BR.properties index 5e07a6b..91d6e03 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder$Profile_pt_BR.properties +++ b/client/console/src/main/resources/org/apache/syncope/client/console/tasks/SchedTaskWizardBuilder$Profile_pt_BR.properties @@ -16,13 +16,13 @@ # under the License. name=Name description=Description -jobDelegateClassName=ClassmatchingRule=Matching rule +jobDelegateClassName=Class matchingRule=Matching rule unmatchingRule=Unmatching rule -performCreate=Synchronize created objects -performUpdate=Synchronize updated objects -performDelete=Synchronize deleted objects -syncStatus=Synchronize status +performCreate=Create pulled objects +performUpdate=Update pulled objects +performDelete=Delete pulled objects +pullStatus=Pull status lastExec=Last Execution nextExec=Next Execution detail=Detail http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel.html ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel.html index 5cd694b..20f7260 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel.html +++ b/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel.html @@ -37,7 +37,7 @@ under the License. <li><i class="fa fa-minus"></i><a href="#" wicket:id="delete"><wicket:message key="resource.menu.remove"/></a></li> <li><i class="fa fa-pencil"></i><a href="#" wicket:id="edit"><wicket:message key="resource.menu.edit"/></a></li> <li><i class="fa fa-arrow-right"></i><a href="#" wicket:id="propagation"><wicket:message key="task.propagation.list"/></a></li> - <li><i class="fa fa-chevron-circle-left"></i><a href="#" wicket:id="synchronization"><wicket:message key="task.synchronization.list"/></a></li> + <li><i class="fa fa-chevron-circle-left"></i><a href="#" wicket:id="pull"><wicket:message key="task.pull.list"/></a></li> <li><i class="fa fa-chevron-circle-right"></i><a href="#" wicket:id="push"><wicket:message key="task.push.list"/></a></li> </ul> </wicket:fragment> http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel.properties index 3dd4ed8..2db9d85 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel.properties +++ b/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel.properties @@ -28,5 +28,5 @@ resource.menu.edit=Edit resource task.generic.list=Generic tasks task.propagation.list=Propagation tasks -task.synchronization.list=Synchronization tasks +task.pull.list=Pull tasks task.push.list=Push tasks http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel_it.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel_it.properties index 6641a6f..82f95e8 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel_it.properties +++ b/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel_it.properties @@ -28,5 +28,5 @@ resource.menu.edit=Modifica risorsa task.generic.list=Task generici task.propagation.list=Task di propagazione -task.synchronization.list=Task di sincronizzazione +task.pull.list=Pull task task.push.list=Push task http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel_pt_BR.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel_pt_BR.properties index 06d3608..2c987e5 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel_pt_BR.properties +++ b/client/console/src/main/resources/org/apache/syncope/client/console/topology/TopologyTogglePanel_pt_BR.properties @@ -28,5 +28,5 @@ resource.menu.edit=Alterar recurso task.generic.list=Generic tasks task.propagation.list=Propagation tasks -task.synchronization.list=Synchronization tasks +task.pull.list=Pull tasks task.push.list=Push tasks http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MappingPurposePanel.html ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MappingPurposePanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MappingPurposePanel.html index f14e105..46be9d4 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MappingPurposePanel.html +++ b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/MappingPurposePanel.html @@ -21,7 +21,7 @@ under the License. <a href="#" wicket:id="propagationPurposeLink"><i class="fa fa-arrow-circle-o-right"></i></a> - <a href="#" wicket:id="synchronizationPurposeLink"><i class="fa fa-arrow-circle-o-left"></i></a> + <a href="#" wicket:id="pullPurposeLink"><i class="fa fa-arrow-circle-o-left"></i></a> <a href="#" wicket:id="bothPurposeLink"><i class="fa fa-exchange"></i></a> http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/client/console/src/main/resources/org/apache/syncope/client/console/widgets/CompletenessWidget.html ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/CompletenessWidget.html b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/CompletenessWidget.html index 2e48d08..f2ceabc 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/CompletenessWidget.html +++ b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/CompletenessWidget.html @@ -27,7 +27,7 @@ under the License. <i class="fa fa-wrench"></i> </button> <ul class="dropdown-menu" role="menu"> - <li><a href="#" wicket:id="topology"><wicket:message key="createResourceOrSyncTask"/></a></li> + <li><a href="#" wicket:id="topology"><wicket:message key="createResourceOrPullTask"/></a></li> <li><a href="#" wicket:id="policies"><wicket:message key="createPolicy"/></a></li> <li><a href="#" wicket:id="notifications"><wicket:message key="createNotification"/></a></li> <li><a href="#" wicket:id="types"><wicket:message key="createVirSchemaOrAnyType"/></a></li> http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/client/console/src/main/resources/org/apache/syncope/client/console/widgets/CompletenessWidget.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/CompletenessWidget.properties b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/CompletenessWidget.properties index e40cc59..1693f61 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/CompletenessWidget.properties +++ b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/CompletenessWidget.properties @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. configurationStatus=Configuration Status -createResourceOrSyncTask=Create Resource or SyncTask +createResourceOrPullTask=Create Resource or PullTask createPolicy=Create Policy createVirSchemaOrAnyType=Create Virtual Schema or AnyType createSecurityQuestion=Create Security Question http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/client/console/src/main/resources/org/apache/syncope/client/console/widgets/CompletenessWidget_it.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/CompletenessWidget_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/CompletenessWidget_it.properties index 641d93e..37252bf 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/CompletenessWidget_it.properties +++ b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/CompletenessWidget_it.properties @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. configurationStatus=Stato Configurazione -createResourceOrSyncTask=Crea Risorsa o SyncTask +createResourceOrPullTask=Crea Risorsa o PullTask createPolicy=Crea Politica createVirSchemaOrAnyType=Crea Virtual Schema o AnyType createSecurityQuestion=Crea Domanda di Sicurezza http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/client/console/src/main/resources/org/apache/syncope/client/console/widgets/CompletenessWidget_pt_BR.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/CompletenessWidget_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/CompletenessWidget_pt_BR.properties index d921be0..774a9d9 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/CompletenessWidget_pt_BR.properties +++ b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/CompletenessWidget_pt_BR.properties @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. configurationStatus=Estado de configura\u00e7\u00e3o -createResourceOrSyncTask=Criar recursos ou SyncTask +createResourceOrPullTask=Criar recursos ou PullTask createPolicy=Criar Politica createVirSchemaOrAnyType=Criar Virtual Schema ou AnyType createSecurityQuestion=Criar Perguntas de Seguran\u00e7a http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/common/lib/src/main/java/org/apache/syncope/common/lib/info/PlatformInfo.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/info/PlatformInfo.java b/common/lib/src/main/java/org/apache/syncope/common/lib/info/PlatformInfo.java index 790ec59..ec8d20f 100644 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/info/PlatformInfo.java +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/info/PlatformInfo.java @@ -77,11 +77,11 @@ public class PlatformInfo extends AbstractBaseBean { private final Set<String> propagationActions = new HashSet<>(); - private final Set<String> syncActions = new HashSet<>(); + private final Set<String> pullActions = new HashSet<>(); private final Set<String> pushActions = new HashSet<>(); - private final Set<String> syncCorrelationRules = new HashSet<>(); + private final Set<String> pullCorrelationRules = new HashSet<>(); private final Set<String> pushCorrelationRules = new HashSet<>(); @@ -211,11 +211,11 @@ public class PlatformInfo extends AbstractBaseBean { return propagationActions; } - @XmlElementWrapper(name = "syncActions") - @XmlElement(name = "syncAction") - @JsonProperty("syncActions") - public Set<String> getSyncActions() { - return syncActions; + @XmlElementWrapper(name = "pullActions") + @XmlElement(name = "pullAction") + @JsonProperty("pullActions") + public Set<String> getPullActions() { + return pullActions; } @XmlElementWrapper(name = "pushActions") @@ -225,11 +225,11 @@ public class PlatformInfo extends AbstractBaseBean { return pushActions; } - @XmlElementWrapper(name = "syncCorrelationRules") - @XmlElement(name = "syncCorrelationRule") - @JsonProperty("syncCorrelationRules") - public Set<String> getSyncCorrelationRules() { - return syncCorrelationRules; + @XmlElementWrapper(name = "pullCorrelationRules") + @XmlElement(name = "pullCorrelationRule") + @JsonProperty("pullCorrelationRules") + public Set<String> getPullCorrelationRules() { + return pullCorrelationRules; } @XmlElementWrapper(name = "pushCorrelationRules") http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/common/lib/src/main/java/org/apache/syncope/common/lib/policy/AbstractPolicyTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/policy/AbstractPolicyTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/policy/AbstractPolicyTO.java index 9157ba2..34f824f 100644 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/policy/AbstractPolicyTO.java +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/policy/AbstractPolicyTO.java @@ -33,7 +33,7 @@ import org.apache.syncope.common.lib.types.PolicyType; @XmlRootElement(name = "abstractPolicy") @XmlType -@XmlSeeAlso({ AccountPolicyTO.class, PasswordPolicyTO.class, SyncPolicyTO.class }) +@XmlSeeAlso({ AccountPolicyTO.class, PasswordPolicyTO.class, PullPolicyTO.class }) @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class") public abstract class AbstractPolicyTO extends AbstractBaseBean { http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/common/lib/src/main/java/org/apache/syncope/common/lib/policy/PolicyType.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/policy/PolicyType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/policy/PolicyType.java index 7f1c11e..ea429c2 100644 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/policy/PolicyType.java +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/policy/PolicyType.java @@ -32,9 +32,9 @@ public enum PolicyType { */ PASSWORD, /** - * For handling conflicts resolution during synchronization. + * For handling conflicts resolution during pull. */ - SYNC, + PULL, /** * For handling conflicts resolution during push. */ http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/common/lib/src/main/java/org/apache/syncope/common/lib/policy/PullPolicySpec.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/policy/PullPolicySpec.java b/common/lib/src/main/java/org/apache/syncope/common/lib/policy/PullPolicySpec.java new file mode 100644 index 0000000..a6b5338 --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/policy/PullPolicySpec.java @@ -0,0 +1,64 @@ +/* + * 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.policy; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.HashMap; +import java.util.Map; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import org.apache.syncope.common.lib.AbstractBaseBean; +import org.apache.syncope.common.lib.jaxb.XmlGenericMapAdapter; +import org.apache.syncope.common.lib.types.ConflictResolutionAction; + +@XmlType +public class PullPolicySpec extends AbstractBaseBean { + + private static final long serialVersionUID = -3144027171719498127L; + + private ConflictResolutionAction conflictResolutionAction; + + /** + * Associates anyTypeKey to either: + * <ol> + * <li>Java class name, implementing {@code PullCorrelationRule}</li> + * <li>JSON array containing plain schema names - this will be used to feed + * {@code PlainAttrsPullCorrelationRule}</li> + * </ol> + */ + @XmlJavaTypeAdapter(XmlGenericMapAdapter.class) + @JsonIgnore + private final Map<String, String> correlationRules = new HashMap<>(); + + public ConflictResolutionAction getConflictResolutionAction() { + return conflictResolutionAction == null + ? ConflictResolutionAction.IGNORE + : conflictResolutionAction; + } + + public void setConflictResolutionAction(final ConflictResolutionAction conflictResolutionAction) { + this.conflictResolutionAction = conflictResolutionAction; + } + + @JsonProperty + public Map<String, String> getCorrelationRules() { + return correlationRules; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/common/lib/src/main/java/org/apache/syncope/common/lib/policy/PullPolicyTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/policy/PullPolicyTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/policy/PullPolicyTO.java new file mode 100644 index 0000000..91c8e8b --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/policy/PullPolicyTO.java @@ -0,0 +1,45 @@ +/* + * 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.policy; + +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import org.apache.syncope.common.lib.types.PolicyType; + +@XmlRootElement(name = "pullPolicy") +@XmlType +public class PullPolicyTO extends AbstractPolicyTO { + + private static final long serialVersionUID = 993024634238024242L; + + private PullPolicySpec specification; + + public PullPolicyTO() { + super(PolicyType.PULL); + } + + public PullPolicySpec getSpecification() { + return specification; + } + + public void setSpecification(final PullPolicySpec specification) { + this.specification = specification; + } + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/common/lib/src/main/java/org/apache/syncope/common/lib/policy/SyncPolicySpec.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/policy/SyncPolicySpec.java b/common/lib/src/main/java/org/apache/syncope/common/lib/policy/SyncPolicySpec.java deleted file mode 100644 index 2a31d64..0000000 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/policy/SyncPolicySpec.java +++ /dev/null @@ -1,64 +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.policy; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.HashMap; -import java.util.Map; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.apache.syncope.common.lib.AbstractBaseBean; -import org.apache.syncope.common.lib.jaxb.XmlGenericMapAdapter; -import org.apache.syncope.common.lib.types.ConflictResolutionAction; - -@XmlType -public class SyncPolicySpec extends AbstractBaseBean { - - private static final long serialVersionUID = -3144027171719498127L; - - private ConflictResolutionAction conflictResolutionAction; - - /** - * Associates anyTypeKey to either: - * <ol> - * <li>Java class name, implementing {@code SyncCorrelationRule}</li> - * <li>JSON array containing plain schema names - this will be used to feed - * {@code PlainAttrsSyncCorrelationRule}</li> - * </ol> - */ - @XmlJavaTypeAdapter(XmlGenericMapAdapter.class) - @JsonIgnore - private final Map<String, String> correlationRules = new HashMap<>(); - - public ConflictResolutionAction getConflictResolutionAction() { - return conflictResolutionAction == null - ? ConflictResolutionAction.IGNORE - : conflictResolutionAction; - } - - public void setConflictResolutionAction(final ConflictResolutionAction conflictResolutionAction) { - this.conflictResolutionAction = conflictResolutionAction; - } - - @JsonProperty - public Map<String, String> getCorrelationRules() { - return correlationRules; - } -} http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/common/lib/src/main/java/org/apache/syncope/common/lib/policy/SyncPolicyTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/policy/SyncPolicyTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/policy/SyncPolicyTO.java deleted file mode 100644 index 911c445..0000000 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/policy/SyncPolicyTO.java +++ /dev/null @@ -1,45 +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.policy; - -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; -import org.apache.syncope.common.lib.types.PolicyType; - -@XmlRootElement(name = "syncPolicy") -@XmlType -public class SyncPolicyTO extends AbstractPolicyTO { - - private static final long serialVersionUID = 993024634238024242L; - - private SyncPolicySpec specification; - - public SyncPolicyTO() { - super(PolicyType.SYNC); - } - - public SyncPolicySpec getSpecification() { - return specification; - } - - public void setSpecification(final SyncPolicySpec specification) { - this.specification = specification; - } - -} http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractProvisioningTaskTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractProvisioningTaskTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractProvisioningTaskTO.java index cd63bcd..ae6094b 100644 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractProvisioningTaskTO.java +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AbstractProvisioningTaskTO.java @@ -31,7 +31,7 @@ import org.apache.syncope.common.lib.types.UnmatchingRule; @XmlRootElement(name = "abstractProvisioningTask") @XmlType -@XmlSeeAlso({ PushTaskTO.class, SyncTaskTO.class }) +@XmlSeeAlso({ PushTaskTO.class, PullTaskTO.class }) public class AbstractProvisioningTaskTO extends SchedTaskTO { private static final long serialVersionUID = -2143537546915809016L; @@ -84,11 +84,11 @@ public class AbstractProvisioningTaskTO extends SchedTaskTO { this.performDelete = performDelete; } - public boolean isSyncStatus() { + public boolean isPullStatus() { return syncStatus; } - public void setSyncStatus(final boolean syncStatus) { + public void setPullStatus(final boolean syncStatus) { this.syncStatus = syncStatus; } http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/common/lib/src/main/java/org/apache/syncope/common/lib/to/PullTaskTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/PullTaskTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PullTaskTO.java new file mode 100644 index 0000000..6063c4d --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/PullTaskTO.java @@ -0,0 +1,78 @@ +/* + * 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 com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.HashMap; +import java.util.Map; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import org.apache.syncope.common.lib.jaxb.XmlGenericMapAdapter; +import org.apache.syncope.common.lib.types.PullMode; + +@XmlRootElement(name = "pullTask") +@XmlType +@XmlAccessorType(XmlAccessType.FIELD) +public class PullTaskTO extends AbstractProvisioningTaskTO { + + private static final long serialVersionUID = -2143537546915809017L; + + private PullMode pullMode; + + private String reconciliationFilterBuilderClassName; + + private String destinationRealm; + + @XmlJavaTypeAdapter(XmlGenericMapAdapter.class) + @JsonIgnore + private final Map<String, AnyTO> templates = new HashMap<>(); + + public PullMode getPullMode() { + return pullMode; + } + + public void setPullMode(final PullMode pullMode) { + this.pullMode = pullMode; + } + + public String getReconciliationFilterBuilderClassName() { + return reconciliationFilterBuilderClassName; + } + + public void setReconciliationFilterBuilderClassName(final String reconciliationFilterBuilderClassName) { + this.reconciliationFilterBuilderClassName = reconciliationFilterBuilderClassName; + } + + public String getDestinationRealm() { + return destinationRealm; + } + + public void setDestinationRealm(final String destinationRealm) { + this.destinationRealm = destinationRealm; + } + + @JsonProperty + public Map<String, AnyTO> getTemplates() { + return templates; + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java index 5f75794..0f176c4 100644 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/ResourceTO.java @@ -68,13 +68,13 @@ public class ResourceTO extends AbstractAnnotatedBean implements EntityTO<String private TraceLevel deleteTraceLevel = TraceLevel.ALL; - private TraceLevel syncTraceLevel = TraceLevel.ALL; + private TraceLevel pullTraceLevel = TraceLevel.ALL; private Long passwordPolicy; private Long accountPolicy; - private Long syncPolicy; + private Long pullPolicy; private final Set<ConnConfProperty> confOverride = new HashSet<>(); @@ -175,12 +175,12 @@ public class ResourceTO extends AbstractAnnotatedBean implements EntityTO<String this.accountPolicy = accountPolicy; } - public Long getSyncPolicy() { - return syncPolicy; + public Long getPullPolicy() { + return pullPolicy; } - public void setSyncPolicy(final Long syncPolicy) { - this.syncPolicy = syncPolicy; + public void setPullPolicy(final Long pullPolicy) { + this.pullPolicy = pullPolicy; } @JsonIgnore @@ -223,12 +223,12 @@ public class ResourceTO extends AbstractAnnotatedBean implements EntityTO<String return capabilitiesOverride; } - public TraceLevel getSyncTraceLevel() { - return syncTraceLevel; + public TraceLevel getPullTraceLevel() { + return pullTraceLevel; } - public void setSyncTraceLevel(final TraceLevel syncTraceLevel) { - this.syncTraceLevel = syncTraceLevel; + public void setPullTraceLevel(final TraceLevel pullTraceLevel) { + this.pullTraceLevel = pullTraceLevel; } @XmlElementWrapper(name = "propagationActionsClassNames") http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncTaskTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncTaskTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncTaskTO.java deleted file mode 100644 index 312f654..0000000 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/SyncTaskTO.java +++ /dev/null @@ -1,78 +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 com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.HashMap; -import java.util.Map; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.apache.syncope.common.lib.jaxb.XmlGenericMapAdapter; -import org.apache.syncope.common.lib.types.SyncMode; - -@XmlRootElement(name = "syncTask") -@XmlType -@XmlAccessorType(XmlAccessType.FIELD) -public class SyncTaskTO extends AbstractProvisioningTaskTO { - - private static final long serialVersionUID = -2143537546915809017L; - - private SyncMode syncMode; - - private String reconciliationFilterBuilderClassName; - - private String destinationRealm; - - @XmlJavaTypeAdapter(XmlGenericMapAdapter.class) - @JsonIgnore - private final Map<String, AnyTO> templates = new HashMap<>(); - - public SyncMode getSyncMode() { - return syncMode; - } - - public void setSyncMode(final SyncMode syncMode) { - this.syncMode = syncMode; - } - - public String getReconciliationFilterBuilderClassName() { - return reconciliationFilterBuilderClassName; - } - - public void setReconciliationFilterBuilderClassName(final String reconciliationFilterBuilderClassName) { - this.reconciliationFilterBuilderClassName = reconciliationFilterBuilderClassName; - } - - public String getDestinationRealm() { - return destinationRealm; - } - - public void setDestinationRealm(final String destinationRealm) { - this.destinationRealm = destinationRealm; - } - - @JsonProperty - public Map<String, AnyTO> getTemplates() { - return templates; - } -} http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditElements.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditElements.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditElements.java index c3d4af5..bf45a42 100644 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditElements.java +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditElements.java @@ -36,7 +36,7 @@ public final class AuditElements implements Serializable { REST(StringUtils.EMPTY), TASK(StringUtils.EMPTY), PROPAGATION("PropagationTask"), - SYNCHRONIZATION("SyncTask"), + PULL("PullTask"), PUSH("PushTask"), CUSTOM(StringUtils.EMPTY); http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditLoggerName.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditLoggerName.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditLoggerName.java index fe9770a..5e89dcf 100644 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditLoggerName.java +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/AuditLoggerName.java @@ -127,8 +127,8 @@ public class AuditLoggerName extends AbstractBaseBean { if (EventCategoryType.PROPAGATION.toString().equals(elements[0])) { type = EventCategoryType.PROPAGATION; - } else if (EventCategoryType.SYNCHRONIZATION.toString().equals(elements[0])) { - type = EventCategoryType.SYNCHRONIZATION; + } else if (EventCategoryType.PULL.toString().equals(elements[0])) { + type = EventCategoryType.PULL; } else if (EventCategoryType.PUSH.toString().equals(elements[0])) { type = EventCategoryType.PUSH; } else { http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/common/lib/src/main/java/org/apache/syncope/common/lib/types/ClientExceptionType.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/ClientExceptionType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ClientExceptionType.java index 0fc8a7f..bceff27 100644 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/types/ClientExceptionType.java +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/ClientExceptionType.java @@ -61,7 +61,7 @@ public enum ClientExceptionType { InvalidNotification(Response.Status.BAD_REQUEST), InvalidPropagationTask(Response.Status.BAD_REQUEST), InvalidSchedTask(Response.Status.BAD_REQUEST), - InvalidSyncTask(Response.Status.BAD_REQUEST), + InvalidPullTask(Response.Status.BAD_REQUEST), InvalidValues(Response.Status.BAD_REQUEST), NotFound(Response.Status.NOT_FOUND), RejectedUserCreate(Response.Status.BAD_REQUEST), http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/common/lib/src/main/java/org/apache/syncope/common/lib/types/EntityViolationType.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/EntityViolationType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/EntityViolationType.java index 4b7cc38..7532730 100644 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/types/EntityViolationType.java +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/EntityViolationType.java @@ -42,7 +42,7 @@ public enum EntityViolationType { InvalidSchemaEnum("org.apache.syncope.core.persistence.validation.schema.enum"), InvalidSchemaMultivalueUnique("org.apache.syncope.core.persistence.validation.schema.multivalueUnique"), InvalidSchedTask("org.apache.syncope.core.persistence.validation.schedtask"), - InvalidProvisioningTask("org.apache.syncope.core.persistence.validation.synctask"), + InvalidProvisioningTask("org.apache.syncope.core.persistence.validation.provisioningtask"), InvalidPlainSchema("org.apache.syncope.core.persistence.validation.attrvalue.plainSchema"), InvalidDerSchema("org.apache.syncope.core.persistence.validation.attrvalue.derSchema"), InvalidVirSchema("org.apache.syncope.core.persistence.validation.attrvalue.virSchema"), http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/common/lib/src/main/java/org/apache/syncope/common/lib/types/MappingPurpose.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/MappingPurpose.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/MappingPurpose.java index dc8c23e..59ee9b3 100644 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/types/MappingPurpose.java +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/MappingPurpose.java @@ -21,7 +21,7 @@ package org.apache.syncope.common.lib.types; public enum MappingPurpose { BOTH, - SYNCHRONIZATION, + PULL, PROPAGATION, NONE http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/common/lib/src/main/java/org/apache/syncope/common/lib/types/PullMode.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/PullMode.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/PullMode.java new file mode 100644 index 0000000..522c30d --- /dev/null +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/PullMode.java @@ -0,0 +1,29 @@ +/* + * 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.types; + +import javax.xml.bind.annotation.XmlEnum; + +@XmlEnum +public enum PullMode { + FULL_RECONCILIATION, + FILTERED_RECONCILIATION, + INCREMENTAL; + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/common/lib/src/main/java/org/apache/syncope/common/lib/types/SyncMode.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/SyncMode.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/SyncMode.java deleted file mode 100644 index afa9f19..0000000 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/types/SyncMode.java +++ /dev/null @@ -1,29 +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.types; - -import javax.xml.bind.annotation.XmlEnum; - -@XmlEnum -public enum SyncMode { - FULL_RECONCILIATION, - FILTERED_RECONCILIATION, - INCREMENTAL; - -} http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/common/lib/src/main/java/org/apache/syncope/common/lib/types/TaskType.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/TaskType.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/TaskType.java index d17ecc7..fcebb1c 100644 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/types/TaskType.java +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/TaskType.java @@ -26,7 +26,7 @@ public enum TaskType { PROPAGATION, NOTIFICATION, SCHEDULED, - SYNCHRONIZATION, + PULL, PUSH; } http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/logic/src/main/java/org/apache/syncope/core/logic/LoggerLogic.java ---------------------------------------------------------------------- diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/LoggerLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/LoggerLogic.java index adb33d0..4ecd0a1 100644 --- a/core/logic/src/main/java/org/apache/syncope/core/logic/LoggerLogic.java +++ b/core/logic/src/main/java/org/apache/syncope/core/logic/LoggerLogic.java @@ -57,8 +57,8 @@ import org.apache.syncope.core.persistence.api.entity.resource.ExternalResource; import org.apache.syncope.core.persistence.api.entity.Logger; import org.apache.syncope.core.persistence.api.entity.task.SchedTask; import org.apache.syncope.core.spring.BeanUtils; -import org.apache.syncope.core.provisioning.java.syncpull.PushJobDelegate; -import org.apache.syncope.core.provisioning.java.syncpull.SyncJobDelegate; +import org.apache.syncope.core.provisioning.java.pushpull.PushJobDelegate; +import org.apache.syncope.core.provisioning.java.pushpull.PullJobDelegate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.io.Resource; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; @@ -294,13 +294,13 @@ public class LoggerLogic extends AbstractTransactionalLogic<LoggerTO> { events.add(authenticationControllerEvents); events.add(new EventCategoryTO(EventCategoryType.PROPAGATION)); - events.add(new EventCategoryTO(EventCategoryType.SYNCHRONIZATION)); + events.add(new EventCategoryTO(EventCategoryType.PULL)); events.add(new EventCategoryTO(EventCategoryType.PUSH)); for (AnyTypeKind anyTypeKind : AnyTypeKind.values()) { for (ExternalResource resource : resourceDAO.findAll()) { EventCategoryTO propEventCategoryTO = new EventCategoryTO(EventCategoryType.PROPAGATION); - EventCategoryTO syncEventCategoryTO = new EventCategoryTO(EventCategoryType.SYNCHRONIZATION); + EventCategoryTO syncEventCategoryTO = new EventCategoryTO(EventCategoryType.PULL); EventCategoryTO pushEventCategoryTO = new EventCategoryTO(EventCategoryType.PUSH); propEventCategoryTO.setCategory(anyTypeKind.name().toLowerCase()); @@ -342,7 +342,7 @@ public class LoggerLogic extends AbstractTransactionalLogic<LoggerTO> { } EventCategoryTO eventCategoryTO = new EventCategoryTO(EventCategoryType.TASK); - eventCategoryTO.setCategory(SyncJobDelegate.class.getSimpleName()); + eventCategoryTO.setCategory(PullJobDelegate.class.getSimpleName()); events.add(eventCategoryTO); eventCategoryTO = new EventCategoryTO(EventCategoryType.TASK); http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/logic/src/main/java/org/apache/syncope/core/logic/PolicyLogic.java ---------------------------------------------------------------------- diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/PolicyLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/PolicyLogic.java index 8f8baa5..76c0d66 100644 --- a/core/logic/src/main/java/org/apache/syncope/core/logic/PolicyLogic.java +++ b/core/logic/src/main/java/org/apache/syncope/core/logic/PolicyLogic.java @@ -27,7 +27,7 @@ import org.apache.commons.lang3.ArrayUtils; import org.apache.syncope.common.lib.policy.AbstractPolicyTO; import org.apache.syncope.common.lib.policy.AccountPolicyTO; import org.apache.syncope.common.lib.policy.PasswordPolicyTO; -import org.apache.syncope.common.lib.policy.SyncPolicyTO; +import org.apache.syncope.common.lib.policy.PullPolicyTO; import org.apache.syncope.common.lib.types.PolicyType; import org.apache.syncope.common.lib.types.StandardEntitlement; import org.apache.syncope.core.persistence.api.dao.NotFoundException; @@ -35,11 +35,11 @@ import org.apache.syncope.core.persistence.api.dao.PolicyDAO; import org.apache.syncope.core.persistence.api.entity.policy.AccountPolicy; import org.apache.syncope.core.persistence.api.entity.policy.PasswordPolicy; import org.apache.syncope.core.persistence.api.entity.Policy; -import org.apache.syncope.core.persistence.api.entity.policy.SyncPolicy; import org.apache.syncope.core.provisioning.api.data.PolicyDataBinder; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.stereotype.Component; +import org.apache.syncope.core.persistence.api.entity.policy.PullPolicy; @Component public class PolicyLogic extends AbstractTransactionalLogic<AbstractPolicyTO> { @@ -82,10 +82,10 @@ public class PolicyLogic extends AbstractTransactionalLogic<AbstractPolicyTO> { } @PreAuthorize("hasRole('" + StandardEntitlement.POLICY_UPDATE + "')") - public SyncPolicyTO update(final SyncPolicyTO policyTO) { + public PullPolicyTO update(final PullPolicyTO policyTO) { Policy policy = policyDAO.find(policyTO.getKey()); - if (!(policy instanceof SyncPolicy)) { - throw new NotFoundException("SyncPolicy with key " + policyTO.getKey()); + if (!(policy instanceof PullPolicy)) { + throw new NotFoundException(PullPolicy.class.getSimpleName() + " with key " + policyTO.getKey()); } return update(policyTO, policy); http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/logic/src/main/java/org/apache/syncope/core/logic/SyncopeLogic.java ---------------------------------------------------------------------- diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/SyncopeLogic.java b/core/logic/src/main/java/org/apache/syncope/core/logic/SyncopeLogic.java index 5f2e632..af8d1e1 100644 --- a/core/logic/src/main/java/org/apache/syncope/core/logic/SyncopeLogic.java +++ b/core/logic/src/main/java/org/apache/syncope/core/logic/SyncopeLogic.java @@ -185,9 +185,9 @@ public class SyncopeLogic extends AbstractLogic<AbstractBaseBean> { addAll(implLookup.getClassNames(Type.RECONCILIATION_FILTER_BUILDER)); PLATFORM_INFO.getLogicActions().addAll(implLookup.getClassNames(Type.LOGIC_ACTIONS)); PLATFORM_INFO.getPropagationActions().addAll(implLookup.getClassNames(Type.PROPAGATION_ACTIONS)); - PLATFORM_INFO.getSyncActions().addAll(implLookup.getClassNames(Type.SYNC_ACTIONS)); + PLATFORM_INFO.getPullActions().addAll(implLookup.getClassNames(Type.SYNC_ACTIONS)); PLATFORM_INFO.getPushActions().addAll(implLookup.getClassNames(Type.PUSH_ACTIONS)); - PLATFORM_INFO.getSyncCorrelationRules().addAll(implLookup.getClassNames(Type.SYNC_CORRELATION_RULE)); + PLATFORM_INFO.getPullCorrelationRules().addAll(implLookup.getClassNames(Type.PULL_CORRELATION_RULE)); PLATFORM_INFO.getValidators().addAll(implLookup.getClassNames(Type.VALIDATOR)); PLATFORM_INFO.getNotificationRecipientsProviders(). addAll(implLookup.getClassNames(Type.NOTIFICATION_RECIPIENTS_PROVIDER)); @@ -285,7 +285,7 @@ public class SyncopeLogic extends AbstractLogic<AbstractBaseBean> { numbersInfo.getConfCompleteness().put( NumbersInfo.ConfItem.NOTIFICATION, !notificationDAO.findAll().isEmpty()); numbersInfo.getConfCompleteness().put( - NumbersInfo.ConfItem.SYNC_TASK, !taskDAO.findAll(TaskType.SYNCHRONIZATION).isEmpty()); + NumbersInfo.ConfItem.SYNC_TASK, !taskDAO.findAll(TaskType.PULL).isEmpty()); numbersInfo.getConfCompleteness().put( NumbersInfo.ConfItem.VIR_SCHEMA, !virSchemaDAO.findAll().isEmpty()); numbersInfo.getConfCompleteness().put( http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/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 0bb270d..a9ec0a5 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 @@ -197,7 +197,7 @@ public class TaskLogic extends AbstractJobLogic<AbstractTaskTO> { break; case SCHEDULED: - case SYNCHRONIZATION: + case PULL: case PUSH: if (!((SchedTask) task).isActive()) { SyncopeClientException sce = SyncopeClientException.build(ClientExceptionType.Scheduling); @@ -252,7 +252,7 @@ public class TaskLogic extends AbstractJobLogic<AbstractTaskTO> { T taskToDelete = binder.getTaskTO(task, taskUtils, true); if (TaskType.SCHEDULED == taskUtils.getType() - || TaskType.SYNCHRONIZATION == taskUtils.getType() + || TaskType.PULL == taskUtils.getType() || TaskType.PUSH == taskUtils.getType()) { jobManager.unregister(task); http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/logic/src/main/java/org/apache/syncope/core/logic/init/ClassPathScanImplementationLookup.java ---------------------------------------------------------------------- diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/init/ClassPathScanImplementationLookup.java b/core/logic/src/main/java/org/apache/syncope/core/logic/init/ClassPathScanImplementationLookup.java index 200fd13..7dbf516 100644 --- a/core/logic/src/main/java/org/apache/syncope/core/logic/init/ClassPathScanImplementationLookup.java +++ b/core/logic/src/main/java/org/apache/syncope/core/logic/init/ClassPathScanImplementationLookup.java @@ -42,11 +42,9 @@ import org.apache.syncope.core.provisioning.api.data.MappingItemTransformer; import org.apache.syncope.core.provisioning.api.job.SchedTaskJobDelegate; import org.apache.syncope.core.provisioning.api.notification.NotificationRecipientsProvider; import org.apache.syncope.core.provisioning.api.propagation.PropagationActions; -import org.apache.syncope.core.provisioning.api.syncpull.PushActions; -import org.apache.syncope.core.provisioning.api.syncpull.SyncActions; -import org.apache.syncope.core.provisioning.api.syncpull.SyncCorrelationRule; -import org.apache.syncope.core.provisioning.java.syncpull.PushJobDelegate; -import org.apache.syncope.core.provisioning.java.syncpull.SyncJobDelegate; +import org.apache.syncope.core.provisioning.api.pushpull.PushActions; +import org.apache.syncope.core.provisioning.java.pushpull.PushJobDelegate; +import org.apache.syncope.core.provisioning.java.pushpull.PullJobDelegate; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.config.BeanDefinition; @@ -54,7 +52,9 @@ import org.springframework.context.annotation.ClassPathScanningCandidateComponen import org.springframework.core.type.filter.AssignableTypeFilter; import org.springframework.stereotype.Component; import org.springframework.util.ClassUtils; -import org.apache.syncope.core.provisioning.api.syncpull.ReconciliationFilterBuilder; +import org.apache.syncope.core.provisioning.api.pushpull.ReconciliationFilterBuilder; +import org.apache.syncope.core.provisioning.api.pushpull.PullCorrelationRule; +import org.apache.syncope.core.provisioning.api.pushpull.PullActions; /** * Cache class names for all implementations of Syncope interfaces found in classpath, for later usage. @@ -98,9 +98,9 @@ public class ClassPathScanImplementationLookup implements ImplementationLookup { scanner.addIncludeFilter(new AssignableTypeFilter(ReconciliationFilterBuilder.class)); scanner.addIncludeFilter(new AssignableTypeFilter(LogicActions.class)); scanner.addIncludeFilter(new AssignableTypeFilter(PropagationActions.class)); - scanner.addIncludeFilter(new AssignableTypeFilter(SyncActions.class)); + scanner.addIncludeFilter(new AssignableTypeFilter(PullActions.class)); scanner.addIncludeFilter(new AssignableTypeFilter(PushActions.class)); - scanner.addIncludeFilter(new AssignableTypeFilter(SyncCorrelationRule.class)); + scanner.addIncludeFilter(new AssignableTypeFilter(PullCorrelationRule.class)); scanner.addIncludeFilter(new AssignableTypeFilter(Validator.class)); scanner.addIncludeFilter(new AssignableTypeFilter(NotificationRecipientsProvider.class)); @@ -140,7 +140,7 @@ public class ClassPathScanImplementationLookup implements ImplementationLookup { } if (SchedTaskJobDelegate.class.isAssignableFrom(clazz) && !isAbsractClazz - && !SyncJobDelegate.class.isAssignableFrom(clazz) + && !PullJobDelegate.class.isAssignableFrom(clazz) && !PushJobDelegate.class.isAssignableFrom(clazz)) { classNames.get(Type.TASKJOBDELEGATE).add(bd.getBeanClassName()); @@ -158,7 +158,7 @@ public class ClassPathScanImplementationLookup implements ImplementationLookup { classNames.get(Type.PROPAGATION_ACTIONS).add(bd.getBeanClassName()); } - if (SyncActions.class.isAssignableFrom(clazz) && !isAbsractClazz) { + if (PullActions.class.isAssignableFrom(clazz) && !isAbsractClazz) { classNames.get(Type.SYNC_ACTIONS).add(bd.getBeanClassName()); } @@ -166,8 +166,8 @@ public class ClassPathScanImplementationLookup implements ImplementationLookup { classNames.get(Type.PUSH_ACTIONS).add(bd.getBeanClassName()); } - if (SyncCorrelationRule.class.isAssignableFrom(clazz) && !isAbsractClazz) { - classNames.get(Type.SYNC_CORRELATION_RULE).add(bd.getBeanClassName()); + if (PullCorrelationRule.class.isAssignableFrom(clazz) && !isAbsractClazz) { + classNames.get(Type.PULL_CORRELATION_RULE).add(bd.getBeanClassName()); } if (Validator.class.isAssignableFrom(clazz) && !isAbsractClazz) { http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/logic/src/main/java/org/apache/syncope/core/logic/init/JobManagerImpl.java ---------------------------------------------------------------------- diff --git a/core/logic/src/main/java/org/apache/syncope/core/logic/init/JobManagerImpl.java b/core/logic/src/main/java/org/apache/syncope/core/logic/init/JobManagerImpl.java index 2fa7b32..dec65f5 100644 --- a/core/logic/src/main/java/org/apache/syncope/core/logic/init/JobManagerImpl.java +++ b/core/logic/src/main/java/org/apache/syncope/core/logic/init/JobManagerImpl.java @@ -42,7 +42,6 @@ import org.apache.syncope.core.persistence.api.entity.Report; import org.apache.syncope.core.persistence.api.entity.conf.CPlainAttr; import org.apache.syncope.core.persistence.api.entity.task.PushTask; import org.apache.syncope.core.persistence.api.entity.task.SchedTask; -import org.apache.syncope.core.persistence.api.entity.task.SyncTask; import org.apache.syncope.core.persistence.api.entity.task.Task; import org.apache.syncope.core.provisioning.api.job.JobNamer; import org.apache.syncope.core.logic.notification.NotificationJob; @@ -52,8 +51,8 @@ import org.apache.syncope.core.spring.ApplicationContextProvider; import org.apache.syncope.core.persistence.api.SyncopeLoader; import org.apache.syncope.core.persistence.api.DomainsHolder; import org.apache.syncope.core.provisioning.java.job.TaskJob; -import org.apache.syncope.core.provisioning.java.syncpull.PushJobDelegate; -import org.apache.syncope.core.provisioning.java.syncpull.SyncJobDelegate; +import org.apache.syncope.core.provisioning.java.pushpull.PushJobDelegate; +import org.apache.syncope.core.provisioning.java.pushpull.PullJobDelegate; import org.quartz.CronScheduleBuilder; import org.quartz.Job; import org.quartz.JobBuilder; @@ -76,6 +75,7 @@ import org.apache.syncope.core.provisioning.api.job.JobManager; import org.identityconnectors.common.IOUtil; import org.quartz.impl.jdbcjobstore.Constants; import org.springframework.jdbc.datasource.DataSourceUtils; +import org.apache.syncope.core.persistence.api.entity.task.PullTask; @Component public class JobManagerImpl implements JobManager, SyncopeLoader { @@ -229,8 +229,8 @@ public class JobManagerImpl implements JobManager, SyncopeLoader { TaskJob job = createSpringBean(TaskJob.class); job.setTaskKey(task.getKey()); - String jobDelegateClassName = task instanceof SyncTask - ? SyncJobDelegate.class.getName() + String jobDelegateClassName = task instanceof PullTask + ? PullJobDelegate.class.getName() : task instanceof PushTask ? PushJobDelegate.class.getName() : task.getJobDelegateClassName(); @@ -321,7 +321,7 @@ public class JobManagerImpl implements JobManager, SyncopeLoader { public Void exec() { // 1. jobs for SchedTasks Set<SchedTask> tasks = new HashSet<>(taskDAO.<SchedTask>findAll(TaskType.SCHEDULED)); - tasks.addAll(taskDAO.<SyncTask>findAll(TaskType.SYNCHRONIZATION)); + tasks.addAll(taskDAO.<PullTask>findAll(TaskType.PULL)); tasks.addAll(taskDAO.<PushTask>findAll(TaskType.PUSH)); for (SchedTask task : tasks) { try { http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/ImplementationLookup.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/ImplementationLookup.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/ImplementationLookup.java index ff7284a..6a88085 100644 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/ImplementationLookup.java +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/ImplementationLookup.java @@ -40,7 +40,7 @@ public interface ImplementationLookup extends SyncopeLoader { PROPAGATION_ACTIONS, SYNC_ACTIONS, PUSH_ACTIONS, - SYNC_CORRELATION_RULE, + PULL_CORRELATION_RULE, VALIDATOR, NOTIFICATION_RECIPIENTS_PROVIDER; http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/LinkingMappingItem.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/LinkingMappingItem.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/LinkingMappingItem.java index 46fcedc..781b77a 100644 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/LinkingMappingItem.java +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/LinkingMappingItem.java @@ -105,7 +105,7 @@ public class LinkingMappingItem implements MappingItem { @Override public MappingPurpose getPurpose() { - return virSchema.isReadonly() ? MappingPurpose.SYNCHRONIZATION : MappingPurpose.BOTH; + return virSchema.isReadonly() ? MappingPurpose.PULL : MappingPurpose.BOTH; } @Override http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/policy/PullPolicy.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/policy/PullPolicy.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/policy/PullPolicy.java new file mode 100644 index 0000000..da82cb7 --- /dev/null +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/policy/PullPolicy.java @@ -0,0 +1,30 @@ +/* + * 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.persistence.api.entity.policy; + +import org.apache.syncope.common.lib.policy.PullPolicySpec; +import org.apache.syncope.core.persistence.api.entity.Policy; + +public interface PullPolicy extends Policy { + + PullPolicySpec getSpecification(); + + void setSpecification(PullPolicySpec spec); + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/policy/SyncPolicy.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/policy/SyncPolicy.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/policy/SyncPolicy.java deleted file mode 100644 index 78a9882..0000000 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/policy/SyncPolicy.java +++ /dev/null @@ -1,30 +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.core.persistence.api.entity.policy; - -import org.apache.syncope.common.lib.policy.SyncPolicySpec; -import org.apache.syncope.core.persistence.api.entity.Policy; - -public interface SyncPolicy extends Policy { - - SyncPolicySpec getSpecification(); - - void setSpecification(SyncPolicySpec spec); - -} http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/resource/ExternalResource.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/resource/ExternalResource.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/resource/ExternalResource.java index 32759cd..7b5147e 100644 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/resource/ExternalResource.java +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/resource/ExternalResource.java @@ -28,7 +28,7 @@ import org.apache.syncope.core.persistence.api.entity.AnnotatedEntity; import org.apache.syncope.core.persistence.api.entity.AnyType; import org.apache.syncope.core.persistence.api.entity.ConnInstance; import org.apache.syncope.core.persistence.api.entity.policy.PasswordPolicy; -import org.apache.syncope.core.persistence.api.entity.policy.SyncPolicy; +import org.apache.syncope.core.persistence.api.entity.policy.PullPolicy; import org.identityconnectors.framework.common.objects.ObjectClass; public interface ExternalResource extends AnnotatedEntity<String> { @@ -57,9 +57,9 @@ public interface ExternalResource extends AnnotatedEntity<String> { void setPasswordPolicy(PasswordPolicy passwordPolicy); - SyncPolicy getSyncPolicy(); + PullPolicy getPullPolicy(); - void setSyncPolicy(SyncPolicy syncPolicy); + void setPullPolicy(PullPolicy pullPolicy); TraceLevel getCreateTraceLevel(); @@ -73,9 +73,9 @@ public interface ExternalResource extends AnnotatedEntity<String> { void setDeleteTraceLevel(TraceLevel deleteTraceLevel); - TraceLevel getSyncTraceLevel(); + TraceLevel getPullTraceLevel(); - void setSyncTraceLevel(TraceLevel syncTraceLevel); + void setPullTraceLevel(TraceLevel pullTraceLevel); List<String> getPropagationActionsClassNames(); http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/AnyTemplatePullTask.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/AnyTemplatePullTask.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/AnyTemplatePullTask.java new file mode 100644 index 0000000..10eafe5 --- /dev/null +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/AnyTemplatePullTask.java @@ -0,0 +1,28 @@ +/* + * 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.persistence.api.entity.task; + +import org.apache.syncope.core.persistence.api.entity.AnyTemplate; + +public interface AnyTemplatePullTask extends AnyTemplate { + + PullTask getPullTask(); + + void setPullTask(PullTask pullTask); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/AnyTemplateSyncTask.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/AnyTemplateSyncTask.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/AnyTemplateSyncTask.java deleted file mode 100644 index 82d7e2e..0000000 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/AnyTemplateSyncTask.java +++ /dev/null @@ -1,28 +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.core.persistence.api.entity.task; - -import org.apache.syncope.core.persistence.api.entity.AnyTemplate; - -public interface AnyTemplateSyncTask extends AnyTemplate { - - SyncTask getSyncTask(); - - void setSyncTask(SyncTask syncTask); -} http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/ProvisioningTask.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/ProvisioningTask.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/ProvisioningTask.java index 296de84..ac2d2f7 100644 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/ProvisioningTask.java +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/ProvisioningTask.java @@ -51,8 +51,8 @@ public interface ProvisioningTask extends SchedTask { void setPerformUpdate(boolean performUpdate); - boolean isSyncStatus(); + boolean isPullStatus(); - void setSyncStatus(boolean syncStatus); + void setPullStatus(boolean pullStatus); } http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/PullTask.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/PullTask.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/PullTask.java new file mode 100644 index 0000000..52c5b93 --- /dev/null +++ b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/PullTask.java @@ -0,0 +1,45 @@ +/* + * 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.persistence.api.entity.task; + +import java.util.List; +import org.apache.syncope.common.lib.types.PullMode; +import org.apache.syncope.core.persistence.api.entity.AnyType; +import org.apache.syncope.core.persistence.api.entity.Realm; + +public interface PullTask extends ProvisioningTask { + + PullMode getPullMode(); + + void setPullMode(PullMode pullMode); + + String getReconciliationFilterBuilderClassName(); + + void setReconciliationFilterBuilderClassName(String reconciliationFilterBuilderClassName); + + Realm getDestinatioRealm(); + + void setDestinationRealm(Realm destinationRealm); + + boolean add(AnyTemplatePullTask template); + + AnyTemplatePullTask getTemplate(AnyType anyType); + + List<? extends AnyTemplatePullTask> getTemplates(); +} http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/SyncTask.java ---------------------------------------------------------------------- diff --git a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/SyncTask.java b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/SyncTask.java deleted file mode 100644 index 127b1cf..0000000 --- a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/task/SyncTask.java +++ /dev/null @@ -1,45 +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.core.persistence.api.entity.task; - -import java.util.List; -import org.apache.syncope.common.lib.types.SyncMode; -import org.apache.syncope.core.persistence.api.entity.AnyType; -import org.apache.syncope.core.persistence.api.entity.Realm; - -public interface SyncTask extends ProvisioningTask { - - SyncMode getSyncMode(); - - void setSyncMode(SyncMode syncMode); - - String getReconciliationFilterBuilderClassName(); - - void setReconciliationFilterBuilderClassName(String reconciliationFilterBuilderClassName); - - Realm getDestinatioRealm(); - - void setDestinationRealm(Realm destinationRealm); - - boolean add(AnyTemplateSyncTask template); - - AnyTemplateSyncTask getTemplate(AnyType anyType); - - List<? extends AnyTemplateSyncTask> getTemplates(); -} http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAExternalResourceDAO.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAExternalResourceDAO.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAExternalResourceDAO.java index 392f357..44c6e08 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAExternalResourceDAO.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAExternalResourceDAO.java @@ -106,8 +106,8 @@ public class JPAExternalResourceDAO extends AbstractDAO<ExternalResource, String query.append("passwordPolicy"); break; - case SYNC: - query.append("syncPolicy"); + case PULL: + query.append("pullPolicy"); break; default: @@ -198,7 +198,7 @@ public class JPAExternalResourceDAO extends AbstractDAO<ExternalResource, String } taskDAO.deleteAll(resource, TaskType.PROPAGATION); - taskDAO.deleteAll(resource, TaskType.SYNCHRONIZATION); + taskDAO.deleteAll(resource, TaskType.PULL); taskDAO.deleteAll(resource, TaskType.PUSH); for (AnyObject anyObject : anyObjectDAO.findByResource(resource)) { http://git-wip-us.apache.org/repos/asf/syncope/blob/61a7fdd3/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPARealmDAO.java ---------------------------------------------------------------------- diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPARealmDAO.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPARealmDAO.java index ecd5050..5100de8 100644 --- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPARealmDAO.java +++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPARealmDAO.java @@ -117,7 +117,7 @@ public class JPARealmDAO extends AbstractDAO<Realm, Long> implements RealmDAO { @Override public <T extends Policy> List<Realm> findByPolicy(final T policy) { - if (policy.getType() == PolicyType.SYNC) { + if (policy.getType() == PolicyType.PULL) { return Collections.<Realm>emptyList(); }
