1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kew.api.action;
17
18 import org.apache.commons.lang.StringUtils;
19 import org.joda.time.DateTime;
20 import org.kuali.rice.core.api.CoreConstants;
21 import org.kuali.rice.core.api.delegation.DelegationType;
22 import org.kuali.rice.core.api.mo.AbstractDataTransferObject;
23 import org.kuali.rice.core.api.mo.ModelBuilder;
24 import org.kuali.rice.core.api.util.jaxb.DateTimeAdapter;
25 import org.kuali.rice.kew.api.KewApiConstants;
26 import org.w3c.dom.Element;
27
28 import javax.xml.bind.annotation.XmlAccessType;
29 import javax.xml.bind.annotation.XmlAccessorType;
30 import javax.xml.bind.annotation.XmlAnyElement;
31 import javax.xml.bind.annotation.XmlElement;
32 import javax.xml.bind.annotation.XmlElementWrapper;
33 import javax.xml.bind.annotation.XmlRootElement;
34 import javax.xml.bind.annotation.XmlType;
35 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
36 import java.io.Serializable;
37 import java.util.ArrayList;
38 import java.util.Collection;
39 import java.util.Collections;
40 import java.util.List;
41
42 @XmlRootElement(name = ActionRequest.Constants.ROOT_ELEMENT_NAME)
43 @XmlAccessorType(XmlAccessType.NONE)
44 @XmlType(name = ActionRequest.Constants.TYPE_NAME, propOrder = {
45 ActionRequest.Elements.ID,
46 ActionRequest.Elements.ACTION_REQUESTED_CODE,
47 ActionRequest.Elements.STATUS_CODE,
48 ActionRequest.Elements.CURRENT,
49 ActionRequest.Elements.DATE_CREATED,
50 ActionRequest.Elements.RESPONSIBILITY_ID,
51 ActionRequest.Elements.DOCUMENT_ID,
52 ActionRequest.Elements.PRIORITY,
53 ActionRequest.Elements.ROUTE_LEVEL,
54 ActionRequest.Elements.ANNOTATION,
55 ActionRequest.Elements.RECIPIENT_TYPE_CODE,
56 ActionRequest.Elements.PRINCIPAL_ID,
57 ActionRequest.Elements.GROUP_ID,
58 ActionRequest.Elements.REQUEST_POLICY_CODE,
59 ActionRequest.Elements.RESPONSIBILITY_DESCRIPTION,
60 ActionRequest.Elements.FORCE_ACTION,
61 ActionRequest.Elements.DELEGATION_TYPE_CODE,
62 ActionRequest.Elements.ROLE_NAME,
63 ActionRequest.Elements.QUALIFIED_ROLE_NAME,
64 ActionRequest.Elements.QUALIFIED_ROLE_NAME_LABEL,
65 ActionRequest.Elements.ROUTE_NODE_INSTANCE_ID,
66 ActionRequest.Elements.NODE_NAME,
67 ActionRequest.Elements.REQUEST_LABEL,
68 ActionRequest.Elements.PARENT_ACTION_REQUEST_ID,
69 ActionRequest.Elements.ACTION_TAKEN,
70 ActionRequest.Elements.CHILD_REQUESTS,
71 CoreConstants.CommonElements.FUTURE_ELEMENTS
72 })
73 public final class ActionRequest extends AbstractDataTransferObject implements ActionRequestContract {
74
75 private static final long serialVersionUID = -7581089059447119201L;
76
77 @XmlElement(name = Elements.ID, required = true)
78 private final String id;
79
80 @XmlElement(name = Elements.ACTION_REQUESTED_CODE, required = true)
81 private final String actionRequestedCode;
82
83 @XmlElement(name = Elements.STATUS_CODE, required = true)
84 private final String statusCode;
85
86 @XmlElement(name = Elements.CURRENT, required = true)
87 private final boolean current;
88
89 @XmlElement(name = Elements.DATE_CREATED, required = true)
90 @XmlJavaTypeAdapter(DateTimeAdapter.class)
91 private final DateTime dateCreated;
92
93 @XmlElement(name = Elements.RESPONSIBILITY_ID, required = true)
94 private final String responsibilityId;
95
96 @XmlElement(name = Elements.DOCUMENT_ID, required = true)
97 private final String documentId;
98
99 @XmlElement(name = Elements.PRIORITY, required = true)
100 private final int priority;
101
102 @XmlElement(name = Elements.ROUTE_LEVEL, required = true)
103 private final int routeLevel;
104
105 @XmlElement(name = Elements.ANNOTATION, required = false)
106 private final String annotation;
107
108 @XmlElement(name = Elements.RECIPIENT_TYPE_CODE, required = true)
109 private final String recipientTypeCode;
110
111 @XmlElement(name = Elements.PRINCIPAL_ID, required = false)
112 private final String principalId;
113
114 @XmlElement(name = Elements.GROUP_ID, required = false)
115 private final String groupId;
116
117 @XmlElement(name = Elements.REQUEST_POLICY_CODE, required = false)
118 private final String requestPolicyCode;
119
120 @XmlElement(name = Elements.RESPONSIBILITY_DESCRIPTION, required = false)
121 private final String responsibilityDescription;
122
123 @XmlElement(name = Elements.FORCE_ACTION, required = true)
124 private final boolean forceAction;
125
126 @XmlElement(name = Elements.DELEGATION_TYPE_CODE, required = false)
127 private final String delegationTypeCode;
128
129 @XmlElement(name = Elements.ROLE_NAME, required = false)
130 private final String roleName;
131
132 @XmlElement(name = Elements.QUALIFIED_ROLE_NAME, required = false)
133 private final String qualifiedRoleName;
134
135 @XmlElement(name = Elements.QUALIFIED_ROLE_NAME_LABEL, required = false)
136 private final String qualifiedRoleNameLabel;
137
138 @XmlElement(name = Elements.ROUTE_NODE_INSTANCE_ID, required = false)
139 private final String routeNodeInstanceId;
140
141 @XmlElement(name = Elements.NODE_NAME, required = false)
142 private final String nodeName;
143
144 @XmlElement(name = Elements.REQUEST_LABEL, required = false)
145 private final String requestLabel;
146
147 @XmlElement(name = Elements.PARENT_ACTION_REQUEST_ID, required = false)
148 private final String parentActionRequestId;
149
150 @XmlElement(name = Elements.ACTION_TAKEN, required = false)
151 private final ActionTaken actionTaken;
152
153 @XmlElementWrapper(name = Elements.CHILD_REQUESTS, required = false)
154 @XmlElement(name = Elements.CHILD_REQUEST, required = false)
155 private final List<ActionRequest> childRequests;
156
157 @SuppressWarnings("unused")
158 @XmlAnyElement
159 private final Collection<Element> _futureElements = null;
160
161
162
163
164 private ActionRequest() {
165 this.id = null;
166 this.actionRequestedCode = null;
167 this.statusCode = null;
168 this.current = false;
169 this.dateCreated = null;
170 this.responsibilityId = null;
171 this.documentId = null;
172 this.priority = 0;
173 this.routeLevel = 0;
174 this.annotation = null;
175 this.recipientTypeCode = null;
176 this.principalId = null;
177 this.groupId = null;
178 this.requestPolicyCode = null;
179 this.responsibilityDescription = null;
180 this.forceAction = false;
181 this.delegationTypeCode = null;
182 this.roleName = null;
183 this.qualifiedRoleName = null;
184 this.qualifiedRoleNameLabel = null;
185 this.routeNodeInstanceId = null;
186 this.nodeName = null;
187 this.requestLabel = null;
188 this.parentActionRequestId = null;
189 this.actionTaken = null;
190 this.childRequests = null;
191 }
192
193 private ActionRequest(Builder builder) {
194 this.id = builder.getId();
195 this.actionRequestedCode = builder.getActionRequested().getCode();
196 this.statusCode = builder.getStatus().getCode();
197 this.current = builder.isCurrent();
198 this.dateCreated = builder.getDateCreated();
199 this.responsibilityId = builder.getResponsibilityId();
200 this.documentId = builder.getDocumentId();
201 this.priority = builder.getPriority();
202 this.routeLevel = builder.getRouteLevel();
203 this.annotation = builder.getAnnotation();
204 this.recipientTypeCode = builder.getRecipientType().getCode();
205 this.principalId = builder.getPrincipalId();
206 this.groupId = builder.getGroupId();
207 if (builder.getRequestPolicy() == null) {
208 this.requestPolicyCode = null;
209 } else {
210 this.requestPolicyCode = builder.getRequestPolicy().getCode();
211 }
212 this.responsibilityDescription = builder.getResponsibilityDescription();
213 this.forceAction = builder.isForceAction();
214 if (builder.getDelegationType() == null) {
215 this.delegationTypeCode = null;
216 } else {
217 this.delegationTypeCode = builder.getDelegationType().getCode();
218 }
219 this.roleName = builder.getRoleName();
220 this.qualifiedRoleName = builder.getQualifiedRoleName();
221 this.qualifiedRoleNameLabel = builder.getQualifiedRoleNameLabel();
222 this.routeNodeInstanceId = builder.getRouteNodeInstanceId();
223 this.nodeName = builder.getNodeName();
224 this.requestLabel = builder.getRequestLabel();
225 this.parentActionRequestId = builder.getParentActionRequestId();
226 ActionTaken.Builder actionTakenBuilder = builder.getActionTaken();
227 if (actionTakenBuilder == null) {
228 this.actionTaken = null;
229 } else {
230 this.actionTaken = actionTakenBuilder.build();
231 }
232 this.childRequests = new ArrayList<ActionRequest>();
233 List<ActionRequest.Builder> childRequestBuilders = builder.getChildRequests();
234 if (childRequestBuilders != null) {
235 for (ActionRequest.Builder childRequestBuilder : childRequestBuilders) {
236 this.childRequests.add(childRequestBuilder.build());
237 }
238 }
239 }
240
241 @Override
242 public String getAnnotation() {
243 return this.annotation;
244 }
245
246 @Override
247 public int getPriority() {
248 return this.priority;
249 }
250
251 @Override
252 public int getRouteLevel() {
253 return this.routeLevel;
254 }
255
256 @Override
257 public String getId() {
258 return this.id;
259 }
260
261 @Override
262 public ActionRequestType getActionRequested() {
263 return ActionRequestType.fromCode(this.actionRequestedCode);
264 }
265
266 @Override
267 public ActionRequestStatus getStatus() {
268 return ActionRequestStatus.fromCode(this.statusCode);
269 }
270
271 @Override
272 public boolean isCurrent() {
273 return this.current;
274 }
275
276 @Override
277 public DateTime getDateCreated() {
278 return this.dateCreated;
279 }
280
281 @Override
282 public String getResponsibilityId() {
283 return this.responsibilityId;
284 }
285
286 @Override
287 public String getDocumentId() {
288 return this.documentId;
289 }
290
291 @Override
292 public RecipientType getRecipientType() {
293 return RecipientType.fromCode(this.recipientTypeCode);
294 }
295
296 @Override
297 public String getPrincipalId() {
298 return this.principalId;
299 }
300
301 @Override
302 public String getGroupId() {
303 return this.groupId;
304 }
305
306 @Override
307 public ActionRequestPolicy getRequestPolicy() {
308 if (this.requestPolicyCode == null) {
309 return null;
310 }
311 return ActionRequestPolicy.fromCode(this.requestPolicyCode);
312 }
313
314 @Override
315 public String getResponsibilityDescription() {
316 return this.responsibilityDescription;
317 }
318
319 @Override
320 public boolean isForceAction() {
321 return this.forceAction;
322 }
323
324 @Override
325 public DelegationType getDelegationType() {
326 if (this.delegationTypeCode == null) {
327 return null;
328 }
329 return DelegationType.fromCode(this.delegationTypeCode);
330 }
331
332 @Override
333 public String getRoleName() {
334 return this.roleName;
335 }
336
337 @Override
338 public String getQualifiedRoleName() {
339 return this.qualifiedRoleName;
340 }
341
342 @Override
343 public String getQualifiedRoleNameLabel() {
344 return this.qualifiedRoleNameLabel;
345 }
346
347 @Override
348 public String getRouteNodeInstanceId() {
349 return this.routeNodeInstanceId;
350 }
351
352 @Override
353 public String getNodeName() {
354 return this.nodeName;
355 }
356
357 @Override
358 public String getRequestLabel() {
359 return this.requestLabel;
360 }
361
362 @Override
363 public String getParentActionRequestId() {
364 return this.parentActionRequestId;
365 }
366
367 @Override
368 public ActionTaken getActionTaken() {
369 return this.actionTaken;
370 }
371
372 @Override
373 public List<ActionRequest> getChildRequests() {
374 if (this.childRequests == null) {
375 return Collections.emptyList();
376 } else {
377 return Collections.unmodifiableList(this.childRequests);
378 }
379 }
380
381 public boolean isAdHocRequest() {
382 return KewApiConstants.ADHOC_REQUEST_RESPONSIBILITY_ID.equals(getResponsibilityId());
383 }
384
385 public boolean isGeneratedRequest() {
386 return KewApiConstants.MACHINE_GENERATED_RESPONSIBILITY_ID.equals(getResponsibilityId());
387 }
388
389 public boolean isExceptionRequest() {
390 return KewApiConstants.EXCEPTION_REQUEST_RESPONSIBILITY_ID.equals(getResponsibilityId());
391 }
392
393 public boolean isRouteModuleRequest() {
394 return getResponsibilityId() != null && Long.parseLong(getResponsibilityId()) > 0;
395 }
396
397 public boolean isNotificationRequest() {
398 return isAcknowledgeRequest() || isFyiRequest();
399 }
400
401 public boolean isApprovalRequest() {
402 return ActionRequestType.APPROVE == getActionRequested() || ActionRequestType.COMPLETE == getActionRequested();
403 }
404
405 public boolean isAcknowledgeRequest() {
406 return ActionRequestType.ACKNOWLEDGE == getActionRequested();
407 }
408
409 public boolean isFyiRequest() {
410 return ActionRequestType.FYI == getActionRequested();
411 }
412
413 public boolean isPending() {
414 return isInitialized() || isActivated();
415 }
416
417 public boolean isCompleteRequest() {
418 return ActionRequestType.COMPLETE == getActionRequested();
419 }
420
421 public boolean isInitialized() {
422 return ActionRequestStatus.INITIALIZED == getStatus();
423 }
424
425 public boolean isActivated() {
426 return ActionRequestStatus.ACTIVATED == getStatus();
427 }
428
429 public boolean isDone() {
430 return ActionRequestStatus.DONE == getStatus();
431 }
432
433 public boolean isUserRequest() {
434 return RecipientType.PRINCIPAL == getRecipientType();
435 }
436
437 public boolean isGroupRequest() {
438 return RecipientType.GROUP == getRecipientType();
439 }
440
441 public boolean isRoleRequest() {
442 return RecipientType.ROLE == getRecipientType();
443 }
444
445 public List<ActionRequest> flatten() {
446 List<ActionRequest> flattenedRequests = new ArrayList<ActionRequest>();
447 flattenedRequests.add(this);
448 for (ActionRequest childRequest : getChildRequests()) {
449 flattenedRequests.addAll(childRequest.flatten());
450 }
451 return Collections.unmodifiableList(flattenedRequests);
452 }
453
454
455
456
457 public final static class Builder implements Serializable, ModelBuilder, ActionRequestContract {
458
459 private static final long serialVersionUID = -1354211147778354091L;
460
461 private String id;
462 private ActionRequestType actionRequested;
463 private ActionRequestStatus status;
464 private boolean current;
465 private DateTime dateCreated;
466 private String responsibilityId;
467 private String documentId;
468 private int priority;
469 private int routeLevel;
470 private String annotation;
471 private RecipientType recipientType;
472 private String principalId;
473 private String groupId;
474 private ActionRequestPolicy requestPolicy;
475 private String responsibilityDescription;
476 private boolean forceAction;
477 private DelegationType delegationType;
478 private String roleName;
479 private String qualifiedRoleName;
480 private String qualifiedRoleNameLabel;
481 private String routeNodeInstanceId;
482 private String nodeName;
483 private String requestLabel;
484 private String parentActionRequestId;
485 private ActionTaken.Builder actionTaken;
486 private List<ActionRequest.Builder> childRequests;
487
488 private Builder(String id, ActionRequestType actionRequested, ActionRequestStatus status, String responsibilityId, String documentId, RecipientType recipientType) {
489 setId(id);
490 setActionRequested(actionRequested);
491 setStatus(status);
492 setResponsibilityId(responsibilityId);
493 setDocumentId(documentId);
494 setRecipientType(recipientType);
495 setCurrent(true);
496 setDateCreated(new DateTime());
497 }
498
499 public static Builder create(String id, ActionRequestType actionRequested, ActionRequestStatus status, String responsibilityId, String documentId, RecipientType recipientType) {
500 return new Builder(id, actionRequested, status, responsibilityId, documentId, recipientType);
501 }
502
503 public static Builder create(ActionRequestContract contract) {
504 if (contract == null) {
505 throw new IllegalArgumentException("contract was null");
506 }
507
508 Builder builder = create(contract.getId(), contract.getActionRequested(), contract.getStatus(), contract.getResponsibilityId(), contract.getDocumentId(), contract.getRecipientType());
509 builder.setCurrent(contract.isCurrent());
510 builder.setDateCreated(contract.getDateCreated());
511 builder.setPriority(contract.getPriority());
512 builder.setRouteLevel(contract.getRouteLevel());
513 builder.setAnnotation(contract.getAnnotation());
514 builder.setPrincipalId(contract.getPrincipalId());
515 builder.setGroupId(contract.getGroupId());
516 builder.setRequestPolicy(contract.getRequestPolicy());
517 builder.setResponsibilityDescription(contract.getResponsibilityDescription());
518 builder.setForceAction(contract.isForceAction());
519 builder.setDelegationType(contract.getDelegationType());
520 builder.setRoleName(contract.getRoleName());
521 builder.setQualifiedRoleName(contract.getQualifiedRoleName());
522 builder.setQualifiedRoleNameLabel(contract.getQualifiedRoleNameLabel());
523 builder.setNodeName(contract.getNodeName());
524 builder.setRequestLabel(contract.getRequestLabel());
525 builder.setParentActionRequestId(contract.getParentActionRequestId());
526 if (contract.getActionTaken() != null) {
527 builder.setActionTaken(ActionTaken.Builder.create(contract.getActionTaken()));
528 }
529 List<ActionRequest.Builder> actionRequestBuilders = new ArrayList<ActionRequest.Builder>();
530 for (ActionRequestContract actionRequest : contract.getChildRequests()) {
531 actionRequestBuilders.add(ActionRequest.Builder.create(actionRequest));
532 }
533 builder.setChildRequests(actionRequestBuilders);
534 return builder;
535 }
536
537 public ActionRequest build() {
538 return new ActionRequest(this);
539 }
540
541 @Override
542 public String getId() {
543 return this.id;
544 }
545
546 @Override
547 public ActionRequestType getActionRequested() {
548 return this.actionRequested;
549 }
550
551 @Override
552 public ActionRequestStatus getStatus() {
553 return this.status;
554 }
555
556 @Override
557 public boolean isCurrent() {
558 return this.current;
559 }
560
561 @Override
562 public DateTime getDateCreated() {
563 return this.dateCreated;
564 }
565
566 @Override
567 public String getResponsibilityId() {
568 return this.responsibilityId;
569 }
570
571 @Override
572 public String getDocumentId() {
573 return this.documentId;
574 }
575
576 @Override
577 public int getPriority() {
578 return this.priority;
579 }
580
581 @Override
582 public int getRouteLevel() {
583 return this.routeLevel;
584 }
585
586 @Override
587 public String getAnnotation() {
588 return this.annotation;
589 }
590
591 @Override
592 public RecipientType getRecipientType() {
593 return this.recipientType;
594 }
595
596 @Override
597 public String getPrincipalId() {
598 return this.principalId;
599 }
600
601 @Override
602 public String getGroupId() {
603 return this.groupId;
604 }
605
606 @Override
607 public ActionRequestPolicy getRequestPolicy() {
608 return this.requestPolicy;
609 }
610
611 @Override
612 public String getResponsibilityDescription() {
613 return this.responsibilityDescription;
614 }
615
616 @Override
617 public boolean isForceAction() {
618 return this.forceAction;
619 }
620
621 @Override
622 public DelegationType getDelegationType() {
623 return this.delegationType;
624 }
625
626 @Override
627 public String getRoleName() {
628 return this.roleName;
629 }
630
631 @Override
632 public String getQualifiedRoleName() {
633 return this.qualifiedRoleName;
634 }
635
636 @Override
637 public String getQualifiedRoleNameLabel() {
638 return this.qualifiedRoleNameLabel;
639 }
640
641 @Override
642 public String getRouteNodeInstanceId() {
643 return this.routeNodeInstanceId;
644 }
645
646 @Override
647 public String getNodeName() {
648 return this.nodeName;
649 }
650
651 @Override
652 public String getRequestLabel() {
653 return this.requestLabel;
654 }
655
656 @Override
657 public String getParentActionRequestId() {
658 return this.parentActionRequestId;
659 }
660
661 @Override
662 public ActionTaken.Builder getActionTaken() {
663 return this.actionTaken;
664 }
665
666 @Override
667 public List<ActionRequest.Builder> getChildRequests() {
668 return this.childRequests;
669 }
670
671 public void setId(String id) {
672 if (StringUtils.isWhitespace(id)) {
673 throw new IllegalArgumentException("id was null or blank");
674 }
675 this.id = id;
676 }
677
678 public void setActionRequested(ActionRequestType actionRequested) {
679 if (actionRequested == null) {
680 throw new IllegalArgumentException("actionRequested was null");
681 }
682 this.actionRequested = actionRequested;
683 }
684
685 public void setStatus(ActionRequestStatus status) {
686 if (status == null) {
687 throw new IllegalArgumentException("status was null");
688 }
689 this.status = status;
690 }
691
692 public void setCurrent(boolean current) {
693 this.current = current;
694 }
695
696 public void setDateCreated(DateTime dateCreated) {
697 if (dateCreated == null) {
698 throw new IllegalArgumentException("dateCreated was null");
699 }
700 this.dateCreated = dateCreated;
701 }
702
703 public void setResponsibilityId(String responsibilityId) {
704 if (StringUtils.isBlank(responsibilityId)) {
705 throw new IllegalArgumentException("responsibilityId was null or blank");
706 }
707 this.responsibilityId = responsibilityId;
708 }
709
710 public void setDocumentId(String documentId) {
711 if (StringUtils.isBlank(documentId)) {
712 throw new IllegalArgumentException("documentId was null or blank");
713 }
714 this.documentId = documentId;
715 }
716
717 public void setPriority(int priority) {
718 this.priority = priority;
719 }
720
721 public void setRouteLevel(int routeLevel) {
722 this.routeLevel = routeLevel;
723 }
724
725 public void setAnnotation(String annotation) {
726 this.annotation = annotation;
727 }
728
729 public void setRecipientType(RecipientType recipientType) {
730 if (recipientType == null) {
731 throw new IllegalArgumentException("recipientType was null");
732 }
733 this.recipientType = recipientType;
734 }
735
736 public void setPrincipalId(String principalId) {
737 this.principalId = principalId;
738 }
739
740 public void setGroupId(String groupId) {
741 this.groupId = groupId;
742 }
743
744 public void setRequestPolicy(ActionRequestPolicy requestPolicy) {
745 this.requestPolicy = requestPolicy;
746 }
747
748 public void setResponsibilityDescription(String responsibilityDescription) {
749 this.responsibilityDescription = responsibilityDescription;
750 }
751
752 public void setForceAction(boolean forceAction) {
753 this.forceAction = forceAction;
754 }
755
756 public void setDelegationType(DelegationType delegationType) {
757 this.delegationType = delegationType;
758 }
759
760 public void setRoleName(String roleName) {
761 this.roleName = roleName;
762 }
763
764 public void setQualifiedRoleName(String qualifiedRoleName) {
765 this.qualifiedRoleName = qualifiedRoleName;
766 }
767
768 public void setQualifiedRoleNameLabel(String qualifiedRoleNameLabel) {
769 this.qualifiedRoleNameLabel = qualifiedRoleNameLabel;
770 }
771
772 public void setRouteNodeInstanceId(String routeNodeInstanceId) {
773 this.routeNodeInstanceId = routeNodeInstanceId;
774 }
775
776 public void setNodeName(String nodeName) {
777 this.nodeName = nodeName;
778 }
779
780 public void setRequestLabel(String requestLabel) {
781 this.requestLabel = requestLabel;
782 }
783
784 public void setParentActionRequestId(String parentActionRequestId) {
785 this.parentActionRequestId = parentActionRequestId;
786 }
787
788 public void setActionTaken(ActionTaken.Builder actionTaken) {
789 this.actionTaken = actionTaken;
790 }
791
792 public void setChildRequests(List<ActionRequest.Builder> childRequests) {
793 this.childRequests = childRequests;
794 }
795
796 }
797
798
799
800
801
802
803 static class Constants {
804 final static String ROOT_ELEMENT_NAME = "actionRequest";
805 final static String TYPE_NAME = "ActionRequestType";
806 }
807
808
809
810
811
812
813 static class Elements {
814 final static String ANNOTATION = "annotation";
815 final static String PRIORITY = "priority";
816 final static String ID = "id";
817 final static String ACTION_REQUESTED_CODE = "actionRequestedCode";
818 final static String STATUS_CODE = "statusCode";
819 final static String CURRENT = "current";
820 final static String ROUTE_LEVEL = "routeLevel";
821 final static String DATE_CREATED = "dateCreated";
822 final static String RESPONSIBILITY_ID = "responsibilityId";
823 final static String DOCUMENT_ID = "documentId";
824 final static String RECIPIENT_TYPE_CODE = "recipientTypeCode";
825 final static String PRINCIPAL_ID = "principalId";
826 final static String GROUP_ID = "groupId";
827 final static String REQUEST_POLICY_CODE = "requestPolicyCode";
828 final static String RESPONSIBILITY_DESCRIPTION = "responsibilityDescription";
829 final static String FORCE_ACTION = "forceAction";
830 final static String DELEGATION_TYPE_CODE = "delegationTypeCode";
831 final static String ROLE_NAME = "roleName";
832 final static String QUALIFIED_ROLE_NAME = "qualifiedRoleName";
833 final static String QUALIFIED_ROLE_NAME_LABEL = "qualifiedRoleNameLabel";
834 final static String ROUTE_NODE_INSTANCE_ID = "routeNodeInstanceId";
835 final static String NODE_NAME = "nodeName";
836 final static String REQUEST_LABEL = "requestLabel";
837 final static String PARENT_ACTION_REQUEST_ID = "parentActionRequestId";
838 final static String ACTION_TAKEN = "actionTaken";
839 final static String CHILD_REQUESTS = "childRequests";
840 final static String CHILD_REQUEST = "childRequest";
841 }
842
843 }
844