incubator-hise-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wi...@apache.org
Subject svn commit: r999822 - in /incubator/hise/trunk: 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/jaxws/ hise-services/src/main/resources/META-INF/ hi...
Date Wed, 22 Sep 2010 09:07:18 GMT
Author: witek
Date: Wed Sep 22 09:07:17 2010
New Revision: 999822

URL: http://svn.apache.org/viewvc?rev=999822&view=rev
Log:
support for sorting

Removed:
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/PresentationParameter.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/dao/TaskQuery.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/TaskChecker.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsBaseImpl.java
    incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsImpl.java
    incubator/hise/trunk/hise-services/src/main/resources/META-INF/persistence.xml
    incubator/hise/trunk/hise-services/src/main/resources/org/apache/hise/persistence.xml
    incubator/hise/trunk/hise-ws-client/src/main/java/org/apache/hise/wsclient/facade/FilterCriteria.java
    incubator/hise/trunk/hise-ws-client/src/main/java/org/apache/hise/wsclient/facade/HiseApiFacadeImpl.java
    incubator/hise/trunk/hise-ws-client/src/main/java/org/apache/hise/wsclient/infrastructure/Tasks.java
    incubator/hise/trunk/hise-ws-client/src/main/resources/wsdls/ws-humantask-api-wsdl.xsd
    incubator/hise/trunk/hise-ws-client/src/test/java/org/apache/hise/api/client/facade/HiseApiFacadeUnitTest.java
    incubator/hise/trunk/hise-wsdl/src/main/resources/ws-humantask-api-wsdl.xsd

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=999822&r1=999821&r2=999822&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 Wed Sep 22 09:07:17 2010
@@ -111,7 +111,8 @@ public class HISEDao extends JpaDaoSuppo
 			q.add(" and ");
 		if(!addWhereClause(q, query))
 			if(q.size()>1) q.setSize(q.size()-1);
-		q.add(" order by t.id");
+
+		q.add(" order by t." + query.getOrderByClause());
 		
 		return new JpaQueryBuilder().buildQuery(em, q.toArray());	
 	}
@@ -146,7 +147,6 @@ public class HISEDao extends JpaDaoSuppo
 		String clause=query.getWhereClause();
     	if(clause==null) return false;
     	return (createWhereClause(q, clause, "addition"));
-    	
 	}
 
 	private static boolean addGenericHumanRole(Vector<Object> q, TaskQuery query){

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=999822&r1=999821&r2=999822&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 Wed Sep 22 09:07:17 2010
@@ -20,15 +20,14 @@
 package org.apache.hise.dao;
 
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import javax.persistence.Basic;
 
+import javax.persistence.Basic;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
@@ -38,11 +37,8 @@ import javax.persistence.FetchType;
 import javax.persistence.GeneratedValue;
 import javax.persistence.GenerationType;
 import javax.persistence.Id;
-import javax.persistence.JoinColumn;
 import javax.persistence.JoinTable;
 import javax.persistence.Lob;
-import javax.persistence.ManyToMany;
-import javax.persistence.ManyToOne;
 import javax.persistence.MapKey;
 import javax.persistence.OneToMany;
 import javax.persistence.OneToOne;
@@ -52,10 +48,8 @@ import javax.xml.namespace.QName;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.hise.dao.TaskOrgEntity.OrgEntityType;
 import org.springframework.beans.factory.annotation.Configurable;
 
-
 /**
  * Holds task instance information. Provides task business operations.
  *
@@ -68,16 +62,10 @@ import org.springframework.beans.factory
 @Table(name = "HISE_TASK")
 @Configurable(preConstruction = true)
 public class Task extends JpaBase {
-
-    private final Log log = LogFactory.getLog(Task.class);
     
     @Column(nullable = false)
     private String taskDefinitionKey;
 
-//    public static enum TaskTypes {
-//        ALL, TASKS, NOTIFICATIONS;
-//    }
-
     /**
      * Task statuses.
      */
@@ -146,13 +134,6 @@ public class Task extends JpaBase {
     }
 
     /**
-     * Task operations. Enumeration used to trigger comments.
-     */
-//    public static enum Operations {
-//        CREATE, STATUS, NOMINATE, CLAIM, START, DELEGATE, RELEASE, COMPLETE, FAIL; 
-//    }
-
-    /**
      * Task's id. Autogenerated.
      */
     @Id
@@ -181,8 +162,6 @@ public class Task extends JpaBase {
      * Task status.
      */
     @Enumerated(EnumType.STRING)
-//    @Column(nullable = false)
-//    @Index(name = "task_status_idx")
     private Status status;
 
     /**
@@ -256,22 +235,6 @@ public class Task extends JpaBase {
     @OneToMany(mappedBy="task", cascade = {CascadeType.ALL})
     private Set<TaskOrgEntity> peopleAssignments;
 
-//    @ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE })
-//    @JoinTable(name = "TASK_EXCLUDED_OWNERS", joinColumns = @JoinColumn(name = "TASK"), inverseJoinColumns = @JoinColumn(name = "ASSIGNEE"))
-//    private Set<TaskOrgEntity> excludedOwners;
-//
-   //@ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE })
-   //@JoinTable(name = "TASK_STAKEHOLDERS", joinColumns = @JoinColumn(name = "TASK"), inverseJoinColumns = @JoinColumn(name = "ASSIGNEE"))
-  // private Set<TaskOrgEntity> taskStakeholders;
-//
-  //  @ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE })
-   // @JoinTable(name = "TASK_BUSINESS_AMINISTRATORS", joinColumns = @JoinColumn(name = "TASK"), inverseJoinColumns = @JoinColumn(name = "ASSIGNEE"))
-   // private Set<TaskOrgEntity> businessAdministrators;
-//
-//    @ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE })
-//    @JoinTable(name = "TASK_NOTIFICATION_RECIPIENTS", joinColumns = @JoinColumn(name = "TASK"), inverseJoinColumns = @JoinColumn(name = "ASSIGNEE"))
-//    private Set<TaskOrgEntity> notificationRecipients;
-
     @OneToMany(mappedBy = "task", cascade = { CascadeType.PERSIST, CascadeType.MERGE })
     @javax.persistence.OrderBy("date")
     private List<Comment> comments = new ArrayList<Comment>();
@@ -279,9 +242,6 @@ public class Task extends JpaBase {
     @OneToMany(mappedBy = "task", cascade = { CascadeType.PERSIST, CascadeType.MERGE })
     private List<Attachment> attachments = new ArrayList<Attachment>();
 
-//    @OneToMany(mappedBy = "task", cascade = { CascadeType.PERSIST, CascadeType.MERGE })
-//    private List<Deadline> deadlines = new ArrayList<Deadline>();
-    
     @OneToMany(cascade = {CascadeType.ALL})
     @JoinTable(name="HISE_DEADLINE")
     private Set<Job> deadlines = new HashSet<Job>();
@@ -291,27 +251,6 @@ public class Task extends JpaBase {
      */
     private Fault fault;
     
-    /**
-     * Task presentation parameters recalculated on input message change. 
-     * Maps presentation parameter name to its value. Can be used as a where clause parameter
-     * in task query operations.
-     */
-    @OneToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, mappedBy = "task", fetch = FetchType.EAGER)
-    @MapKey(name = "name")
-    private Map<String, PresentationParameter> presentationParameters = new HashMap<String, PresentationParameter>();
-
-
-//    public List<Deadline> getDeadlines() {
-//        return deadlines;
-//    }
-//
-//    public void setDeadlines(List<Deadline> deadlines) {
-//        this.deadlines = deadlines;
-//    }
-
-    
-    
-    
     public Set<Job> getDeadlines() {
         return deadlines;
     }
@@ -445,22 +384,10 @@ public class Task extends JpaBase {
         this.escalated = escalated;
     }
 
-    
-
-//    public Set<TaskOrgEntity> getExcludedOwners() {
-//        return excludedOwners;
-//    }
-//
-//    public void setExcludedOwners(Set<TaskOrgEntity> excludedOwners) {
-//        this.excludedOwners = excludedOwners;
-//    }
-//
     public Set<TaskOrgEntity> getTaskStakeholders() {
     	return getFromPeopleAssignments(GenericHumanRole.TASKSTAKEHOLDERS);
     }
 
-
-
     public Set<TaskOrgEntity> getBusinessAdministrators(){
     	return getFromPeopleAssignments(GenericHumanRole.BUSINESSADMINISTRATORS);
     }
@@ -469,15 +396,6 @@ public class Task extends JpaBase {
         this.peopleAssignments.addAll(businessAdministrators);
     }
 
-//
-//    public Set<TaskOrgEntity> getNotificationRecipients() {
-//        return notificationRecipients;
-//    }
-//
-//    public void setNotificationRecipients(Set<TaskOrgEntity> notificationRecipients) {
-//        this.notificationRecipients = notificationRecipients;
-//    }
-
     public Set<TaskOrgEntity> getPeopleAssignments() {
         return peopleAssignments;
     }
@@ -516,14 +434,6 @@ public class Task extends JpaBase {
         this.fault = fault;
     }
 
-    public Map<String, PresentationParameter> getPresentationParameters() {
-        return presentationParameters;
-    }
-
-    public void setPresentationParameters(Map<String, PresentationParameter> presentationParameters) {
-        this.presentationParameters = presentationParameters;
-    }
-
     public void setNotification(boolean notification) {
         this.notification = notification;
     }

Modified: 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=999822&r1=999821&r2=999822&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/TaskQuery.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/dao/TaskQuery.java Wed Sep 22 09:07:17 2010
@@ -41,6 +41,7 @@ public class TaskQuery {
     private List<TStatus.Enum> statuses = Collections.EMPTY_LIST;
     private String whereClause = "";
     private String createdOnClause = "";
+    private String orderByClause = "id";
     
     //no limit on number of returned tasks 
     private Integer maxTasks = null;
@@ -116,4 +117,12 @@ public class TaskQuery {
     public void setMaxTasks(Integer maxTasks) {
         this.maxTasks = maxTasks;
     }
+
+	public void setOrderByClause(String orderByClause) {
+	    this.orderByClause = orderByClause;
+    }
+
+	public String getOrderByClause() {
+	    return orderByClause;
+    }
 }

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/TaskChecker.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/TaskChecker.java?rev=999822&r1=999821&r2=999822&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/TaskChecker.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/TaskChecker.java Wed Sep 22 09:07:17 2010
@@ -1,25 +1,18 @@
 package org.apache.hise.engine;
 
-
-
 import java.util.Collection;
 import java.util.HashSet;
 
-
-import org.apache.bcel.generic.GETFIELD;
 import org.apache.hise.dao.GenericHumanRole;
-import org.apache.hise.dao.HISEDao;
-import org.apache.hise.dao.OrgEntity;
 import org.apache.hise.dao.Task.Status;
-import org.apache.hise.dao.TaskOrgEntity;
 import org.apache.hise.engine.wsdl.IllegalAccessFault;
 import org.apache.hise.engine.wsdl.IllegalStateFault;
 import org.apache.hise.runtime.Task;
+
 /**
  * Check user authorization and task's state to use operation method 
  * 
  * @author Michał Więcław
- *
  */
 public class TaskChecker {
 	

Modified: incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsBaseImpl.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsBaseImpl.java?rev=999822&r1=999821&r2=999822&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsBaseImpl.java (original)
+++ incubator/hise/trunk/hise-services/src/main/java/org/apache/hise/engine/jaxws/TaskOperationsBaseImpl.java Wed Sep 22 09:07:17 2010
@@ -31,7 +31,6 @@ import java.util.Set;
 import java.util.StringTokenizer;
 
 import javax.jws.WebService;
-import javax.xml.crypto.dsig.XMLObject;
 import javax.xml.namespace.QName;
 import javax.xml.ws.WebServiceContext;
 
@@ -48,16 +47,12 @@ import org.apache.hise.dao.TaskQuery;
 import org.apache.hise.engine.HISEEngineImpl;
 import org.apache.hise.engine.TaskChecker;
 import org.apache.hise.engine.TaskChecker.HumanOperationName;
-
 import org.apache.hise.engine.wsdl.IllegalAccessFault;
 import org.apache.hise.engine.wsdl.IllegalArgumentFault;
 import org.apache.hise.engine.wsdl.IllegalOperationFault;
 import org.apache.hise.engine.wsdl.IllegalStateFault;
-
 import org.apache.hise.engine.wsdl.RecipientNotAllowed;
-
 import org.apache.hise.engine.wsdl.TaskOperations;
-
 import org.apache.hise.lang.xsd.htd.TDeadlineInfo;
 import org.apache.hise.lang.xsd.htd.TDeadlinesInfo;
 import org.apache.hise.lang.xsd.htd.TGrouplist;
@@ -65,7 +60,6 @@ import org.apache.hise.lang.xsd.htd.TOrg
 import org.apache.hise.lang.xsd.htd.TRendering;
 import org.apache.hise.lang.xsd.htd.TRenderings;
 import org.apache.hise.lang.xsd.htd.TUserlist;
-
 import org.apache.hise.lang.xsd.htda.TAttachment;
 import org.apache.hise.lang.xsd.htda.TAttachmentInfo;
 import org.apache.hise.lang.xsd.htda.TComment;
@@ -108,7 +102,6 @@ import org.apache.hise.lang.xsd.htdt.Get
 import org.apache.hise.lang.xsd.htdt.GetMyTaskAbstractsResponseDocument;
 import org.apache.hise.lang.xsd.htdt.GetMyTasksDocument;
 import org.apache.hise.lang.xsd.htdt.GetMyTasksResponseDocument;
-import org.apache.hise.lang.xsd.htdt.GetMyTasksResponseDocument.GetMyTasksResponse;
 import org.apache.hise.lang.xsd.htdt.GetOutputDocument;
 import org.apache.hise.lang.xsd.htdt.GetOutputResponseDocument;
 import org.apache.hise.lang.xsd.htdt.GetRenderingDocument;
@@ -147,7 +140,6 @@ import org.apache.hise.lang.xsd.htdt.Sus
 import org.apache.hise.lang.xsd.htdt.SuspendResponseDocument;
 import org.apache.hise.lang.xsd.htdt.SuspendUntilDocument;
 import org.apache.hise.lang.xsd.htdt.SuspendUntilResponseDocument;
-
 import org.apache.hise.lang.xsd.htdt.TTime;
 import org.apache.hise.runtime.HiseIllegalAccessException;
 import org.apache.hise.runtime.HiseIllegalStateException;
@@ -163,12 +155,11 @@ import org.springframework.transaction.a
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
-import org.apache.xmlbeans.XmlString;
 
 /**
  * Implementation of WS-HT API. Operations are executed by end users, i.e.
  * actual or potential owners. The identity of the user is implicitly passed
- * when invoking any of the operations listed in the table below. The
+ * when invoking any of the operations. The
  * participant operations listed below only apply to tasks unless explicitly
  * noted otherwise. The authorization column indicates people of which roles are
  * authorized to perform the operation. Stakeholders of the task are not
@@ -177,7 +168,6 @@ import org.apache.xmlbeans.XmlString;
  * @author Witek Wołejszo
  * @author Warren Crossing
  */
-
 @Transactional
 @WebService
 public abstract class TaskOperationsBaseImpl implements TaskOperations {
@@ -188,13 +178,10 @@ public abstract class TaskOperationsBase
 
     protected WebServiceContext context;
     
-    protected boolean administrationMode=false;
-
+    protected boolean administrationMode = false;
 
     abstract protected String getUserString();
 
-
-
     /**
      * Sets up {@link WebServiceContext} used to lookup authenticated user
      * performing operations.
@@ -208,24 +195,25 @@ public abstract class TaskOperationsBase
 
     // implementation in progress
 
-    /**
-     * {@inheritDoc}
-     */
-    public GetMyTasksResponseDocument getMyTasks(GetMyTasksDocument getMyTasks) throws IllegalArgumentFault, IllegalStateFault {
-    	 String taskType = getMyTasks.getGetMyTasks().getTaskType();
-         String genericHumanRole = getMyTasks.getGetMyTasks().getGenericHumanRole();
-         String workQueue = getMyTasks.getGetMyTasks().getWorkQueue();
-         List<TStatus.Enum> status = getMyTasks.getGetMyTasks().getStatusList();
-         String whereClause = getMyTasks.getGetMyTasks().getWhereClause();
-         String createdOnClause = getMyTasks.getGetMyTasks().getCreatedOnClause();
-         Integer maxTasks = getMyTasks.getGetMyTasks().getMaxTasks();
-         Integer fromTaskNumber = getMyTasks.getGetMyTasks().getFromTaskNumber();
-         if(!getMyTasks.getGetMyTasks().isSetMaxTasks()){
-        	 maxTasks = null;
-         }
-         
-         return getMyTasks(taskType, genericHumanRole, workQueue, status, whereClause, createdOnClause, maxTasks, fromTaskNumber); 
-    }
+	/**
+	 * {@inheritDoc}
+	 */
+	public GetMyTasksResponseDocument getMyTasks(GetMyTasksDocument getMyTasks) throws IllegalArgumentFault, IllegalStateFault {
+
+		String taskType = getMyTasks.getGetMyTasks().getTaskType();
+		String genericHumanRole = getMyTasks.getGetMyTasks().getGenericHumanRole();
+		String workQueue = getMyTasks.getGetMyTasks().getWorkQueue();
+		List<TStatus.Enum> status = getMyTasks.getGetMyTasks().getStatusList();
+		String whereClause = getMyTasks.getGetMyTasks().getWhereClause();
+		String createdOnClause = getMyTasks.getGetMyTasks().getCreatedOnClause();
+		Integer maxTasks = getMyTasks.getGetMyTasks().getMaxTasks();
+		Integer fromTaskNumber = getMyTasks.getGetMyTasks().getFromTaskNumber();
+		if (!getMyTasks.getGetMyTasks().isSetMaxTasks()) {
+			maxTasks = null;
+		}
+
+		return getMyTasks(taskType, genericHumanRole, workQueue, status, whereClause, createdOnClause, maxTasks, fromTaskNumber);
+	}
     
     public GetMyTasksResponseDocument getMyTasks(String taskType, String genericHumanRole, String workQueue, List<TStatus.Enum> status, String whereClause, String createdOnClause,
             Integer maxTasks, Integer fromTaskNumber) throws IllegalArgumentFault, IllegalStateFault {
@@ -326,7 +314,7 @@ public abstract class TaskOperationsBase
      * {@inheritDoc}
      */
     public GetInputResponseDocument getInput(GetInputDocument getInput) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-//    public Object getInput(String identifier, String part) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
+
         String identifier = getInput.getGetInput().getIdentifier();
         String part = getInput.getGetInput().getPart();
 
@@ -350,7 +338,7 @@ public abstract class TaskOperationsBase
      * {@inheritDoc}
      */
     public GetOutputResponseDocument getOutput(GetOutputDocument getOutput) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-//    public Object getOutput(String identifier, String part) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
+
         String identifier = getOutput.getGetOutput().getIdentifier();
         String part = getOutput.getGetOutput().getPart();
 
@@ -373,10 +361,11 @@ public abstract class TaskOperationsBase
      * {@inheritDoc}
      */
     public StopResponseDocument stop(StopDocument stop) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-//   public void stop(String identifier) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
+
         String identifier = stop.getStop().getIdentifier();
         return stop(Long.parseLong(identifier));
     }
+
     public StopResponseDocument stop(Long id) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
         Task t = Task.load(hiseEngine, id);
         TaskChecker.checkHumanRolePermission(HumanOperationName.STOP, getUserString(), t, administrationMode);
@@ -395,13 +384,11 @@ public abstract class TaskOperationsBase
         return responseDocument;
     }
     
-
     public SuspendResponseDocument suspend(SuspendDocument suspend) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-//    public void suspend(String identifier) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
         String identifier = suspend.getSuspend().getIdentifier();
-
         return suspend(new Long(identifier));
     }
+    
     public SuspendResponseDocument suspend(Long id) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
         Task t = Task.load(hiseEngine, id);
         TaskChecker.checkHumanRolePermission(HumanOperationName.SUSPEND, getUserString(), t, administrationMode);
@@ -422,12 +409,12 @@ public abstract class TaskOperationsBase
     }
 
     public SuspendUntilResponseDocument suspendUntil(SuspendUntilDocument suspendUntil) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-//    public void suspendUntil(String identifier, TTime time) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
         String identifier = suspendUntil.getSuspendUntil().getIdentifier();
         TTime time =  suspendUntil.getSuspendUntil().getTime();
         return suspendUntil(Long.parseLong(identifier), time);
 
     }
+
     public SuspendUntilResponseDocument suspendUntil(Long id, TTime time) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
     	 Task t = Task.load(hiseEngine,id);
     	 TaskChecker.checkHumanRolePermission(HumanOperationName.SUSPEND_UNTIL, getUserString(), t, administrationMode);
@@ -457,9 +444,7 @@ public abstract class TaskOperationsBase
     }
 
     public RemoveResponseDocument remove(RemoveDocument remove) throws IllegalArgumentFault, IllegalAccessFault {
-//    public void remove(String identifier) throws IllegalAccessFault, IllegalArgumentFault {
         String identifier = remove.getRemove().getIdentifier();
-
         return remove(Long.parseLong(identifier));
     }
     
@@ -475,13 +460,14 @@ public abstract class TaskOperationsBase
 
         return responseDocument;
     }
+    
     public ResumeResponseDocument resume(ResumeDocument resume) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-//    public void resume(String identifier) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
         String identifier = resume.getResume().getIdentifier();
         return resume(Long.parseLong((identifier)));
     }
+
     public ResumeResponseDocument resume(Long id) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-    	// OrgEntity user = loadUser();
+
         Task t = Task.load(hiseEngine, id);
         TaskChecker.checkHumanRolePermission(HumanOperationName.RESUME, getUserString(), t, administrationMode);
         TaskChecker.checkStatePermission(HumanOperationName.RESUME, t);
@@ -501,7 +487,6 @@ public abstract class TaskOperationsBase
     }
     
     public GetTaskInfoResponseDocument getTaskInfo(GetTaskInfoDocument getTaskInfo) throws IllegalArgumentFault {
-//    public org.apache.hise.lang.xsd.htda.TTask getTaskInfo(String identifier) throws IllegalArgumentFault {
         String identifier = getTaskInfo.getGetTaskInfo().getIdentifier();
         return getTaskInfo(Long.parseLong(identifier));
     }
@@ -514,12 +499,11 @@ public abstract class TaskOperationsBase
         return responseDocument;
     }
     
-
     public ClaimResponseDocument claim(ClaimDocument claim) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-//    public void claim(String identifier) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
         String identifier = claim.getClaim().getIdentifier();
         return claim(new Long(identifier));
     }
+    
     public ClaimResponseDocument claim(Long id) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
         Task task = Task.load(hiseEngine, id);
         TaskChecker.checkHumanRolePermission(HumanOperationName.CLAIM, getUserString(), task, administrationMode);
@@ -542,8 +526,7 @@ public abstract class TaskOperationsBase
     }
 
     public FailResponseDocument fail(FailDocument fail) throws IllegalArgumentFault, IllegalStateFault, IllegalOperationFault, IllegalAccessFault {
-//    public void fail(String identifier, String faultName, Object faultData) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault,
-//            IllegalOperationFault {
+
         String identifier = fail.getFail().getIdentifier();
         String faultName = fail.getFail().getFaultName();
         XmlObject faultData = fail.getFail().getFaultData();
@@ -566,7 +549,7 @@ public abstract class TaskOperationsBase
     }
 
     public ForwardResponseDocument forward(ForwardDocument forward) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-//    public void forward(String identifier, TOrganizationalEntity organizationalEntity) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
+
         String identifier = forward.getForward().getIdentifier();
         TOrganizationalEntity organizationalEntity = forward.getForward().getOrganizationalEntity();
 
@@ -589,7 +572,7 @@ public abstract class TaskOperationsBase
     }
 
     public GetTaskDescriptionResponseDocument getTaskDescription(GetTaskDescriptionDocument getTaskDescription) throws IllegalArgumentFault {
-//    public String getTaskDescription(String identifier, String contentType) throws IllegalArgumentFault {
+
         String identifier = getTaskDescription.getGetTaskDescription().getIdentifier();
         String contentType = getTaskDescription.getGetTaskDescription().getContentType();
 
@@ -604,7 +587,7 @@ public abstract class TaskOperationsBase
     }
 
     public ReleaseResponseDocument release(ReleaseDocument release) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-        String identifier = release.getRelease().getIdentifier();
+       String identifier = release.getRelease().getIdentifier();
        return release( Long.parseLong(identifier));
      
     }
@@ -627,7 +610,7 @@ public abstract class TaskOperationsBase
       }
 
     public StartResponseDocument start(StartDocument start) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-//    public void start(String identifier) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
+
         String identifier = start.getStart().getIdentifier();
 
         Task t = Task.load(hiseEngine, Long.parseLong(identifier));
@@ -651,7 +634,7 @@ public abstract class TaskOperationsBase
 
 
     public CompleteResponseDocument complete(CompleteDocument complete) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-//    public void complete(String identifier, Object taskData) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
+
         String identifier = complete.getComplete().getIdentifier();
         XmlObject taskData = complete.getComplete().getTaskData();
 
@@ -674,7 +657,7 @@ public abstract class TaskOperationsBase
     }
 
     public SetOutputResponseDocument setOutput(SetOutputDocument setOutput) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-//    public void setOutput(String identifier, String part, Object taskData) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
+
         String identifier = setOutput.getSetOutput().getIdentifier();
         String part = setOutput.getSetOutput().getPart();
         XmlObject taskData = setOutput.getSetOutput().getTaskData();
@@ -700,23 +683,23 @@ public abstract class TaskOperationsBase
 	 * @param identifier task's identifier
 	 * @param text comment to add
 	 */
-    public AddCommentResponseDocument addComment(AddCommentDocument addComment) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-//	public void addComment(String identifier, String text) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
-        String identifier = addComment.getAddComment().getIdentifier();
-        String text = addComment.getAddComment().getText();
-
-	Task task = Task.load(hiseEngine, new Long(identifier));
-	TaskChecker.checkHumanRolePermission(HumanOperationName.ADD_COMMENT, getUserString(), task, administrationMode);
-	org.apache.hise.dao.Task taskDto = task.getTaskDto();
-	org.apache.hise.dao.Comment newComment = new Comment(text, taskDto, getUserString());
-	taskDto.getComments().add(newComment);
-
-        AddCommentResponseDocument responseDocument = AddCommentResponseDocument.Factory.newInstance();
-        AddCommentResponseDocument.AddCommentResponse response = AddCommentResponseDocument.AddCommentResponse.Factory.newInstance();
-        responseDocument.setAddCommentResponse(response);
+	public AddCommentResponseDocument addComment(AddCommentDocument addComment) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
 
-        return responseDocument;
-    }
+		String identifier = addComment.getAddComment().getIdentifier();
+		String text = addComment.getAddComment().getText();
+
+		Task task = Task.load(hiseEngine, new Long(identifier));
+		TaskChecker.checkHumanRolePermission(HumanOperationName.ADD_COMMENT, getUserString(), task, administrationMode);
+		org.apache.hise.dao.Task taskDto = task.getTaskDto();
+		org.apache.hise.dao.Comment newComment = new Comment(text, taskDto, getUserString());
+		taskDto.getComments().add(newComment);
+
+		AddCommentResponseDocument responseDocument = AddCommentResponseDocument.Factory.newInstance();
+		AddCommentResponseDocument.AddCommentResponse response = AddCommentResponseDocument.AddCommentResponse.Factory.newInstance();
+		responseDocument.setAddCommentResponse(response);
+
+		return responseDocument;
+	}
 
 	/**
 	 * Gets all comments of a task.
@@ -728,7 +711,7 @@ public abstract class TaskOperationsBase
 	 *  @param identifier task's identifier
 	 */
     public GetCommentsResposneDocument getComments(GetCommentsDocument getComments) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-//    public List<TComment> getComments(String identifier) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
+
         String identifier = getComments.getGetComments().getIdentifier();
         Task task = Task.load(hiseEngine, new Long(identifier));
         TaskChecker.checkHumanRolePermission(HumanOperationName.GET_COMMENTS, getUserString(), task, administrationMode);
@@ -748,17 +731,15 @@ public abstract class TaskOperationsBase
     // not started
 
     public QueryResponseDocument query(QueryDocument query) throws IllegalArgumentFault, IllegalStateFault {
-//    public TTaskQueryResultSet query(String selectClause, String whereClause, String orderByClause, Integer maxTasks, Integer taskIndexOffset)
-//            throws IllegalArgumentFault, IllegalStateFault {
         // TODO Auto-generated method stub
         return null;
     }
 
     public ActivateResponseDocument activate(ActivateDocument activate) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-//    public void activate(String identifier) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
         String identifier = activate.getActivate().getIdentifier();
         return activate(new Long(identifier));
     }
+    
     public ActivateResponseDocument activate(Long id) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
     	Task task = Task.load(hiseEngine, id);
         TaskChecker.checkHumanRolePermission(HumanOperationName.ACTIVATE, getUserString(), task, administrationMode);
@@ -781,13 +762,11 @@ public abstract class TaskOperationsBase
     }
 
     public AddAttachmentResponseDocument addAttachment(AddAttachmentDocument addAttachment) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-//    public void addAttachment(String identifier, String attachmentName, String accessType, Object attachment) throws IllegalAccessFault, IllegalStateFault,
-//            IllegalArgumentFault {
 
-        String identifier = addAttachment.getAddAttachment().getIdentifier();
-                String attachmentName = addAttachment.getAddAttachment().getName();
-                String accessType = addAttachment.getAddAttachment().getAccessType();
-                XmlObject attachment = addAttachment.getAddAttachment().getAttachment();
+		String identifier = addAttachment.getAddAttachment().getIdentifier();
+		String attachmentName = addAttachment.getAddAttachment().getName();
+		String accessType = addAttachment.getAddAttachment().getAccessType();
+		XmlObject attachment = addAttachment.getAddAttachment().getAttachment();
                 		
         Task task = Task.load(hiseEngine, new Long(identifier));
         TaskChecker.checkHumanRolePermission(HumanOperationName.ADD_ATTACHMENT, getUserString(), task, administrationMode);
@@ -799,17 +778,14 @@ public abstract class TaskOperationsBase
         newAttachment.setAttachedAt(new Date());
         newAttachment.setTask(taskDto);
         newAttachment.setUserName(getUserString());
+
         Node n,n1;
-        if(attachment.getDomNode() instanceof org.w3c.dom.Element){
-        
-        
-        	 
-        	newAttachment.setAttachment(attachment.toString());
-        }
-        else{
-        	newAttachment.setAttachment(new String(""));
-        }
-        taskDto.getAttachments().add(newAttachment);
+		if (attachment.getDomNode() instanceof org.w3c.dom.Element) {
+			newAttachment.setAttachment(attachment.toString());
+		} else {
+			newAttachment.setAttachment(new String(""));
+		}
+		taskDto.getAttachments().add(newAttachment);
 
         AddAttachmentResponseDocument responseDocument = AddAttachmentResponseDocument.Factory.newInstance();
         AddAttachmentResponseDocument.AddAttachmentResponse response = AddAttachmentResponseDocument.AddAttachmentResponse.Factory.newInstance();
@@ -820,8 +796,7 @@ public abstract class TaskOperationsBase
 
 
     public DelegateResponseDocument delegate(DelegateDocument delegate) throws RecipientNotAllowed, IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-//    public void delegate(String identifier, TOrganizationalEntity organizationalEntity) throws IllegalAccessFault, IllegalStateFault, RecipientNotAllowed,
-//            IllegalArgumentFault {
+
         String identifier = delegate.getDelegate().getIdentifier();
         TOrganizationalEntity organizationalEntity = delegate.getDelegate().getOrganizationalEntity();
 
@@ -847,7 +822,7 @@ public abstract class TaskOperationsBase
     }
     
     public DeleteAttachmentsResponseDocument deleteAttachments(DeleteAttachmentsDocument deleteAttachments) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-//    public void deleteAttachments(String identifier, String attachmentName) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
+
         String identifier = deleteAttachments.getDeleteAttachments().getIdentifier();
         String attachmentName = deleteAttachments.getDeleteAttachments().getAttachmentName();
 
@@ -880,7 +855,7 @@ public abstract class TaskOperationsBase
     }
 
     public DeleteFaultResponseDocument deleteFault(DeleteFaultDocument deleteFault) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-//    public void deleteFault(String identifier) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
+
         String identifier = deleteFault.getDeleteFault().getIdentifier();
 
     	Task task = Task.load(hiseEngine, new Long(identifier));
@@ -897,8 +872,8 @@ public abstract class TaskOperationsBase
     }
 
     public DeleteOutputResponseDocument deleteOutput(DeleteOutputDocument deleteOutput) throws IllegalArgumentFault, IllegalStateFault, IllegalAccessFault {
-//    public void deleteOutput(String identifier) throws IllegalAccessFault, IllegalStateFault, IllegalArgumentFault {
-        String identifier = deleteOutput.getDeleteOutput().getIdentifier();
+
+    	String identifier = deleteOutput.getDeleteOutput().getIdentifier();
 
     	Task task = Task.load(hiseEngine, new Long(identifier));
         TaskChecker.checkHumanRolePermission(HumanOperationName.DELETE_OUTPUT, getUserString(), task, administrationMode);

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=999822&r1=999821&r2=999822&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 Wed Sep 22 09:07:17 2010
@@ -19,149 +19,11 @@
 
 package org.apache.hise.engine.jaxws;
 
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.StringTokenizer;
-
 import javax.jws.WebService;
-import javax.xml.namespace.QName;
 import javax.xml.ws.WebServiceContext;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.hise.dao.Attachment;
-import org.apache.hise.dao.Comment;
-import org.apache.hise.dao.GenericHumanRole;
-import org.apache.hise.dao.Job;
-import org.apache.hise.dao.Task.Status;
-import org.apache.hise.dao.TaskOrgEntity;
-import org.apache.hise.dao.TaskOrgEntity.OrgEntityType;
-import org.apache.hise.dao.TaskQuery;
-import org.apache.hise.engine.HISEEngineImpl;
-import org.apache.hise.engine.TaskChecker;
-import org.apache.hise.engine.TaskChecker.HumanOperationName;
-
-import org.apache.hise.engine.wsdl.IllegalAccessFault;
-import org.apache.hise.engine.wsdl.IllegalArgumentFault;
-import org.apache.hise.engine.wsdl.IllegalOperationFault;
-import org.apache.hise.engine.wsdl.IllegalStateFault;
-
-import org.apache.hise.engine.wsdl.RecipientNotAllowed;
-
 import org.apache.hise.engine.wsdl.TaskOperations;
-
-import org.apache.hise.lang.xsd.htd.TDeadlineInfo;
-import org.apache.hise.lang.xsd.htd.TDeadlinesInfo;
-import org.apache.hise.lang.xsd.htd.TGrouplist;
-import org.apache.hise.lang.xsd.htd.TOrganizationalEntity;
-import org.apache.hise.lang.xsd.htd.TRendering;
-import org.apache.hise.lang.xsd.htd.TRenderings;
-import org.apache.hise.lang.xsd.htd.TUserlist;
-
-import org.apache.hise.lang.xsd.htda.TAttachment;
-import org.apache.hise.lang.xsd.htda.TAttachmentInfo;
-import org.apache.hise.lang.xsd.htda.TComment;
-import org.apache.hise.lang.xsd.htda.TStatus;
-import org.apache.hise.lang.xsd.htda.TTask;
-import org.apache.hise.lang.xsd.htda.TTaskAbstract;
-import org.apache.hise.lang.xsd.htdt.ActivateDocument;
-import org.apache.hise.lang.xsd.htdt.ActivateResponseDocument;
-import org.apache.hise.lang.xsd.htdt.AddAttachmentDocument;
-import org.apache.hise.lang.xsd.htdt.AddAttachmentResponseDocument;
-import org.apache.hise.lang.xsd.htdt.AddCommentDocument;
-import org.apache.hise.lang.xsd.htdt.AddCommentResponseDocument;
-import org.apache.hise.lang.xsd.htdt.ClaimDocument;
-import org.apache.hise.lang.xsd.htdt.ClaimResponseDocument;
-import org.apache.hise.lang.xsd.htdt.CompleteDocument;
-import org.apache.hise.lang.xsd.htdt.CompleteResponseDocument;
-import org.apache.hise.lang.xsd.htdt.DelegateDocument;
-import org.apache.hise.lang.xsd.htdt.DelegateResponseDocument;
-import org.apache.hise.lang.xsd.htdt.DeleteAttachmentsDocument;
-import org.apache.hise.lang.xsd.htdt.DeleteAttachmentsResponseDocument;
-import org.apache.hise.lang.xsd.htdt.DeleteFaultDocument;
-import org.apache.hise.lang.xsd.htdt.DeleteFaultResponseDocument;
-import org.apache.hise.lang.xsd.htdt.DeleteOutputDocument;
-import org.apache.hise.lang.xsd.htdt.DeleteOutputResponseDocument;
-import org.apache.hise.lang.xsd.htdt.FailDocument;
-import org.apache.hise.lang.xsd.htdt.FailResponseDocument;
-import org.apache.hise.lang.xsd.htdt.ForwardDocument;
-import org.apache.hise.lang.xsd.htdt.ForwardResponseDocument;
-import org.apache.hise.lang.xsd.htdt.GetAttachmentInfosDocument;
-import org.apache.hise.lang.xsd.htdt.GetAttachmentInfosResponseDocument;
-import org.apache.hise.lang.xsd.htdt.GetAttachmentsDocument;
-import org.apache.hise.lang.xsd.htdt.GetAttachmentsResponseDocument;
-import org.apache.hise.lang.xsd.htdt.GetCommentsDocument;
-import org.apache.hise.lang.xsd.htdt.GetCommentsResposneDocument;
-import org.apache.hise.lang.xsd.htdt.GetFaultDocument;
-import org.apache.hise.lang.xsd.htdt.GetFaultResponseDocument;
-import org.apache.hise.lang.xsd.htdt.GetInputDocument;
-import org.apache.hise.lang.xsd.htdt.GetInputResponseDocument;
-import org.apache.hise.lang.xsd.htdt.GetMyTaskAbstractsDocument;
-import org.apache.hise.lang.xsd.htdt.GetMyTaskAbstractsResponseDocument;
-import org.apache.hise.lang.xsd.htdt.GetMyTasksDocument;
-import org.apache.hise.lang.xsd.htdt.GetMyTasksResponseDocument;
-import org.apache.hise.lang.xsd.htdt.GetOutputDocument;
-import org.apache.hise.lang.xsd.htdt.GetOutputResponseDocument;
-import org.apache.hise.lang.xsd.htdt.GetRenderingDocument;
-import org.apache.hise.lang.xsd.htdt.GetRenderingResponseDocument;
-import org.apache.hise.lang.xsd.htdt.GetRenderingTypesDocument;
-import org.apache.hise.lang.xsd.htdt.GetRenderingTypesResponseDocument;
-import org.apache.hise.lang.xsd.htdt.GetTaskDescriptionDocument;
-import org.apache.hise.lang.xsd.htdt.GetTaskDescriptionResponseDocument;
-import org.apache.hise.lang.xsd.htdt.GetTaskInfoDocument;
-import org.apache.hise.lang.xsd.htdt.GetTaskInfoResponseDocument;
-import org.apache.hise.lang.xsd.htdt.NominateDocument;
-import org.apache.hise.lang.xsd.htdt.NominateResponseDocument;
-import org.apache.hise.lang.xsd.htdt.QueryDocument;
-import org.apache.hise.lang.xsd.htdt.QueryResponseDocument;
-import org.apache.hise.lang.xsd.htdt.ReleaseDocument;
-import org.apache.hise.lang.xsd.htdt.ReleaseResponseDocument;
-import org.apache.hise.lang.xsd.htdt.RemoveDocument;
-import org.apache.hise.lang.xsd.htdt.RemoveResponseDocument;
-import org.apache.hise.lang.xsd.htdt.ResumeDocument;
-import org.apache.hise.lang.xsd.htdt.ResumeResponseDocument;
-import org.apache.hise.lang.xsd.htdt.SetFaultDocument;
-import org.apache.hise.lang.xsd.htdt.SetFaultResponseDocument;
-import org.apache.hise.lang.xsd.htdt.SetGenericHumanRoleDocument;
-import org.apache.hise.lang.xsd.htdt.SetGenericHumanRoleResponseDocument;
-import org.apache.hise.lang.xsd.htdt.SetOutputDocument;
-import org.apache.hise.lang.xsd.htdt.SetOutputResponseDocument;
-import org.apache.hise.lang.xsd.htdt.SetPriorityDocument;
-import org.apache.hise.lang.xsd.htdt.SetPriorityResponseDocument;
-import org.apache.hise.lang.xsd.htdt.SkipDocument;
-import org.apache.hise.lang.xsd.htdt.SkipResponseDocument;
-import org.apache.hise.lang.xsd.htdt.StartDocument;
-import org.apache.hise.lang.xsd.htdt.StartResponseDocument;
-import org.apache.hise.lang.xsd.htdt.StopDocument;
-import org.apache.hise.lang.xsd.htdt.StopResponseDocument;
-import org.apache.hise.lang.xsd.htdt.SuspendDocument;
-import org.apache.hise.lang.xsd.htdt.SuspendResponseDocument;
-import org.apache.hise.lang.xsd.htdt.SuspendUntilDocument;
-import org.apache.hise.lang.xsd.htdt.SuspendUntilResponseDocument;
-
-import org.apache.hise.lang.xsd.htdt.TTime;
-import org.apache.hise.runtime.HiseIllegalAccessException;
-import org.apache.hise.runtime.HiseIllegalStateException;
-import org.apache.hise.runtime.Task;
-import org.apache.hise.runtime.TaskEvaluator;
-import org.apache.hise.utils.DOMUtils;
-import org.apache.ws.commons.schema.utils.DOMUtil;
-import org.apache.xmlbeans.GDate;
-import org.apache.xmlbeans.GDuration;
-import org.apache.xmlbeans.XmlException;
-import org.apache.xmlbeans.XmlObject;
 import org.springframework.transaction.annotation.Transactional;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.apache.xmlbeans.XmlString;
 
 /**
  * Implementation of WS-HT API. Operations are executed by end users, i.e.
@@ -177,8 +39,7 @@ import org.apache.xmlbeans.XmlString;
  */
 @Transactional
 @WebService
-public class TaskOperationsImpl extends TaskOperationsBaseImpl implements
-		TaskOperations {
+public class TaskOperationsImpl extends TaskOperationsBaseImpl implements TaskOperations {
 
 	@Override
 	protected String getUserString() {

Modified: incubator/hise/trunk/hise-services/src/main/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/resources/META-INF/persistence.xml?rev=999822&r1=999821&r2=999822&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/resources/META-INF/persistence.xml (original)
+++ incubator/hise/trunk/hise-services/src/main/resources/META-INF/persistence.xml Wed Sep 22 09:07:17 2010
@@ -12,7 +12,6 @@
     <class>org.apache.hise.dao.Message</class>
     <class>org.apache.hise.dao.OrgEntity</class>
     <class>org.apache.hise.dao.TaskOrgEntity</class>
-    <class>org.apache.hise.dao.PresentationParameter</class>
     <class>org.apache.hise.dao.Task</class>
     <class>org.apache.hise.dao.Job</class>
     <class>org.apache.hise.dao.TaskHistoryMessage</class>

Modified: incubator/hise/trunk/hise-services/src/main/resources/org/apache/hise/persistence.xml
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-services/src/main/resources/org/apache/hise/persistence.xml?rev=999822&r1=999821&r2=999822&view=diff
==============================================================================
--- incubator/hise/trunk/hise-services/src/main/resources/org/apache/hise/persistence.xml (original)
+++ incubator/hise/trunk/hise-services/src/main/resources/org/apache/hise/persistence.xml Wed Sep 22 09:07:17 2010
@@ -12,10 +12,9 @@
     <class>org.apache.hise.dao.Message</class>
     <class>org.apache.hise.dao.OrgEntity</class>
     <class>org.apache.hise.dao.TaskOrgEntity</class>
-    <class>org.apache.hise.dao.PresentationParameter</class>
     <class>org.apache.hise.dao.Task</class>
     <class>org.apache.hise.dao.Job</class>
-     <class>org.apache.hise.dao.TaskHistoryMessage</class>
+    <class>org.apache.hise.dao.TaskHistoryMessage</class>
     <exclude-unlisted-classes/>
 
     <!--  OpenJPA & HSQL -->
@@ -27,8 +26,7 @@
       <property name="openjpa.ConnectionPassword" value=""/>
       <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema"/>
       <property name="openjpa.Log" value="commons"/>
-        value="DefaultLevel=INFO, Runtime=TRACE, Tool=INFO,
-SQL=TRACE" /> 
+        value="DefaultLevel=INFO, Runtime=TRACE, Tool=INFO, SQL=TRACE" /> 
       <property name="openjpa.ConnectionFactoryProperties" value="PrettyPrint=true, PrettyPrintLineLength=72"/>
     </properties>
      -->

Modified: incubator/hise/trunk/hise-ws-client/src/main/java/org/apache/hise/wsclient/facade/FilterCriteria.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-ws-client/src/main/java/org/apache/hise/wsclient/facade/FilterCriteria.java?rev=999822&r1=999821&r2=999822&view=diff
==============================================================================
--- incubator/hise/trunk/hise-ws-client/src/main/java/org/apache/hise/wsclient/facade/FilterCriteria.java (original)
+++ incubator/hise/trunk/hise-ws-client/src/main/java/org/apache/hise/wsclient/facade/FilterCriteria.java Wed Sep 22 09:07:17 2010
@@ -5,6 +5,7 @@ import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
+import org.apache.hise.wsclient.infrastructure.Tasks;
 import org.apache.hise.wsclient.model.enums.HumanRole;
 import org.apache.hise.wsclient.model.enums.Status;
 
@@ -25,6 +26,12 @@ public class FilterCriteria implements S
 
 	private Date completeByEndDate;
 	
+	private String orderBy;
+	
+	private Integer maxTasks = Tasks.MAX_TASKS;
+	
+	private Integer fromTask = 0;
+	
 	public HumanRole getGenericHumanRole() {
 		return humanRole;
 	}
@@ -72,5 +79,29 @@ public class FilterCriteria implements S
 	public Date getCompleteByEndDate() {
 	    return completeByEndDate;
     }
+
+	public void setOrderBy(String orderBy) {
+	    this.orderBy = orderBy;
+    }
+
+	public String getOrderBy() {
+	    return orderBy;
+    }
+
+	public void setMaxTasks(Integer maxTasks) {
+	    this.maxTasks = maxTasks;
+    }
+
+	public Integer getMaxTasks() {
+	    return maxTasks;
+    }
+
+	public void setFromTask(Integer fromTask) {
+	    this.fromTask = fromTask;
+    }
+
+	public Integer getFromTask() {
+	    return fromTask;
+    }
 	
 }

Modified: incubator/hise/trunk/hise-ws-client/src/main/java/org/apache/hise/wsclient/facade/HiseApiFacadeImpl.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-ws-client/src/main/java/org/apache/hise/wsclient/facade/HiseApiFacadeImpl.java?rev=999822&r1=999821&r2=999822&view=diff
==============================================================================
--- incubator/hise/trunk/hise-ws-client/src/main/java/org/apache/hise/wsclient/facade/HiseApiFacadeImpl.java (original)
+++ incubator/hise/trunk/hise-ws-client/src/main/java/org/apache/hise/wsclient/facade/HiseApiFacadeImpl.java Wed Sep 22 09:07:17 2010
@@ -38,21 +38,24 @@ public class HiseApiFacadeImpl implement
 		HumanRole humanRole = filterCriteria.getGenericHumanRole();
 		List<Status> statuses = filterCriteria.getStatuses();		
 		String workingQueue = filterCriteria.getWorkingQueue();
+		String orderBy = filterCriteria.getOrderBy();
+		Integer maxTasks = filterCriteria.getMaxTasks();
+		Integer fromTask = filterCriteria.getFromTask();
 		
 		try {
 			
 			tasks.clear();
 
 			if (humanRole == null) {
-				tasks.retrieve(null, statuses);
+				tasks.retrieve(null, statuses, orderBy, maxTasks, fromTask);
 			}
 					
 			if (humanRole != null && workingQueue == null) {
-				tasks.retrieve(humanRole, statuses);
+				tasks.retrieve(humanRole, statuses, orderBy, maxTasks, fromTask);
 			}
 			
 			if (humanRole != null && workingQueue != null) {
-				tasks.retrieve(humanRole, workingQueue, statuses);
+				tasks.retrieve(humanRole, workingQueue, statuses, orderBy, maxTasks, fromTask);
 			}
 
 		} catch (Exception e) {
@@ -78,7 +81,7 @@ public class HiseApiFacadeImpl implement
 		try {
 			
 			TTask task = service.getTaskInfo(taskId);
-			String description = service.getTaskDescription(taskId, null);
+			String description = service.getTaskDescription(taskId, "text/plain");
 			Task taskDto = taskConverter.buildTask(task);
 			taskDto.setPresentationDescription(description);
 			

Modified: incubator/hise/trunk/hise-ws-client/src/main/java/org/apache/hise/wsclient/infrastructure/Tasks.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-ws-client/src/main/java/org/apache/hise/wsclient/infrastructure/Tasks.java?rev=999822&r1=999821&r2=999822&view=diff
==============================================================================
--- incubator/hise/trunk/hise-ws-client/src/main/java/org/apache/hise/wsclient/infrastructure/Tasks.java (original)
+++ incubator/hise/trunk/hise-ws-client/src/main/java/org/apache/hise/wsclient/infrastructure/Tasks.java Wed Sep 22 09:07:17 2010
@@ -43,15 +43,15 @@ public class Tasks extends ArrayList<Tas
 		this.service = service;
 	}
 	
-	public void retrieve(HumanRole humanRole, List<Status> statuses) throws IllegalArgumentFault, IllegalStateFault {
+	public void retrieve(HumanRole humanRole, List<Status> statuses, String orderBy, Integer maxTasks, Integer fromTask) throws IllegalArgumentFault, IllegalStateFault {
 		List<TStatus> tStatuses = convertStatuses(statuses);
-		List<TTask> myTasks = this.service.getMyTasks("ALL", humanRole == null ? null : humanRole.hiseName(), null, tStatuses, null, null, MAX_TASKS);
+		List<TTask> myTasks = this.service.getMyTasks("ALL", humanRole == null ? null : humanRole.hiseName(), null, tStatuses, null, orderBy, null, maxTasks, fromTask);
 		refreshAll(myTasks);
 	}
 	
-	public void retrieve(HumanRole humanRole, String workingQueue, List<Status> statuses) throws IllegalArgumentFault, IllegalStateFault {
+	public void retrieve(HumanRole humanRole, String workingQueue, List<Status> statuses, String orderBy, Integer maxTasks, Integer fromTask) throws IllegalArgumentFault, IllegalStateFault {
 		List<TStatus> tStatuses = convertStatuses(statuses);
-		List<TTask> myTasks = this.service.getMyTasks("ALL", humanRole == null ? null : humanRole.hiseName(), workingQueue, tStatuses, null, null, MAX_TASKS);
+		List<TTask> myTasks = this.service.getMyTasks("ALL", humanRole == null ? null : humanRole.hiseName(), workingQueue, tStatuses, null, orderBy, null, maxTasks, fromTask);
 		refreshAll(myTasks);
 	}
 	

Modified: incubator/hise/trunk/hise-ws-client/src/main/resources/wsdls/ws-humantask-api-wsdl.xsd
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-ws-client/src/main/resources/wsdls/ws-humantask-api-wsdl.xsd?rev=999822&r1=999821&r2=999822&view=diff
==============================================================================
--- incubator/hise/trunk/hise-ws-client/src/main/resources/wsdls/ws-humantask-api-wsdl.xsd (original)
+++ incubator/hise/trunk/hise-ws-client/src/main/resources/wsdls/ws-humantask-api-wsdl.xsd Wed Sep 22 09:07:17 2010
@@ -14,7 +14,8 @@ Business Machines Corporation, Oracle In
   <xsd:import namespace="http://www.example.org/WS-HT/api"
     schemaLocation="ws-humantask-api.xsd" />
   <xsd:import namespace="http://www.example.org/WS-HT"
-    schemaLocation="ws-humantask.xsd" />
+  schemaLocation="ws-humantask.xsd" />
+  
   <xsd:element name="claim">
     <xsd:complexType>
       <xsd:sequence>
@@ -548,9 +549,14 @@ Business Machines Corporation, Oracle In
         maxOccurs="unbounded" />
       <xsd:element name="whereClause" type="xsd:string"
         minOccurs="0" />
+      <xsd:element name="orderByClause" type="xsd:string"
+        minOccurs="0" />
       <xsd:element name="createdOnClause" type="xsd:string"
         minOccurs="0" />
       <xsd:element name="maxTasks" type="xsd:int" minOccurs="0" />
+      <xsd:element minOccurs="0" default="0" type="xsd:int"  name="fromTaskNumber">
+        
+      </xsd:element>
     </xsd:sequence>
   </xsd:complexType>
 </xsd:element>
@@ -572,11 +578,15 @@ Business Machines Corporation, Oracle In
       <xsd:element name="status" type="api:tStatus" minOccurs="0"
         maxOccurs="unbounded" />
       <xsd:element name="whereClause" type="xsd:string"
-                          
+        minOccurs="0" />
+      <xsd:element name="orderByClause" type="xsd:string"
         minOccurs="0" />
       <xsd:element name="createdOnClause" type="xsd:string"
         minOccurs="0" />
       <xsd:element name="maxTasks" type="xsd:int" minOccurs="0" />
+      <xsd:element minOccurs="0" type="xsd:int" name="fromTaskNumber" default="0">
+        
+      </xsd:element>
     </xsd:sequence>
   </xsd:complexType>
 </xsd:element>

Modified: incubator/hise/trunk/hise-ws-client/src/test/java/org/apache/hise/api/client/facade/HiseApiFacadeUnitTest.java
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-ws-client/src/test/java/org/apache/hise/api/client/facade/HiseApiFacadeUnitTest.java?rev=999822&r1=999821&r2=999822&view=diff
==============================================================================
--- incubator/hise/trunk/hise-ws-client/src/test/java/org/apache/hise/api/client/facade/HiseApiFacadeUnitTest.java (original)
+++ incubator/hise/trunk/hise-ws-client/src/test/java/org/apache/hise/api/client/facade/HiseApiFacadeUnitTest.java Wed Sep 22 09:07:17 2010
@@ -28,7 +28,6 @@ import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 
-
 @RunWith(MockitoJUnitRunner.class)
 public class HiseApiFacadeUnitTest {
 
@@ -48,7 +47,7 @@ public class HiseApiFacadeUnitTest {
     	HiseApiFacade hiseApiFacade = buildHiseApiFacade();
     	
     	when(hiseInterface.getMyTasks(eq("ALL"), anyString(), anyString(), anyListOf(TStatus.class), 
-    			anyString(), anyString(), eq(Tasks.MAX_TASKS))).thenReturn(wsTasks);
+    			anyString(), anyString(), anyString(), eq(Tasks.MAX_TASKS), eq(Integer.valueOf(0)))).thenReturn(wsTasks);
     	
     	//when
     	List<Task> tasks = hiseApiFacade.getMyTasks(USER, PASSWORD, new FilterCriteria());
@@ -67,7 +66,7 @@ public class HiseApiFacadeUnitTest {
     	HiseApiFacade hiseApiFacade = buildHiseApiFacade();
     	
     	when(hiseInterface.getMyTasks(eq("ALL"), anyString(), anyString(), anyListOf(TStatus.class), 
-    			anyString(), anyString(), eq(Tasks.MAX_TASKS))).thenReturn(wsTasks);
+    			anyString(), anyString(), anyString(), eq(Tasks.MAX_TASKS), eq(0))).thenReturn(wsTasks);
     	
     	FilterCriteria fc = new FilterCriteria();
     	fc.setPriority(2);

Modified: incubator/hise/trunk/hise-wsdl/src/main/resources/ws-humantask-api-wsdl.xsd
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/hise-wsdl/src/main/resources/ws-humantask-api-wsdl.xsd?rev=999822&r1=999821&r2=999822&view=diff
==============================================================================
--- incubator/hise/trunk/hise-wsdl/src/main/resources/ws-humantask-api-wsdl.xsd (original)
+++ incubator/hise/trunk/hise-wsdl/src/main/resources/ws-humantask-api-wsdl.xsd Wed Sep 22 09:07:17 2010
@@ -549,6 +549,8 @@ Business Machines Corporation, Oracle In
         maxOccurs="unbounded" />
       <xsd:element name="whereClause" type="xsd:string"
         minOccurs="0" />
+      <xsd:element name="orderByClause" type="xsd:string"
+        minOccurs="0" />
       <xsd:element name="createdOnClause" type="xsd:string"
         minOccurs="0" />
       <xsd:element name="maxTasks" type="xsd:int" minOccurs="0" />
@@ -576,7 +578,8 @@ Business Machines Corporation, Oracle In
       <xsd:element name="status" type="api:tStatus" minOccurs="0"
         maxOccurs="unbounded" />
       <xsd:element name="whereClause" type="xsd:string"
-                          
+        minOccurs="0" />
+      <xsd:element name="orderByClause" type="xsd:string"
         minOccurs="0" />
       <xsd:element name="createdOnClause" type="xsd:string"
         minOccurs="0" />



Mime
View raw message