incubator-hise-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r.@apache.org
Subject svn commit: r899549 - in /incubator/hise/trunk: hise-services/src/main/java/org/apache/hise/api/ hise-services/src/main/java/org/apache/hise/dao/ hise-services/src/main/java/org/apache/hise/engine/ hise-services/src/main/java/org/apache/hise/engine/jax...
Date Fri, 15 Jan 2010 07:18:32 GMT
Author: rr
Date: Fri Jan 15 07:18:31 2010
New Revision: 899549

URL: http://svn.apache.org/viewvc?rev=899549&view=rev
Log:
HISE-13: Add interface for external authorizations

Added:
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/HISEUserDetails.java   (with props)
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/JpaQueryBuilder.java   (with props)
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/TaskQuery.java   (with props)
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/DefaultHISEUserDetails.java   (with props)
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEPasswordCallback.java   (with props)
Removed:
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEDaoPasswordCallback.java
Modified:
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/HISEDao.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/Task.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEEngine.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsImpl.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/Task.java
    incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/DaoTest.java
    incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/MockHiseDao.java
    incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/MockTaskOperationsImpl.java
    incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/TaskOperationsTest.java
    incubator/hise/trunk/hise-web/soapui-tests/hise-soapui-project.xml
    incubator/hise/trunk/hise-web/src/main/resources/hise-cxf.xml

Added: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/HISEUserDetails.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/HISEUserDetails.java?rev=899549&view=auto
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/HISEUserDetails.java (added)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/HISEUserDetails.java Fri Jan 15 07:18:31 2010
@@ -0,0 +1,8 @@
+package org.apache.hise.api;
+
+import java.util.Collection;
+
+public interface HISEUserDetails {
+    public Collection<String> getUserGroups(String user);
+    public String getUserPassword(String user);
+}

Propchange: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/api/HISEUserDetails.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/HISEDao.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/HISEDao.java?rev=899549&r1=899548&r2=899549&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/HISEDao.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/HISEDao.java Fri Jan 15 07:18:31 2010
@@ -33,6 +33,7 @@
 import org.apache.commons.lang.Validate;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.hise.api.HISEUserDetails;
 import org.apache.hise.dao.TaskOrgEntity.OrgEntityType;
 import org.apache.hise.engine.wsdl.IllegalArgumentFault;
 import org.apache.hise.engine.wsdl.IllegalStateFault;
@@ -41,6 +42,7 @@
 import org.springframework.orm.jpa.EntityManagerFactoryUtils;
 import org.springframework.orm.jpa.JpaCallback;
 import org.springframework.orm.jpa.support.JpaDaoSupport;
+import org.apache.hise.dao.JpaQueryBuilder.JQBParam;
 
 public class HISEDao extends JpaDaoSupport {
 
@@ -328,37 +330,31 @@
             }
         });
     }
-
-    private Collection<String> getUserGroups(OrgEntity user) {
-        Collection<String> r = new ArrayList<String>();
-        for (OrgEntity g : user.getUserGroups()) {
-            Validate.isTrue(g.getType() == OrgEntityType.GROUP);
-            r.add(g.getName());
-        }
-        return r;
-    }
     
-    public List<Task> getUserTasks(final OrgEntity user, String taskType, final GenericHumanRole genericHumanRole, String workQueue, List<TStatus> status, String whereClause, String createdOnClause, final Integer maxTasks) {
+    public List<Task> getUserTasks(final TaskQuery query) {
 //        TaskOrgEntity to;to.g
-        switch (genericHumanRole) {
+        switch (query.getGenericHumanRole()) {
         case ACTUALOWNER:
             return (List<Task>) getJpaTemplate().executeFind(new JpaCallback() {
                 public Object doInJpa(EntityManager em) throws PersistenceException {
-                    return em.createQuery("select distinct t from Task t where t.actualOwner.name = :user")
-                    .setParameter("user", user.getName())
-                    .setMaxResults(maxTasks)
+                    return em.createQuery("select distinct t from Task t where t.actualOwner = :user")
+                    .setParameter("user", query.getUser())
+                    .setMaxResults(query.getMaxTasks())
                     .getResultList();
                 }
             });
         case POTENTIALOWNERS:
-//            return (List<Task>) getJpaTemplate().find("select distinct t from Task t, TaskOrgEntity e where e.task = t and (e.name = ? and e.type = 'USER' or e.name in (?) and e.type = 'GROUP') and e.genericHumanRole = ?", user.getName(), getUserGroups(user), genericHumanRole);
             return (List<Task>) getJpaTemplate().executeFind(new JpaCallback() {
                 public Object doInJpa(EntityManager em) throws PersistenceException {
-                    return em.createQuery("select distinct t from Task t, TaskOrgEntity e where e.task = t and (e.name = :user and e.type = 'USER' or e.name in (:groups) and e.type = 'GROUP') and e.genericHumanRole = :role")
-                    .setParameter("user", user.getName())
-                    .setParameter("groups", getUserGroups(user))
-                    .setParameter("role", genericHumanRole)
-                    .setMaxResults(maxTasks)
+                    return new JpaQueryBuilder().buildQuery(em, 
+                            new Object[] {
+                            "select distinct t from Task t, TaskOrgEntity e where e.task = t and (e.name = :user and e.type = 'USER'",
+                            new JQBParam("user", query.getUser()),
+                            new JQBParam("groups", query.getUserGroups(), " or e.name in (:groups) and e.type = 'GROUP'"),
+                            ") and e.genericHumanRole = :role",
+                            new JQBParam("role", query.getGenericHumanRole())
+                    })
+                    .setMaxResults(query.getMaxTasks())
                     .getResultList();
                 }
             });
@@ -396,4 +392,5 @@
             getJpaTemplate().remove(o);
         }
     }
+
 }

Added: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/JpaQueryBuilder.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/JpaQueryBuilder.java?rev=899549&view=auto
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/JpaQueryBuilder.java (added)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/JpaQueryBuilder.java Fri Jan 15 07:18:31 2010
@@ -0,0 +1,58 @@
+package org.apache.hise.dao;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+
+public class JpaQueryBuilder {
+    public static class JQBParam {
+        public final String name;
+        public final Object value;
+        public final Object node;
+        public JQBParam(String name, Object value, Object node) {
+            super();
+            this.name = name;
+            this.value = value;
+            this.node = node;
+        }
+        public JQBParam(String name, Object value) {
+            this(name, value, null);
+        }
+    }
+    
+    private StringBuilder queryString = new StringBuilder();
+    private List<JQBParam> params = new ArrayList<JQBParam>();
+
+    private boolean isEmptyValue(Object value) {
+        return value == null || value instanceof Collection && ((Collection) value).isEmpty();
+    }
+    
+    private void buildQueryStr(Object node) {
+        if (node == null) {
+        } else if (node instanceof Object[]) {
+            for (Object o : (Object[]) node) {
+                buildQueryStr(o);
+            }
+        } else if (node instanceof JQBParam) {
+            JQBParam p = (JQBParam) node;
+            if (!isEmptyValue(p.value)) {
+                params.add((JQBParam) node);
+                buildQueryStr(p.node);
+            }
+        } else {
+            queryString.append(node.toString());
+        }
+    }
+    
+    public Query buildQuery(EntityManager em, Object node) {
+        buildQueryStr(node);
+        Query q = em.createQuery(queryString.toString());
+        for (JQBParam p : params) {
+            q = q.setParameter(p.name, p.value);
+        }
+        return q;
+    }
+}

Propchange: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/JpaQueryBuilder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/Task.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/Task.java?rev=899549&r1=899548&r2=899549&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/Task.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/Task.java Fri Jan 15 07:18:31 2010
@@ -206,11 +206,7 @@
     @Enumerated(EnumType.STRING)
     private Status statusBeforeSuspend;
 
-    /**
-     * People assigned to different generic human roles.
-     */
-    @ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE })
-    private OrgEntity actualOwner;
+    private String actualOwner;
 
     /**
      * This element is used to specify the priority of the task. It is an optional element which value is an integer expression. If not present, the priority of
@@ -347,12 +343,12 @@
     public void setStatusBeforeSuspend(Status statusBeforeSuspend) {
         this.statusBeforeSuspend = statusBeforeSuspend;
     }
-
-    public OrgEntity getActualOwner() {
+    
+    public String getActualOwner() {
         return actualOwner;
     }
 
-    public void setActualOwner(OrgEntity actualOwner) {
+    public void setActualOwner(String actualOwner) {
         this.actualOwner = actualOwner;
     }
 

Added: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/TaskQuery.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/TaskQuery.java?rev=899549&view=auto
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/TaskQuery.java (added)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/TaskQuery.java Fri Jan 15 07:18:31 2010
@@ -0,0 +1,75 @@
+package org.apache.hise.dao;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+
+import org.apache.hise.lang.xsd.htda.TStatus;
+
+public class TaskQuery {
+    private String user;
+    private Collection<String> userGroups = new HashSet<String>();
+    private String taskType = "ALL";
+    private GenericHumanRole genericHumanRole = GenericHumanRole.ACTUALOWNER;
+    private String workQueue = "";
+    private List<TStatus> status = Collections.EMPTY_LIST;
+    private String whereClause = "";
+    private String createdOnClause = "";
+    private Integer maxTasks = 20;
+    
+    public String getUser() {
+        return user;
+    }
+    public void setUser(String user) {
+        this.user = user;
+    }
+    public Collection<String> getUserGroups() {
+        return userGroups;
+    }
+    public void setUserGroups(Collection<String> userGroups) {
+        this.userGroups = userGroups;
+    }
+    public String getTaskType() {
+        return taskType;
+    }
+    public void setTaskType(String taskType) {
+        this.taskType = taskType;
+    }
+    public GenericHumanRole getGenericHumanRole() {
+        return genericHumanRole;
+    }
+    public void setGenericHumanRole(GenericHumanRole genericHumanRole) {
+        this.genericHumanRole = genericHumanRole;
+    }
+    public String getWorkQueue() {
+        return workQueue;
+    }
+    public void setWorkQueue(String workQueue) {
+        this.workQueue = workQueue;
+    }
+    public List<TStatus> getStatus() {
+        return status;
+    }
+    public void setStatus(List<TStatus> status) {
+        this.status = status;
+    }
+    public String getWhereClause() {
+        return whereClause;
+    }
+    public void setWhereClause(String whereClause) {
+        this.whereClause = whereClause;
+    }
+    public String getCreatedOnClause() {
+        return createdOnClause;
+    }
+    public void setCreatedOnClause(String createdOnClause) {
+        this.createdOnClause = createdOnClause;
+    }
+    public Integer getMaxTasks() {
+        return maxTasks;
+    }
+    public void setMaxTasks(Integer maxTasks) {
+        this.maxTasks = maxTasks;
+    }
+}

Propchange: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/TaskQuery.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/DefaultHISEUserDetails.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/DefaultHISEUserDetails.java?rev=899549&view=auto
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/DefaultHISEUserDetails.java (added)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/DefaultHISEUserDetails.java Fri Jan 15 07:18:31 2010
@@ -0,0 +1,36 @@
+package org.apache.hise.engine;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.apache.commons.lang.Validate;
+import org.apache.hise.api.HISEUserDetails;
+import org.apache.hise.dao.HISEDao;
+import org.apache.hise.dao.OrgEntity;
+import org.apache.hise.dao.TaskOrgEntity.OrgEntityType;
+
+/**
+ * Default implementation serves user details from HISE DAO
+ */
+public class DefaultHISEUserDetails implements HISEUserDetails {
+    private HISEDao hiseDao;
+    
+    public void setHiseDao(HISEDao hiseDao) {
+        this.hiseDao = hiseDao;
+    }
+
+    public String getUserPassword(String user1) {
+        OrgEntity user = hiseDao.load(OrgEntity.class, user1);
+        return user.getUserPassword();
+    }
+    
+    public Collection<String> getUserGroups(String user1) {
+        OrgEntity user = hiseDao.load(OrgEntity.class, user1);
+        Collection<String> r = new ArrayList<String>();
+        for (OrgEntity g : user.getUserGroups()) {
+            Validate.isTrue(g.getType() == OrgEntityType.GROUP);
+            r.add(g.getName());
+        }
+        return r;
+    }
+}

Propchange: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/DefaultHISEUserDetails.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEEngine.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEEngine.java?rev=899549&r1=899548&r2=899549&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEEngine.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEEngine.java Fri Jan 15 07:18:31 2010
@@ -9,6 +9,7 @@
 import org.apache.commons.lang.Validate;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.hise.api.HISEUserDetails;
 import org.apache.hise.dao.HISEDao;
 import org.apache.hise.dao.Job;
 import org.apache.hise.engine.jaxws.HISEJaxWSClient;
@@ -33,12 +34,21 @@
     public final Map<String, QName> tasksMap = new HashMap<String, QName>();
     public final Map<QName, TaskInfo> tasks = new HashMap<QName, TaskInfo>();
     private HISEDao hiseDao;
+    private HISEUserDetails hiseUserDetails;
     
     private HISEScheduler hiseScheduler;
     
     public HISEDao getHiseDao() {
         return hiseDao;
     }
+    
+    public void setHiseUserDetails(HISEUserDetails hiseUserDetails) {
+        this.hiseUserDetails = hiseUserDetails;
+    }
+
+    public HISEUserDetails getHiseUserDetails() {
+        return hiseUserDetails;
+    }
 
     public void setHiseDao(HISEDao hiseDao) {
         this.hiseDao = hiseDao;

Added: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEPasswordCallback.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEPasswordCallback.java?rev=899549&view=auto
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEPasswordCallback.java (added)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEPasswordCallback.java Fri Jan 15 07:18:31 2010
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.hise.engine;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.hise.api.HISEUserDetails;
+import org.apache.hise.dao.HISEDao;
+import org.apache.ws.security.WSPasswordCallback;
+
+public class HISEPasswordCallback implements CallbackHandler {
+    
+    private HISEUserDetails hiseUserDetails;
+    
+    public void setHiseUserDetails(HISEUserDetails hiseUserDetails) {
+        this.hiseUserDetails = hiseUserDetails;
+    }
+
+    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
+        for (int i = 0; i < callbacks.length; i++) {
+            WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
+
+            String pass = hiseUserDetails.getUserPassword(pc.getIdentifer());
+            if (pass != null) {
+                pc.setPassword(pass);
+                return;
+            }
+        }
+        
+        // Password not found
+        throw new IOException();
+    }
+}

Propchange: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/HISEPasswordCallback.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsImpl.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsImpl.java?rev=899549&r1=899548&r2=899549&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsImpl.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsImpl.java Fri Jan 15 07:18:31 2010
@@ -35,6 +35,7 @@
 import org.apache.hise.dao.GenericHumanRole;
 import org.apache.hise.dao.OrgEntity;
 import org.apache.hise.dao.TaskOrgEntity;
+import org.apache.hise.dao.TaskQuery;
 import org.apache.hise.engine.HISEEngine;
 import org.apache.hise.engine.wsdl.IllegalAccessFault;
 import org.apache.hise.engine.wsdl.IllegalArgumentFault;
@@ -89,19 +90,33 @@
         return context.getUserPrincipal().getName();
     }
     
-    protected OrgEntity loadUser() {
-        return hiseEngine.getHiseDao().getOrgEntity(getUserString());
+    protected String loadUser() {
+//        return hiseEngine.getHiseDao().getOrgEntity(getUserString());
+        return getUserString();
     }
     
     public void claim(String identifier) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
         Task task = Task.load(hiseEngine, Long.valueOf(identifier));
-        task.claim(loadUser());
+        task.setCurrentUser(loadUser());
+        task.claim();
     }
 
     public List<org.apache.hise.lang.xsd.htda.TTask> getMyTasks(String taskType, String genericHumanRole, String workQueue, List<TStatus> status, String whereClause, String createdOnClause, Integer maxTasks) throws IllegalArgumentFault, IllegalStateFault {
         List<org.apache.hise.lang.xsd.htda.TTask> l = new ArrayList<org.apache.hise.lang.xsd.htda.TTask>();
-        OrgEntity user = loadUser();
-        List<org.apache.hise.dao.Task> k = hiseEngine.getHiseDao().getUserTasks(user, taskType, GenericHumanRole.valueOf(genericHumanRole), workQueue, status, whereClause, createdOnClause, maxTasks);
+        String user = loadUser();
+        
+        TaskQuery query = new TaskQuery();
+        query.setUser(user);
+        query.setUserGroups(hiseEngine.getHiseUserDetails().getUserGroups(user));
+        query.setTaskType(taskType);
+        query.setGenericHumanRole(GenericHumanRole.valueOf(genericHumanRole));
+        query.setWorkQueue(workQueue);
+        query.setStatus(status);
+        query.setWhereClause(whereClause);
+        query.setCreatedOnClause(createdOnClause);
+        query.setMaxTasks(maxTasks);
+        
+        List<org.apache.hise.dao.Task> k = hiseEngine.getHiseDao().getUserTasks(query);
         for (org.apache.hise.dao.Task u : k) {
             TTask t = convertTask(u);
             l.add(t);
@@ -229,7 +244,7 @@
         t.setTaskType(u.isNotification() ? "NOTIFICATION" : "TASK");
         t.setCreatedOn(u.getCreatedOn());
         t.setActivationTime(u.getActivationTime());
-        if (u.getActualOwner() != null) t.setActualOwner(u.getActualOwner().getName());
+        if (u.getActualOwner() != null) t.setActualOwner(u.getActualOwner());
         t.setCreatedBy(u.getCreatedBy());
         t.setName(u.getTaskDefinitionName());
         t.setStatus(TStatus.valueOf(u.getStatus().toString()));
@@ -246,15 +261,15 @@
     }
 
     public void release(String identifier) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-        OrgEntity user = loadUser();
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
-        t.release(user);
+        t.setCurrentUser(loadUser());
+        t.release();
     }
 
     public void start(String identifier) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-        OrgEntity user = loadUser();
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
-        t.start(user);
+        t.setCurrentUser(loadUser());
+        t.start();
     }
 
     public void activate(String identifier) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
@@ -273,9 +288,9 @@
     }
 
     public void complete(String identifier, Object taskData) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
-        OrgEntity user = loadUser();
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
-        t.complete(user);
+        t.setCurrentUser(loadUser());
+        t.complete();
     }
 
     public void delegate(String identifier, TOrganizationalEntity organizationalEntity) throws IllegalAccessFault, IllegalStateFault, RecipientNotAllowed, IllegalArgumentFault {
@@ -299,9 +314,9 @@
     }
 
     public void fail(String identifier, String faultName, Object faultData) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault, IllegalOperationFault {
-        OrgEntity user = loadUser();
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
-        t.fail(user);
+        t.setCurrentUser(loadUser());
+        t.fail();
     }
 
     public void forward(String identifier, TOrganizationalEntity organizationalEntity) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
@@ -400,15 +415,13 @@
     }
 
     public void stop(String identifier) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
-        OrgEntity user = loadUser();
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
-        t.stop(user);
+        t.stop();
     }
 
     public void suspend(String identifier) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
-        OrgEntity user = loadUser();
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
-        t.suspend(user);
+        t.suspend();
     }
 
     public void suspendUntil(String identifier, TTime time) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/Task.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/Task.java?rev=899549&r1=899548&r2=899549&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/Task.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/runtime/Task.java Fri Jan 15 07:18:31 2010
@@ -86,6 +86,8 @@
     private Job currentJob;
 //    private Date currentEventDateTime = Calendar.getInstance().getTime();
     
+    private String currentUser;
+    
     protected Task() {}
     
     public Job getCurrentJob() {
@@ -96,6 +98,14 @@
         this.currentJob = currentJob;
     }
 
+    public String getCurrentUser() {
+        return currentUser;
+    }
+
+    public void setCurrentUser(String currentUser) {
+        this.currentUser = currentUser;
+    }
+
     private Task(HISEEngine engine) {
         this.hiseEngine = engine;
         Validate.notNull(hiseEngine);
@@ -147,10 +157,7 @@
             
             if (poSize == 1 && selected != null) {
                 //Nominate a single potential owner
-                OrgEntity a = hiseEngine.getHiseDao().getOrgEntity(selected.getName());
-                if (a.getType() == TaskOrgEntity.OrgEntityType.USER) {
-                    setActualOwner(a);
-                }
+                setActualOwner(selected.getName());
             }
         }
     }
@@ -224,7 +231,7 @@
         // recalculatePriority();
     }
     
-    public void setActualOwner(OrgEntity user) {
+    public void setActualOwner(String user) {
         taskDto.setActualOwner(user);
         setStatus(Status.RESERVED);
     }
@@ -473,7 +480,7 @@
      * @throws HTIllegalAccessException
      *             Thrown when task is in illegal state for claim i.e. not READY or person cannot become actual owner i.e. not potential owner or excluded.
      */
-    public void claim(OrgEntity user) {
+    public void claim() {
 
         if (taskDto.getActualOwner() != null) {
             throw new IllegalStateException("Actual owner already set " + taskDto.getActualOwner());
@@ -494,27 +501,25 @@
         // throw new HTIllegalAccessException("Person is excluded from potential owners.", person.getName());
         // }
 
-        Validate.isTrue(user.getType() == TaskOrgEntity.OrgEntityType.USER);
-
-        taskDto.setActualOwner(user);
+        taskDto.setActualOwner(currentUser);
 
         // taskDto.addOperationComment(Operations.CLAIM, person);
         setStatus(Status.RESERVED);
     }
     
-    public void start(OrgEntity user) {
+    public void start() {
         setStatus(Status.IN_PROGRESS);
     }
 
-    public void stop(OrgEntity user) {
+    public void stop() {
         setStatus(Status.RESERVED);
     }
 
-    public void release(OrgEntity user) {
+    public void release() {
         setStatus(Status.READY);
     }
     
-    public void suspend(OrgEntity user) {
+    public void suspend() {
         setStatus(Status.SUSPENDED);
     }
     
@@ -535,12 +540,12 @@
         setStatus(taskDto.getStatusBeforeSuspend());
     }
 
-    public void fail(OrgEntity user) {
+    public void fail() {
         setStatus(Status.FAILED);
         sendResponse();
     }
 
-    public void complete(OrgEntity user) {
+    public void complete() {
         setStatus(Status.COMPLETED);
         sendResponse();
     }

Modified: incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/DaoTest.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/DaoTest.java?rev=899549&r1=899548&r2=899549&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/DaoTest.java (original)
+++ incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/DaoTest.java Fri Jan 15 07:18:31 2010
@@ -13,6 +13,7 @@
 import org.apache.hise.dao.OrgEntity;
 import org.apache.hise.dao.Task;
 import org.apache.hise.dao.TaskOrgEntity;
+import org.apache.hise.dao.TaskQuery;
 import org.apache.hise.dao.Task.Status;
 import org.apache.hise.dao.TaskOrgEntity.OrgEntityType;
 import org.apache.hise.lang.xsd.htda.TStatus;
@@ -63,7 +64,7 @@
         Task t = new Task();
         t.setStatus(Status.CREATED);
         t.setTaskDefinitionKey("asd");
-        t.setActualOwner(o);
+        t.setActualOwner("user1");
         
         t.getInput().put("abc", new Message("abc", "def"));
         hiseDao.saveTask(t);
@@ -125,8 +126,9 @@
         tt.execute(new TransactionCallback() {
             public Object doInTransaction(TransactionStatus arg0) {
                 try {
-                    OrgEntity o = hiseDao.load(OrgEntity.class, "user1");
-                    List<Task> r = hiseDao.getUserTasks(o, "", GenericHumanRole.ACTUALOWNER, "", Collections.EMPTY_LIST, "", null, 100);
+                    TaskQuery query = new TaskQuery();
+                    query.setUser("user1");
+                    List<Task> r = hiseDao.getUserTasks(query);
                     Assert.assertEquals("asd", r.get(0).getTaskDefinitionKey());
                     return null;
                 } catch (Exception e) {
@@ -144,8 +146,13 @@
                 try{
                     cleanup();
                     addTask2();
-                    OrgEntity o = hiseDao.load(OrgEntity.class, "user1");
-                    List<Task> r = hiseDao.getUserTasks(o, "", GenericHumanRole.POTENTIALOWNERS, "", Collections.EMPTY_LIST, "", null, 100);
+                    TaskQuery query = new TaskQuery();
+                    query.setUser("user1");
+                    query.setGenericHumanRole(GenericHumanRole.POTENTIALOWNERS);
+                    List<Task> r = hiseDao.getUserTasks(query);
+                    query.getUserGroups().add("group1");
+                    r = hiseDao.getUserTasks(query);
+                    
                     Assert.assertEquals("asd2", r.get(0).getTaskDefinitionKey());
                     return null;
                 } catch (Exception e) {
@@ -182,7 +189,7 @@
     }
     
     @Test 
-    public void testGrupQuery() throws Exception {
+    public void testGroupQuery() throws Exception {
         TransactionTemplate tt = new TransactionTemplate(transactionManager);
         tt.execute(new TransactionCallback() {
             public Object doInTransaction(TransactionStatus arg0) {
@@ -199,8 +206,11 @@
         tt.execute(new TransactionCallback() {
             public Object doInTransaction(TransactionStatus arg0) {
                 try {
-                    OrgEntity o = hiseDao.load(OrgEntity.class, "user1");
-                    List<Task> r = hiseDao.getUserTasks(o, "", GenericHumanRole.POTENTIALOWNERS, "", Collections.EMPTY_LIST, "", null, 100);
+                    TaskQuery query = new TaskQuery();
+                    query.setUser("user1");
+                    query.getUserGroups().add("group1");
+                    query.setGenericHumanRole(GenericHumanRole.POTENTIALOWNERS);
+                    List<Task> r = hiseDao.getUserTasks(query);
                     Assert.assertEquals("asd3", r.get(0).getTaskDefinitionKey());
                 } catch (Exception e) {
                     throw new RuntimeException(e);

Modified: incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/MockHiseDao.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/MockHiseDao.java?rev=899549&r1=899548&r2=899549&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/MockHiseDao.java (original)
+++ incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/MockHiseDao.java Fri Jan 15 07:18:31 2010
@@ -4,17 +4,15 @@
 import java.util.Date;
 import java.util.List;
 
-import org.apache.hise.dao.GenericHumanRole;
 import org.apache.hise.dao.HISEDao;
-import org.apache.hise.dao.OrgEntity;
 import org.apache.hise.dao.Task;
+import org.apache.hise.dao.TaskQuery;
 import org.apache.hise.dao.Task.Status;
-import org.apache.hise.lang.xsd.htda.TStatus;
 
 public class MockHiseDao extends HISEDao {
 
     @Override
-    public List<Task> getUserTasks(OrgEntity user, String taskType, GenericHumanRole genericHumanRole, String workQueue, List<TStatus> status, String whereClause, String createdOnClause, Integer maxTasks) {
+    public List<Task> getUserTasks(TaskQuery query) {
         Task t = new Task();
         t.setId(123L);
         t.setTaskDefinitionKey("{asdf}asdf");

Modified: incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/MockTaskOperationsImpl.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/MockTaskOperationsImpl.java?rev=899549&r1=899548&r2=899549&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/MockTaskOperationsImpl.java (original)
+++ incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/MockTaskOperationsImpl.java Fri Jan 15 07:18:31 2010
@@ -1,7 +1,5 @@
 package org.apache.hise;
 
-import org.apache.hise.dao.OrgEntity;
-import org.apache.hise.dao.TaskOrgEntity.OrgEntityType;
 import org.apache.hise.engine.jaxws.TaskOperationsImpl;
 
 public class MockTaskOperationsImpl extends TaskOperationsImpl {
@@ -11,12 +9,4 @@
         return "user1";
     }
 
-    @Override
-    protected OrgEntity loadUser() {
-        OrgEntity oe = new OrgEntity();
-        oe.setName("user1");
-        oe.setType(OrgEntityType.USER);
-        return oe;
-    }
-
 }

Modified: incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/TaskOperationsTest.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/TaskOperationsTest.java?rev=899549&r1=899548&r2=899549&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/TaskOperationsTest.java (original)
+++ incubator/hise/trunk/hise-services/src/test/java/org/apache/hise/TaskOperationsTest.java Fri Jan 15 07:18:31 2010
@@ -1,5 +1,6 @@
 package org.apache.hise;
 
+import java.util.Collection;
 import java.util.Collections;
 import java.util.Date;
 import java.util.List;
@@ -14,6 +15,7 @@
 
 import junit.framework.Assert;
 
+import org.apache.hise.api.HISEUserDetails;
 import org.apache.hise.engine.HISEEngine;
 import org.apache.hise.engine.jaxws.TaskOperationsImpl;
 import org.apache.hise.lang.xsd.htda.TTask;
@@ -27,6 +29,15 @@
     public void testGetMyTasks() throws Exception {
         TaskOperationsImpl ti = new MockTaskOperationsImpl();
         HISEEngine he = new HISEEngine();
+        he.setHiseUserDetails(new HISEUserDetails() {
+            public String getUserPassword(String user) {
+                return null;
+            }
+            
+            public Collection<String> getUserGroups(String user) {
+                return Collections.singleton("group1");
+            }
+        });
         MockHiseDao hd = new MockHiseDao();
         he.setHiseDao(hd);
         ti.setHiseEngine(he);

Modified: incubator/hise/trunk/hise-web/soapui-tests/hise-soapui-project.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-web/soapui-tests/hise-soapui-project.xml?rev=899549&r1=899548&r2=899549&view=diff
==============================================================================
--- incubator/hise/trunk/hise-web/soapui-tests/hise-soapui-project.xml (original)
+++ incubator/hise/trunk/hise-web/soapui-tests/hise-soapui-project.xml Fri Jan 15 07:18:31 2010
@@ -3290,7 +3290,7 @@
          <ok>?</ok>
       </cla:resolve>
    </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.insurance.example.com/claims/ClaimsResolvingPT/resolveRequest"/></con:call></con:operation></con:interface><con:testSuite name="SimpleTests"><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="getMyTasks" searchProperties="true" id="8f1618ed-6298-4f03-8f23-ab0643e54769"><con:settings/><con:testStep type="request" name="getMyTasks - Request 1"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>taskOperationsSOAP</con:interface><con:operation>getMyTasks</con:operation><con:request name="getMyTasks - Request 1" outgoingWss="" incomingWss="" wssPasswordType="PasswordDigest"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@wss-time-to-live"/></con:settings><con:encoding>UTF-8</co
 n:encoding><con:endpoint>http://localhost:8080/taskOperations/</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.example.org/WS-HT/api/xsd">
+</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.insurance.example.com/claims/ClaimsResolvingPT/resolveRequest"/></con:call></con:operation></con:interface><con:testSuite name="SimpleTests"><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="getMyTasks" searchProperties="true" id="8f1618ed-6298-4f03-8f23-ab0643e54769"><con:settings/><con:testStep type="request" name="getMyTasks - Request 1"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>taskOperationsSOAP</con:interface><con:operation>getMyTasks</con:operation><con:request name="getMyTasks - Request 1" outgoingWss="" incomingWss="" wssPasswordType="PasswordText"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@wss-time-to-live"/></con:settings><con:encoding>UTF-8</con:
 encoding><con:endpoint>http://localhost:8080/taskOperations/</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.example.org/WS-HT/api/xsd">
    <soapenv:Body>
       <xsd:getMyTasks>
          <xsd:taskType>ALL</xsd:taskType>
@@ -3316,7 +3316,7 @@
          </ClaimApprovalRequest>
       </cla:approve>
    </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="SOAP Fault Assertion"/><con:credentials><con:username>user2</con:username><con:password>user2pass</con:password></con:credentials><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.insurance.example.com/claims/ClaimsHandlingPT/approveRequest" to="" replyTo="http://localhost:8082/ClaimsResponseService/" addDefaultTo="true"/></con:request></con:config></con:testStep><con:testStep type="properties" name="Properties"><con:settings/><con:config xsi:type="con:PropertiesStep" saveFirst="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:properties><con:property><con:name>tid</con:name><con:value>9</con:value></con:property></con:properties></con:config></con:testStep><con:testStep type="transfer" name="Property Transfer"><con:settings/><con:config xsi:type="con:PropertyTransfersStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:transfers se
 tNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" useXQuery="true" entitize="false" transferChildNodes="false"><con:name>tid</con:name><con:sourceType>Response</con:sourceType><con:sourceStep>approve - Request 1</con:sourceStep><con:sourcePath>&lt;a>{*/*/*/text()}&lt;/a></con:sourcePath><con:targetType>tid</con:targetType><con:targetStep>Properties</con:targetStep></con:transfers></con:config></con:testStep><con:testStep type="request" name="start - not existing"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>taskOperationsSOAP</con:interface><con:operation>start</con:operation><con:request name="start - not existing" outgoingWss="" incomingWss="" wssPasswordType="PasswordDigest"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/taskOperations/</con:endpoint><con:request><![CDATA[<soapenv:Envelope xml
 ns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.example.org/WS-HT/api/xsd">
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="SOAP Fault Assertion"/><con:credentials><con:username>user2</con:username><con:password>user2pass</con:password></con:credentials><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.insurance.example.com/claims/ClaimsHandlingPT/approveRequest" to="" replyTo="http://localhost:8082/ClaimsResponseService/" addDefaultTo="true"/></con:request></con:config></con:testStep><con:testStep type="properties" name="Properties"><con:settings/><con:config xsi:type="con:PropertiesStep" saveFirst="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:properties><con:property><con:name>tid</con:name><con:value>5</con:value></con:property></con:properties></con:config></con:testStep><con:testStep type="transfer" name="Property Transfer"><con:settings/><con:config xsi:type="con:PropertyTransfersStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:transfers se
 tNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" useXQuery="true" entitize="false" transferChildNodes="false"><con:name>tid</con:name><con:sourceType>Response</con:sourceType><con:sourceStep>approve - Request 1</con:sourceStep><con:sourcePath>&lt;a>{*/*/*/text()}&lt;/a></con:sourcePath><con:targetType>tid</con:targetType><con:targetStep>Properties</con:targetStep></con:transfers></con:config></con:testStep><con:testStep type="request" name="start - not existing"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>taskOperationsSOAP</con:interface><con:operation>start</con:operation><con:request name="start - not existing" outgoingWss="" incomingWss="" wssPasswordType="PasswordDigest"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/taskOperations/</con:endpoint><con:request><![CDATA[<soapenv:Envelope xml
 ns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.example.org/WS-HT/api/xsd">
    <soapenv:Header/>
    <soapenv:Body>
       <xsd:start>
@@ -3381,7 +3381,7 @@
          </ClaimApprovalRequest>
       </cla:approve>
    </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="SOAP Fault Assertion"/><con:credentials><con:username>user1</con:username><con:password>user1pass</con:password></con:credentials><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.insurance.example.com/claims/ClaimsHandlingPT/approveRequest" to="" replyTo="http://localhost:8086/ClaimsResponseService/" addDefaultTo="true"/></con:request></con:config></con:testStep><con:testStep type="properties" name="Properties"><con:settings/><con:config xsi:type="con:PropertiesStep" saveFirst="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:properties><con:property><con:name>tid</con:name><con:value>10</con:value></con:property></con:properties></con:config></con:testStep><con:testStep type="transfer" name="Property Transfer"><con:settings/><con:config xsi:type="con:PropertyTransfersStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:transfers s
 etNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" useXQuery="true" entitize="false" transferChildNodes="false"><con:name>tid</con:name><con:sourceType>Response</con:sourceType><con:sourceStep>approve - Request 1</con:sourceStep><con:sourcePath>&lt;a>{*/*/*/text()}&lt;/a></con:sourcePath><con:targetType>tid</con:targetType><con:targetStep>Properties</con:targetStep></con:transfers></con:config></con:testStep><con:testStep type="request" name="start"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>taskOperationsSOAP</con:interface><con:operation>start</con:operation><con:request name="start" outgoingWss="" incomingWss="" wssPasswordType="PasswordDigest"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/taskOperations/</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xm
 lsoap.org/soap/envelope/" xmlns:xsd="http://www.example.org/WS-HT/api/xsd">
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="SOAP Fault Assertion"/><con:credentials><con:username>user1</con:username><con:password>user1pass</con:password></con:credentials><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.insurance.example.com/claims/ClaimsHandlingPT/approveRequest" to="" replyTo="http://localhost:8086/ClaimsResponseService/" addDefaultTo="true"/></con:request></con:config></con:testStep><con:testStep type="properties" name="Properties"><con:settings/><con:config xsi:type="con:PropertiesStep" saveFirst="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:properties><con:property><con:name>tid</con:name><con:value>6</con:value></con:property></con:properties></con:config></con:testStep><con:testStep type="transfer" name="Property Transfer"><con:settings/><con:config xsi:type="con:PropertyTransfersStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:transfers se
 tNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" useXQuery="true" entitize="false" transferChildNodes="false"><con:name>tid</con:name><con:sourceType>Response</con:sourceType><con:sourceStep>approve - Request 1</con:sourceStep><con:sourcePath>&lt;a>{*/*/*/text()}&lt;/a></con:sourcePath><con:targetType>tid</con:targetType><con:targetStep>Properties</con:targetStep></con:transfers></con:config></con:testStep><con:testStep type="request" name="start"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>taskOperationsSOAP</con:interface><con:operation>start</con:operation><con:request name="start" outgoingWss="" incomingWss="" wssPasswordType="PasswordDigest"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/taskOperations/</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xml
 soap.org/soap/envelope/" xmlns:xsd="http://www.example.org/WS-HT/api/xsd">
    <soapenv:Header/>
    <soapenv:Body>
       <xsd:start>
@@ -3419,7 +3419,7 @@
          </ClaimApprovalRequest>
       </cla:approve>
    </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="SOAP Fault Assertion"/><con:credentials><con:username>user1</con:username><con:password>user1pass</con:password></con:credentials><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.insurance.example.com/claims/ClaimsHandlingPT/approveRequest" to="" replyTo="http://localhost:8086/ClaimsResponseService/" addDefaultTo="true"/></con:request></con:config></con:testStep><con:testStep type="properties" name="Properties"><con:settings/><con:config xsi:type="con:PropertiesStep" saveFirst="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:properties><con:property><con:name>tid</con:name><con:value>11</con:value></con:property></con:properties></con:config></con:testStep><con:testStep type="transfer" name="Property Transfer"><con:settings/><con:config xsi:type="con:PropertyTransfersStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:transfers s
 etNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" useXQuery="true" entitize="false" transferChildNodes="false"><con:name>tid</con:name><con:sourceType>Response</con:sourceType><con:sourceStep>approve - Request 1</con:sourceStep><con:sourcePath>&lt;a>{*/*/*/text()}&lt;/a></con:sourcePath><con:targetType>tid</con:targetType><con:targetStep>Properties</con:targetStep></con:transfers></con:config></con:testStep><con:testStep type="request" name="forward - Request 1"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>taskOperationsSOAP</con:interface><con:operation>forward</con:operation><con:request name="forward - Request 1" outgoingWss="" incomingWss="" wssPasswordType="PasswordText"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/taskOperations/</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmln
 s:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.example.org/WS-HT/api/xsd" xmlns:ws="http://www.example.org/WS-HT">
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="SOAP Fault Assertion"/><con:credentials><con:username>user1</con:username><con:password>user1pass</con:password></con:credentials><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.insurance.example.com/claims/ClaimsHandlingPT/approveRequest" to="" replyTo="http://localhost:8086/ClaimsResponseService/" addDefaultTo="true"/></con:request></con:config></con:testStep><con:testStep type="properties" name="Properties"><con:settings/><con:config xsi:type="con:PropertiesStep" saveFirst="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:properties><con:property><con:name>tid</con:name><con:value>7</con:value></con:property></con:properties></con:config></con:testStep><con:testStep type="transfer" name="Property Transfer"><con:settings/><con:config xsi:type="con:PropertyTransfersStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:transfers se
 tNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" useXQuery="true" entitize="false" transferChildNodes="false"><con:name>tid</con:name><con:sourceType>Response</con:sourceType><con:sourceStep>approve - Request 1</con:sourceStep><con:sourcePath>&lt;a>{*/*/*/text()}&lt;/a></con:sourcePath><con:targetType>tid</con:targetType><con:targetStep>Properties</con:targetStep></con:transfers></con:config></con:testStep><con:testStep type="request" name="forward - Request 1"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>taskOperationsSOAP</con:interface><con:operation>forward</con:operation><con:request name="forward - Request 1" outgoingWss="" incomingWss="" wssPasswordType="PasswordText"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/taskOperations/</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns
 :soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.example.org/WS-HT/api/xsd" xmlns:ws="http://www.example.org/WS-HT">
    <soapenv:Header/>
    <soapenv:Body>
       <xsd:forward>
@@ -3455,7 +3455,7 @@
          </ClaimApprovalRequest>
       </cla:approve>
    </soapenv:Body>
-</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="SOAP Fault Assertion"/><con:credentials><con:username>user1</con:username><con:password>user1pass</con:password></con:credentials><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.insurance.example.com/claims/ClaimsHandlingPT/approveRequest" to="" replyTo="http://localhost:8086/ClaimsResponseService/" addDefaultTo="true"/></con:request></con:config></con:testStep><con:testStep type="properties" name="Properties"><con:settings/><con:config xsi:type="con:PropertiesStep" saveFirst="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:properties><con:property><con:name>tid</con:name><con:value>3</con:value></con:property></con:properties></con:config></con:testStep><con:testStep type="transfer" name="Property Transfer"><con:settings/><con:config xsi:type="con:PropertyTransfersStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:transfers se
 tNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" useXQuery="true" entitize="false" transferChildNodes="false"><con:name>tid</con:name><con:sourceType>Response</con:sourceType><con:sourceStep>approve - Request 1</con:sourceStep><con:sourcePath>&lt;a>{*/*/*/text()}&lt;/a></con:sourcePath><con:targetType>tid</con:targetType><con:targetStep>Properties</con:targetStep></con:transfers></con:config></con:testStep><con:testStep type="request" name="suspendUntil - Request 1"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>taskOperationsSOAP</con:interface><con:operation>suspendUntil</con:operation><con:request name="suspendUntil - Request 1" outgoingWss="" incomingWss="" wssPasswordType="PasswordText"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/taskOperations/</con:endpoint><con:request><![CDATA[<soapenv
 :Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.example.org/WS-HT/api/xsd">
+</soapenv:Envelope>]]></con:request><con:assertion type="SOAP Response"/><con:assertion type="SOAP Fault Assertion"/><con:credentials><con:username>user1</con:username><con:password>user1pass</con:password></con:credentials><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://www.insurance.example.com/claims/ClaimsHandlingPT/approveRequest" to="" replyTo="http://localhost:8086/ClaimsResponseService/" addDefaultTo="true"/></con:request></con:config></con:testStep><con:testStep type="properties" name="Properties"><con:settings/><con:config xsi:type="con:PropertiesStep" saveFirst="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:properties><con:property><con:name>tid</con:name><con:value>8</con:value></con:property></con:properties></con:config></con:testStep><con:testStep type="transfer" name="Property Transfer"><con:settings/><con:config xsi:type="con:PropertyTransfersStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:transfers se
 tNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" useXQuery="true" entitize="false" transferChildNodes="false"><con:name>tid</con:name><con:sourceType>Response</con:sourceType><con:sourceStep>approve - Request 1</con:sourceStep><con:sourcePath>&lt;a>{*/*/*/text()}&lt;/a></con:sourcePath><con:targetType>tid</con:targetType><con:targetStep>Properties</con:targetStep></con:transfers></con:config></con:testStep><con:testStep type="request" name="suspendUntil - Request 1"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>taskOperationsSOAP</con:interface><con:operation>suspendUntil</con:operation><con:request name="suspendUntil - Request 1" outgoingWss="" incomingWss="" wssPasswordType="PasswordText"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>http://localhost:8080/taskOperations/</con:endpoint><con:request><![CDATA[<soapenv
 :Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.example.org/WS-HT/api/xsd">
    <soapenv:Header/>
    <soapenv:Body>
       <xsd:suspendUntil>

Modified: incubator/hise/trunk/hise-web/src/main/resources/hise-cxf.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-web/src/main/resources/hise-cxf.xml?rev=899549&r1=899548&r2=899549&view=diff
==============================================================================
--- incubator/hise/trunk/hise-web/src/main/resources/hise-cxf.xml (original)
+++ incubator/hise/trunk/hise-web/src/main/resources/hise-cxf.xml Fri Jan 15 07:18:31 2010
@@ -25,10 +25,6 @@
   </bean>
    -->
 
-  <bean id="hisePasswordCallback" class="org.apache.hise.engine.HISEDaoPasswordCallback">
-    <property name="hiseDao" ref="hiseDao"/>
-  </bean>
-
 <!-- 
   <bean id="transactionHandler" class="org.apache.hise.engine.jaxws.TransactionHandler">
     <property name="transactionManager" ref="transactionManager"/>
@@ -42,8 +38,17 @@
   <bean id="hiseEngine" class="org.apache.hise.engine.HISEEngine">
     <property name="hiseDao" ref="hiseDao"/>
     <property name="hiseScheduler" ref="hiseScheduler"/>
+    <property name="hiseUserDetails" ref="hiseUserDetails"/>
   </bean>
 
+  <bean id="hiseUserDetails" class="org.apache.hise.engine.DefaultHISEUserDetails">
+    <property name="hiseDao" ref="hiseDao"/>
+  </bean>
+
+  <bean id="hisePasswordCallback" class="org.apache.hise.engine.HISEPasswordCallback">
+    <property name="hiseUserDetails" ref="hiseUserDetails"/>
+  </bean>
+  
   <bean id="hiseScheduler" class="org.apache.hise.engine.HISEScheduler" init-method="init" destroy-method="destroy">
     <property name="hiseEngine" ref="hiseEngine"/>
     <property name="transactionManager" ref="transactionManager"/>



Mime
View raw message