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