incubator-hise-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r.@apache.org
Subject svn commit: r965467 [1/2] - in /incubator/hise/trunk: hise-services/src/main/java/org/apache/hise/dao/Task.java hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsImpl.java itest/hise-soapui-project.xml
Date Mon, 19 Jul 2010 13:10:35 GMT
Author: rr
Date: Mon Jul 19 13:10:34 2010
New Revision: 965467

URL: http://svn.apache.org/viewvc?rev=965467&view=rev
Log:
HISE-50: getTaskInfo and getMyTasks should return potential owners (thanks to PaweĊ‚ Byszewski)

Modified:
    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/jaxws/TaskOperationsImpl.java
    incubator/hise/trunk/itest/hise-soapui-project.xml

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=965467&r1=965466&r2=965467&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 Mon Jul
19 13:10:34 2010
@@ -420,27 +420,13 @@ public class Task extends JpaBase {
 //    }
 //
     public Set<TaskOrgEntity> getTaskStakeholders() {
-        Set<TaskOrgEntity> result = new HashSet<TaskOrgEntity>();
-        for(TaskOrgEntity e: peopleAssignments)
-        {
-           if (e.getGenericHumanRole() == GenericHumanRole.TASKSTAKEHOLDERS) {
-               result.add(e);
-           }
-        }
-        return result;
+    	return getFromPeopleAssignments(GenericHumanRole.TASKSTAKEHOLDERS);
     }
 
 
 
     public Set<TaskOrgEntity> getBusinessAdministrators(){
-        Set<TaskOrgEntity> result = new HashSet<TaskOrgEntity>();
-        for(TaskOrgEntity e: peopleAssignments)
-        {
-           if (e.getGenericHumanRole() == GenericHumanRole.BUSINESSADMINISTRATORS) {
-               result.add(e);
-           }
-        }
-        return result;
+    	return getFromPeopleAssignments(GenericHumanRole.BUSINESSADMINISTRATORS);
     }
 
     public void setBusinessAdministrators(Set<TaskOrgEntity> businessAdministrators)
{
@@ -521,4 +507,18 @@ public class Task extends JpaBase {
     public Object[] getKeys() {
         return new Object[] { id };
     }
+
+    public Set<TaskOrgEntity> getPotentialOwners(){
+    	return getFromPeopleAssignments(GenericHumanRole.POTENTIALOWNERS);
+    }
+    private Set<TaskOrgEntity> getFromPeopleAssignments(GenericHumanRole role){
+        Set<TaskOrgEntity> result = new HashSet<TaskOrgEntity>();
+        for(TaskOrgEntity e: peopleAssignments)
+        {
+           if (e.getGenericHumanRole() == role) {
+               result.add(e);
+           }
+        }
+        return result;
+    }
 }

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=965467&r1=965466&r2=965467&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
Mon Jul 19 13:10:34 2010
@@ -682,7 +682,7 @@ public class TaskOperationsImpl implemen
         Vector<TaskOrgEntity> temp=new Vector<TaskOrgEntity>(taskDto.getPeopleAssignments());
         int k=temp.size();
         TOrganizationalEntity tOrganizational = new TOrganizationalEntity();
-        TUserlist users=new TUserlist();
+        TUserlist users=new TUserlist();        
         for(TaskOrgEntity o : taskDto.getBusinessAdministrators()){
         	if(o.getType()==OrgEntityType.USER)
         		users.getUser().add(o.getName());
@@ -703,6 +703,18 @@ public class TaskOperationsImpl implemen
         	tOrganizational.withUsers(users);
         if(!users.getUser().isEmpty() )
         	result.setTaskStakeholders(tOrganizational);
+        
+        tOrganizational = new TOrganizationalEntity();
+        users=new TUserlist();
+        //TGrouplist groups=new TGrouplist();
+        for(TaskOrgEntity o : taskDto.getPotentialOwners()){
+        	if(o.getType()==OrgEntityType.USER)
+        		users.getUser().add(o.getName());
+        }
+        if(!users.getUser().isEmpty())
+        	tOrganizational.withUsers(users);
+        if(!users.getUser().isEmpty() )
+        	result.setPotentialOwners(tOrganizational);
    
              
         result.setPriority(new BigInteger(new Integer(taskDto.getPriority()).toString()));
@@ -730,7 +742,7 @@ public class TaskOperationsImpl implemen
     }
 
 	/**
-	 * TODO set addedBy
+	 * 
 	 * @param comment
 	 * @return
 	 */



Mime
View raw message