summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVikas Mishra2012-03-26 07:28:50 (EDT)
committer Manik Kishore2012-06-19 07:23:43 (EDT)
commit16b8ee6a9437bf7705b8fb51a3d8b13a3826c444 (patch)
tree094fe1f74a07dd3f9ee31237ffa27c484608cc86
parentc00e8442383fe3b9bd3939350994293f9ffa2707 (diff)
downloadorg.eclipse.stardust.ui.web-16b8ee6a9437bf7705b8fb51a3d8b13a3826c444.zip
org.eclipse.stardust.ui.web-16b8ee6a9437bf7705b8fb51a3d8b13a3826c444.tar.gz
org.eclipse.stardust.ui.web-16b8ee6a9437bf7705b8fb51a3d8b13a3826c444.tar.bz2
Jira-ID: CRNT-24322
added method for delegate to ParticipantInfo git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@54909 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/dialogs/DelegationBean.java7
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/dialogs/DelegationHandlerBean.java16
-rw-r--r--views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/dialogs/IDelegationHandler.java4
3 files changed, 21 insertions, 6 deletions
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/dialogs/DelegationBean.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/dialogs/DelegationBean.java
index 4436ece..40d8c13 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/dialogs/DelegationBean.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/dialogs/DelegationBean.java
@@ -35,6 +35,7 @@ import org.eclipse.stardust.engine.api.dto.DepartmentDetails;
import org.eclipse.stardust.engine.api.model.ModelParticipant;
import org.eclipse.stardust.engine.api.model.Organization;
import org.eclipse.stardust.engine.api.model.Participant;
+import org.eclipse.stardust.engine.api.model.ParticipantInfo;
import org.eclipse.stardust.engine.api.model.Role;
import org.eclipse.stardust.engine.api.query.UserGroups;
import org.eclipse.stardust.engine.api.query.Users;
@@ -174,7 +175,7 @@ public class DelegationBean extends PopupUIComponentBean
DepartmentInfo deptInfo = (DepartmentInfo) obj;
department = SessionContext.findSessionContext().getServiceFactory().getAdministrationService().getDepartment(
deptInfo.getOID());
- }
+ }
Map<String, Object> params = CollectionUtils.newMap();
params.put(NOTE_ENABLED, Boolean.valueOf(notesEnabled));
@@ -240,6 +241,10 @@ public class DelegationBean extends PopupUIComponentBean
{
delegatedActivities = delHandler.delegateActivities(ais, department, params);
}
+ else if (null != obj && obj instanceof ParticipantInfo)
+ {
+ delegatedActivities = delHandler.delegateActivities(ais, (ParticipantInfo) obj, params);
+ }
else
{
// If a participant is selected add a INFO message.
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/dialogs/DelegationHandlerBean.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/dialogs/DelegationHandlerBean.java
index 56ab3e1..c1bc24f 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/dialogs/DelegationHandlerBean.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/dialogs/DelegationHandlerBean.java
@@ -65,11 +65,17 @@ public class DelegationHandlerBean implements IDelegationHandler
public List<ActivityInstance> delegateActivities(List<ActivityInstance> activities, Participant toParticipant,
Map<String, Object> params) throws FacesException
{
- if (toParticipant != null && activities != null)
+ return delegateActivities(activities, (ParticipantInfo) toParticipant, params);
+ }
+
+ public List<ActivityInstance> delegateActivities(List<ActivityInstance> activities,
+ ParticipantInfo toParticipantInfo, Map<String, Object> params) throws FacesException
+ {
+ if (toParticipantInfo != null && activities != null)
{
try
{
- return delegateActivitiesToParticipant(activities, toParticipant, params);
+ return delegateActivitiesToParticipant(activities, toParticipantInfo, params);
}
catch (Exception e)
{
@@ -91,8 +97,8 @@ public class DelegationHandlerBean implements IDelegationHandler
}
return null;
- }
-
+ }
+
public List<ActivityInstance> delegateActivities(List<ActivityInstance> activities, Department department,
Map<String, Object> params) throws FacesException
{
@@ -236,7 +242,7 @@ public class DelegationHandlerBean implements IDelegationHandler
}
protected List<ActivityInstance> delegateActivitiesToParticipant(
- List<ActivityInstance> activityInstanceOids, Participant participant,
+ List<ActivityInstance> activityInstanceOids, ParticipantInfo participant,
Map<String, Object> params)
{
List<ActivityInstance> delegatedActivities = CollectionUtils.newList();
diff --git a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/dialogs/IDelegationHandler.java b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/dialogs/IDelegationHandler.java
index ee71412..54139ef 100644
--- a/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/dialogs/IDelegationHandler.java
+++ b/views-common/src/main/java/org/eclipse/stardust/ui/web/viewscommon/dialogs/IDelegationHandler.java
@@ -17,6 +17,7 @@ import java.util.Map;
import javax.faces.FacesException;
import org.eclipse.stardust.engine.api.model.Participant;
+import org.eclipse.stardust.engine.api.model.ParticipantInfo;
import org.eclipse.stardust.engine.api.runtime.ActivityInstance;
import org.eclipse.stardust.engine.api.runtime.Department;
@@ -28,4 +29,7 @@ public interface IDelegationHandler extends Serializable
public List<ActivityInstance> delegateActivities(List<ActivityInstance> activities, Department toDepartment,
Map<String, Object> params) throws FacesException;
+
+ public List<ActivityInstance> delegateActivities(List<ActivityInstance> activities,
+ ParticipantInfo toParticipantInfo, Map<String, Object> params) throws FacesException;
} \ No newline at end of file