View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.syncope.core.provisioning.api.pushpull;
20  
21  import java.util.ArrayList;
22  import java.util.List;
23  import java.util.concurrent.CopyOnWriteArrayList;
24  import org.apache.syncope.common.lib.to.ProvisioningReport;
25  import org.apache.syncope.common.lib.types.ConflictResolutionAction;
26  import org.apache.syncope.core.persistence.api.entity.task.ProvisioningTask;
27  import org.apache.syncope.core.provisioning.api.Connector;
28  
29  public class ProvisioningProfile<T extends ProvisioningTask<?>, A extends ProvisioningActions> {
30  
31      private final Connector connector;
32  
33      private final T task;
34  
35      private final List<ProvisioningReport> results = new CopyOnWriteArrayList<>();
36  
37      private boolean dryRun;
38  
39      private ConflictResolutionAction conflictResolutionAction;
40  
41      private String executor;
42  
43      private final List<A> actions = new ArrayList<>();
44  
45      public ProvisioningProfile(final Connector connector, final T task) {
46          this.connector = connector;
47          this.task = task;
48      }
49  
50      public Connector getConnector() {
51          return connector;
52      }
53  
54      public T getTask() {
55          return task;
56      }
57  
58      public List<ProvisioningReport> getResults() {
59          return results;
60      }
61  
62      public boolean isDryRun() {
63          return dryRun;
64      }
65  
66      public void setDryRun(final boolean dryRun) {
67          this.dryRun = dryRun;
68      }
69  
70      public ConflictResolutionAction getConflictResolutionAction() {
71          return conflictResolutionAction;
72      }
73  
74      public void setConflictResolutionAction(final ConflictResolutionAction conflictResolutionAction) {
75          this.conflictResolutionAction = conflictResolutionAction;
76      }
77  
78      public String getExecutor() {
79          return executor;
80      }
81  
82      public void setExecutor(final String executor) {
83          this.executor = executor;
84      }
85  
86      public List<A> getActions() {
87          return actions;
88      }
89  }