syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [2/3] syncope git commit: Easier override for ActivitiUserWorkflowAdapter
Date Tue, 07 Jul 2015 09:19:21 GMT
Easier override for ActivitiUserWorkflowAdapter


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/33d8fabf
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/33d8fabf
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/33d8fabf

Branch: refs/heads/master
Commit: 33d8fabfb8b453bd2fcded15945ffb56a490feb7
Parents: 2612337
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Tue Jul 7 11:16:18 2015 +0200
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Tue Jul 7 11:16:18 2015 +0200

----------------------------------------------------------------------
 .../activiti/ActivitiUserWorkflowAdapter.java   | 48 ++++++++++----------
 1 file changed, 24 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/33d8fabf/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java
b/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java
index 2873c67..f974267 100644
--- a/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java
+++ b/core/src/main/java/org/apache/syncope/core/workflow/user/activiti/ActivitiUserWorkflowAdapter.java
@@ -92,9 +92,9 @@ public class ActivitiUserWorkflowAdapter extends AbstractUserWorkflowAdapter
{
     /**
      * Logger.
      */
-    private static final Logger LOG = LoggerFactory.getLogger(ActivitiUserWorkflowAdapter.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(ActivitiUserWorkflowAdapter.class);
 
-    private static final String[] PROPERTY_IGNORE_PROPS = { "type" };
+    protected static final String[] PROPERTY_IGNORE_PROPS = { "type" };
 
     public static final String WF_PROCESS_ID = "userWorkflow";
 
@@ -137,35 +137,35 @@ public class ActivitiUserWorkflowAdapter extends AbstractUserWorkflowAdapter
{
     public static final String EVENT = "event";
 
     @Resource(name = "adminUser")
-    private String adminUser;
+    protected String adminUser;
 
     @Autowired
-    private RuntimeService runtimeService;
+    protected RuntimeService runtimeService;
 
     @Autowired
-    private TaskService taskService;
+    protected TaskService taskService;
 
     @Autowired
-    private FormService formService;
+    protected FormService formService;
 
     @Autowired
-    private HistoryService historyService;
+    protected HistoryService historyService;
 
     @Autowired
-    private RepositoryService repositoryService;
+    protected RepositoryService repositoryService;
 
     @Autowired
-    private ActivitiImportUtils importUtils;
+    protected ActivitiImportUtils importUtils;
 
     @Autowired
-    private UserDataBinder userDataBinder;
+    protected UserDataBinder userDataBinder;
 
     @Override
     public Class<? extends WorkflowInstanceLoader> getLoaderClass() {
         return ActivitiWorkflowLoader.class;
     }
 
-    private void throwException(final ActivitiException e, final String defaultMessage) {
+    protected void throwException(final ActivitiException e, final String defaultMessage)
{
         if (e.getCause() != null) {
             if (e.getCause().getCause() instanceof SyncopeClientException) {
                 throw (SyncopeClientException) e.getCause().getCause();
@@ -179,7 +179,7 @@ public class ActivitiUserWorkflowAdapter extends AbstractUserWorkflowAdapter
{
         throw new WorkflowException(defaultMessage, e);
     }
 
-    private void updateStatus(final SyncopeUser user) {
+    protected void updateStatus(final SyncopeUser user) {
         List<Task> tasks = taskService.createTaskQuery().processInstanceId(user.getWorkflowId()).list();
         if (tasks.isEmpty() || tasks.size() > 1) {
             LOG.warn("While setting user status: unexpected task number ({})", tasks.size());
@@ -188,7 +188,7 @@ public class ActivitiUserWorkflowAdapter extends AbstractUserWorkflowAdapter
{
         }
     }
 
-    private String getFormTask(final SyncopeUser user) {
+    protected String getFormTask(final SyncopeUser user) {
         String result = null;
 
         List<Task> tasks = taskService.createTaskQuery().processInstanceId(user.getWorkflowId()).list();
@@ -208,7 +208,7 @@ public class ActivitiUserWorkflowAdapter extends AbstractUserWorkflowAdapter
{
         return result;
     }
 
-    private Set<String> getPerformedTasks(final SyncopeUser user) {
+    protected Set<String> getPerformedTasks(final SyncopeUser user) {
         final Set<String> result = new HashSet<String>();
 
         for (HistoricActivityInstance task
@@ -223,7 +223,7 @@ public class ActivitiUserWorkflowAdapter extends AbstractUserWorkflowAdapter
{
     /**
      * Saves resources to be propagated and password for later - after form submission -
propagation.
      */
-    private void saveForFormSubmit(final SyncopeUser user, final String password,
+    protected void saveForFormSubmit(final SyncopeUser user, final String password,
             final PropagationByResource propByRes) {
 
         String formTaskId = getFormTask(user);
@@ -297,7 +297,7 @@ public class ActivitiUserWorkflowAdapter extends AbstractUserWorkflowAdapter
{
                 new SimpleEntry<Long, Boolean>(user.getId(), propagateEnable), propByRes,
getPerformedTasks(user));
     }
 
-    private Set<String> doExecuteTask(final SyncopeUser user, final String task,
+    protected Set<String> doExecuteTask(final SyncopeUser user, final String task,
             final Map<String, Object> moreVariables) throws WorkflowException {
 
         Set<String> preTasks = getPerformedTasks(user);
@@ -562,7 +562,7 @@ public class ActivitiUserWorkflowAdapter extends AbstractUserWorkflowAdapter
{
         }
     }
 
-    private WorkflowFormPropertyType fromActivitiFormType(final FormType activitiFormType)
{
+    protected WorkflowFormPropertyType fromActivitiFormType(final FormType activitiFormType)
{
         WorkflowFormPropertyType result = WorkflowFormPropertyType.String;
 
         if ("string".equals(activitiFormType.getName())) {
@@ -584,11 +584,11 @@ public class ActivitiUserWorkflowAdapter extends AbstractUserWorkflowAdapter
{
         return result;
     }
 
-    private WorkflowFormTO getFormTO(final Task task) {
+    protected WorkflowFormTO getFormTO(final Task task) {
         return getFormTO(task, formService.getTaskFormData(task.getId()));
     }
 
-    private WorkflowFormTO getFormTO(final Task task, final TaskFormData fd) {
+    protected WorkflowFormTO getFormTO(final Task task, final TaskFormData fd) {
         final WorkflowFormTO formTO =
                 getFormTO(task.getProcessInstanceId(), task.getId(), fd.getFormKey(), fd.getFormProperties());
 
@@ -596,7 +596,7 @@ public class ActivitiUserWorkflowAdapter extends AbstractUserWorkflowAdapter
{
         return formTO;
     }
 
-    private WorkflowFormTO getFormTO(final HistoricTaskInstance task) {
+    protected WorkflowFormTO getFormTO(final HistoricTaskInstance task) {
         final List<HistoricFormPropertyEntity> props = new ArrayList<HistoricFormPropertyEntity>();
 
         for (HistoricDetail historicDetail : historyService.createHistoricDetailQuery().taskId(task.getId()).list())
{
@@ -621,7 +621,7 @@ public class ActivitiUserWorkflowAdapter extends AbstractUserWorkflowAdapter
{
         return formTO;
     }
 
-    private WorkflowFormTO getHistoricFormTO(
+    protected WorkflowFormTO getHistoricFormTO(
             final String processInstanceId,
             final String taskId,
             final String formKey,
@@ -650,7 +650,7 @@ public class ActivitiUserWorkflowAdapter extends AbstractUserWorkflowAdapter
{
     }
 
     @SuppressWarnings("unchecked")
-    private WorkflowFormTO getFormTO(
+    protected WorkflowFormTO getFormTO(
             final String processInstanceId,
             final String taskId,
             final String formKey,
@@ -730,7 +730,7 @@ public class ActivitiUserWorkflowAdapter extends AbstractUserWorkflowAdapter
{
         return forms;
     }
 
-    private <T extends Query<?, ?>, U extends Object> List<WorkflowFormTO>
getForms(final Query<T, U> query) {
+    protected <T extends Query<?, ?>, U extends Object> List<WorkflowFormTO>
getForms(final Query<T, U> query) {
         List<WorkflowFormTO> forms = new ArrayList<WorkflowFormTO>();
 
         for (U obj : query.list()) {
@@ -778,7 +778,7 @@ public class ActivitiUserWorkflowAdapter extends AbstractUserWorkflowAdapter
{
         return result;
     }
 
-    private Map.Entry<Task, TaskFormData> checkTask(final String taskId, final String
authUser) {
+    protected Map.Entry<Task, TaskFormData> checkTask(final String taskId, final String
authUser) {
         Task task;
         try {
             task = taskService.createTaskQuery().taskId(taskId).singleResult();


Mime
View raw message