1 package org.kuali.ole.describe.form;
2
3 import org.kuali.ole.describe.bo.*;
4 import org.kuali.ole.docstore.common.document.Bib;
5 import org.kuali.ole.docstore.common.document.BibTree;
6 import org.kuali.ole.docstore.common.document.Holdings;
7 import org.kuali.ole.docstore.common.document.Item;
8 import org.kuali.ole.docstore.common.search.FacetResultField;
9 import org.kuali.ole.docstore.common.search.SearchCondition;
10 import org.kuali.ole.docstore.common.search.SearchParams;
11 import org.kuali.ole.docstore.common.search.SearchResponse;
12 import org.kuali.ole.docstore.model.bo.*;
13 import org.kuali.rice.core.api.util.tree.Tree;
14 import org.kuali.rice.krad.uif.UifConstants;
15 import org.kuali.rice.krad.util.KRADUtils;
16 import org.kuali.rice.krad.web.form.UifFormBase;
17
18 import java.util.*;
19
20
21
22
23
24
25
26
27 public class BoundwithForm extends OLESearchForm {
28
29 private SearchParams searchParams;
30 private SearchResponse searchResponse;
31 private List<OleWorkBibDocument> workBibDocumentList;
32 private List<WorkHoldingsDocument> workHoldingsDocumentList;
33 private List<WorkItemDocument> workItemDocumentList;
34 private List<WorkEHoldingsDocument> workEHoldingsDocumentList;
35 private List<SearchResultDisplayRow> searchResultDisplayRowList;
36 private List<Bib> bibList;
37 private List<Holdings> holdingsList;
38 private List<Item> itemList;
39 private List<DocumentTreeNode> displayRecordList = new ArrayList<DocumentTreeNode>();
40 private String message;
41 private String author;
42 private String searchType;
43 private String id;
44 private String title;
45 private String description;
46 private String publicationDate;
47 private String barcode;
48 private String searchResults;
49 private String control;
50 private boolean select;
51 private boolean selectTree1;
52 private boolean selectTree2;
53 private boolean selectBoundwithTree;
54 private String selectedInstance;
55 private String labelText;
56 private String tree2LabelText;
57 private String boundwithTreeLabelText;
58 private String docCategory;
59 private String docType;
60 private String docFormat;
61 private String docId;
62 private String inDelete;
63 private String inDeleteLeftTree;
64 private String inDeleteRightTree;
65 private boolean transferLeftTree;
66 private boolean transferRighttree;
67 private int pageSize = 10;
68 private int start;
69
70
71 public String pageShowEntries;
72 private String sortOrder;
73 private String sortField;
74 private String sortFlag;
75 private List<String> selectedHoldings;
76 private List<String> selectedHoldingsFromTree1;
77 private List<String> selectedBibs;
78 private List<String> selectedBibsFromTree2;
79 private List<String> selectedBibsFromTree1;
80 private List<String> deleteIds;
81 private BibTree bibTree;
82 private String showPageSize;
83 private String browseField;
84 private String browseText;
85 private int facetLimit;
86 private String searchTypeField;
87 private List<FacetResultField> facetResultFields;
88 private SearchResultDisplayFields searchResultDisplayFields;
89 private String showFieldSort;
90
91 public String getShowFieldSort() {
92 return searchResultDisplayFields.getSortFieldString();
93 }
94
95 public void setShowFieldSort(String showFieldSort) {
96 this.showFieldSort = showFieldSort;
97 }
98
99 public List<FacetResultField> getFacetResultFields() {
100 return facetResultFields;
101 }
102
103 public void setFacetResultFields(List<FacetResultField> facetResultFields) {
104 this.facetResultFields = facetResultFields;
105 }
106
107 public int getFacetLimit() {
108 return facetLimit;
109 }
110
111 public String getBrowseField() {
112 return browseField;
113 }
114
115 public void setBrowseField(String browseField) {
116 this.browseField = browseField;
117 }
118
119 public String getSearchTypeField() {
120 return searchTypeField;
121 }
122
123 public void setSearchTypeField(String searchTypeField) {
124 this.searchTypeField = searchTypeField;
125 }
126
127 public String getBrowseText() {
128 return browseText;
129 }
130
131 public void setBrowseText(String browseText) {
132 this.browseText = browseText;
133 }
134
135 public void setFacetLimit(int facetLimit) {
136 this.facetLimit = facetLimit;
137 }
138
139 public String getShowPageSize() {
140 return showPageSize;
141 }
142
143 public void setShowPageSize(String showPageSize) {
144 this.showPageSize = showPageSize;
145 }
146
147 public int getStart() {
148 return start;
149 }
150
151 public void setStart(int start) {
152 this.start = start;
153 }
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171 public String getPageShowEntries() {
172 return pageShowEntries;
173 }
174
175 public void setPageShowEntries(String pageShowEntries) {
176 this.pageShowEntries = pageShowEntries;
177 }
178
179 public int getPageSize() {
180 return pageSize;
181 }
182
183 public void setPageSize(int pageSize) {
184 this.pageSize = pageSize;
185 }
186
187 public boolean getTransferLeftTree() {
188 return transferLeftTree;
189 }
190
191 public String getSearchType() {
192 return searchType;
193 }
194
195 public void setSearchType(String searchType) {
196 this.searchType = searchType;
197 }
198
199 public void setTransferLeftTree(boolean transferLeftTree) {
200 this.transferLeftTree = transferLeftTree;
201 }
202
203 public boolean getTransferRighttree() {
204 return transferRighttree;
205 }
206
207 public void setTransferRighttree(boolean transferRighttree) {
208 this.transferRighttree = transferRighttree;
209 }
210
211
212 public String getInDeleteLeftTree() {
213 return inDeleteLeftTree;
214 }
215
216 public void setInDeleteLeftTree(String inDeleteLeftTree) {
217 this.inDeleteLeftTree = inDeleteLeftTree;
218 }
219
220 public String getInDeleteRightTree() {
221 return inDeleteRightTree;
222 }
223
224 public void setInDeleteRightTree(String inDeleteRightTree) {
225 this.inDeleteRightTree = inDeleteRightTree;
226 }
227
228
229 public SearchResponse getSearchResponse() {
230 return searchResponse;
231 }
232
233 public void setSearchResponse(SearchResponse searchResponse) {
234 this.searchResponse = searchResponse;
235 }
236
237 private DocumentTreeNode showLeftTreeStatusMessages;
238 private DocumentTreeNode showRightTreeStatusMessages;
239 private String status;
240 private boolean isSelected;
241 private DocumentTreeNode documentTreeNode;
242 private Tree<BoundwithSelection, String> bibTree1 = new Tree<BoundwithSelection, String>();
243 private Tree<BoundwithSelection, String> bibTree2 = new Tree<BoundwithSelection, String>();
244 private Tree<BoundwithSelection, String> boundWithTree = new Tree<BoundwithSelection, String>();
245 private Map<String, String> instanceMap = new HashMap<String, String>();
246 private Map<String, String> bibMap = new HashMap<String, String>();
247
248 private Tree<DocumentTreeNode, String> leftTree = new Tree<DocumentTreeNode, String>();
249 private Tree<DocumentTreeNode, String> rightTree = new Tree<DocumentTreeNode, String>();
250 private Tree<DocumentTreeNode, String> boundwithTree = new Tree<DocumentTreeNode, String>();
251 private Tree<DocumentTreeNode, String> deleteConfirmationTree = new Tree<DocumentTreeNode, String>();
252
253 private String deleteVerifyResponse;
254
255 private boolean showRightTree = false;
256 private boolean showLeftTree = false;
257 private boolean showBoundwithTree = false;
258
259 protected Map<String, String> actionParameters = new HashMap<String, String>();
260 private WorkInstanceDocument workInstanceDocumentForTree1 = new WorkInstanceDocument();
261 private List<String> selectedInstancesList = new ArrayList<String>();
262 private String tree1BibId;
263 private Set<String> selectedBibsList = new HashSet<String>();
264 private List<WorkBibDocument> bibDocumentList = new ArrayList<WorkBibDocument>();
265 private List<String> bibInstanceListForTree1 = new ArrayList<String>();
266 private String destBibIdentifier;
267 private List<String> bibItemListForTree1 = new ArrayList<String>();
268 private boolean showExport=false;
269 private boolean showRequestXML=false;
270
271 public DocumentTreeNode getShowLeftTreeStatusMessages() {
272 return showLeftTreeStatusMessages;
273 }
274
275 public void setShowLeftTreeStatusMessages(DocumentTreeNode showLeftTreeStatusMessages) {
276 this.showLeftTreeStatusMessages = showLeftTreeStatusMessages;
277 }
278
279 public DocumentTreeNode getShowRightTreeStatusMessages() {
280 return showRightTreeStatusMessages;
281 }
282
283 public void setShowRightTreeStatusMessages(DocumentTreeNode showRightTreeStatusMessages) {
284 this.showRightTreeStatusMessages = showRightTreeStatusMessages;
285 }
286
287 public List<String> getBibItemListForTree1() {
288 return bibItemListForTree1;
289 }
290
291 public void setBibItemListForTree1(List<String> bibItemListForTree1) {
292 this.bibItemListForTree1 = bibItemListForTree1;
293 }
294
295 public String getSortOrder() {
296 return sortOrder;
297 }
298
299 public void setSortOrder(String sortOrder) {
300 this.sortOrder = sortOrder;
301 }
302
303 public String getSortField() {
304 return sortField;
305 }
306
307 public void setSortField(String sortField) {
308 this.sortField = sortField;
309 }
310
311 public String getSortFlag() {
312 return sortFlag;
313 }
314
315 public void setSortFlag(String sortFlag) {
316 this.sortFlag = sortFlag;
317 }
318
319 public String getDestInstanceIdentifier() {
320 return destInstanceIdentifier;
321 }
322
323 public void setDestInstanceIdentifier(String destInstanceIdentifier) {
324 this.destInstanceIdentifier = destInstanceIdentifier;
325 }
326
327 private String destInstanceIdentifier;
328
329 public List<String> getBibInstanceListForTree1() {
330 return bibInstanceListForTree1;
331 }
332
333 public void setBibInstanceListForTree1(List<String> bibInstanceListForTree1) {
334 this.bibInstanceListForTree1 = bibInstanceListForTree1;
335 }
336
337 public String getDestBibIdentifier() {
338 return destBibIdentifier;
339 }
340
341 public void setDestBibIdentifier(String destBibIdentifier) {
342 this.destBibIdentifier = destBibIdentifier;
343 }
344
345
346 public BoundwithForm() {
347 searchResultDisplayFields = new SearchResultDisplayFields();
348 }
349
350
351
352
353
354 @Override
355 public Map<String, String> getActionParameters() {
356 return this.actionParameters;
357 }
358
359 public SearchResultDisplayFields getSearchResultDisplayFields() {
360 return searchResultDisplayFields;
361 }
362
363 public void setSearchResultDisplayFields(SearchResultDisplayFields searchResultDisplayFields) {
364 this.searchResultDisplayFields = searchResultDisplayFields;
365 }
366
367
368
369
370
371
372 public Properties getActionParametersAsProperties() {
373 return KRADUtils.convertMapToProperties(actionParameters);
374 }
375
376
377
378
379 @Override
380 public void setActionParameters(Map<String, String> actionParameters) {
381 this.actionParameters = actionParameters;
382 }
383
384
385
386
387
388
389
390
391 public String getActionParamaterValue(String actionParameterName) {
392 if ((actionParameters != null) && actionParameters.containsKey(actionParameterName)) {
393 return actionParameters.get(actionParameterName);
394 }
395
396 return "";
397 }
398
399
400
401
402
403
404
405
406
407
408
409 public String getActionEvent() {
410 if ((actionParameters != null) && actionParameters.containsKey(UifConstants.UrlParams.ACTION_EVENT)) {
411 return actionParameters.get(UifConstants.UrlParams.ACTION_EVENT);
412 }
413
414 return "";
415 }
416
417
418 public Map<String, String> getActionParameters(Map<String, String> actionParametersMap) {
419 this.actionParameters = actionParametersMap;
420 return actionParametersMap;
421 }
422
423
424 public SearchParams getSearchParams() {
425 return searchParams;
426 }
427
428 public void setSearchParams(SearchParams searchParams) {
429 this.searchParams = searchParams;
430 }
431
432 public List<OleWorkBibDocument> getWorkBibDocumentList() {
433 return workBibDocumentList;
434 }
435
436 public DocumentTreeNode getDocumentTreeNode() {
437 if (null == documentTreeNode) {
438 documentTreeNode = new DocumentTreeNode();
439 }
440 return documentTreeNode;
441 }
442
443 public void setDocumentTreeNode(DocumentTreeNode documentTreeNode) {
444 this.documentTreeNode = documentTreeNode;
445 }
446
447 public void setWorkBibDocumentList(List<OleWorkBibDocument> workBibDocumentList) {
448 this.workBibDocumentList = workBibDocumentList;
449 }
450
451 public List<WorkBibDocument> getBibDocumentList() {
452 return bibDocumentList;
453 }
454
455 public void setBibDocumentList(List<WorkBibDocument> bibDocumentList) {
456 this.bibDocumentList = bibDocumentList;
457 }
458
459 public List<Bib> getBibList() {
460 return bibList;
461 }
462
463 public void setBibList(List<Bib> bibList) {
464 this.bibList = bibList;
465 }
466
467 public List<Holdings> getHoldingsList() {
468 return holdingsList;
469 }
470
471 public void setHoldingsList(List<Holdings> holdingsList) {
472 this.holdingsList = holdingsList;
473 }
474
475 public List<Item> getItemList() {
476 return itemList;
477 }
478
479 public void setItemList(List<Item> itemList) {
480 this.itemList = itemList;
481 }
482
483 public String getLabelText() {
484 return labelText;
485 }
486
487 public void setLabelText(String labelText) {
488 this.labelText = labelText;
489 }
490
491
492 public String getMessage() {
493 return message;
494 }
495
496 public String getSelectedInstance() {
497 return selectedInstance;
498 }
499
500 public void setSelectedInstance(String selectedInstance) {
501 this.selectedInstance = selectedInstance;
502 }
503
504 public void setMessage(String message) {
505 this.message = message;
506 }
507
508 public String getAuthor() {
509 return author;
510 }
511
512 public void setAuthor(String author) {
513 this.author = author;
514 }
515
516 public String getId() {
517 return id;
518 }
519
520 public void setId(String id) {
521 this.id = id;
522 }
523
524 public String getTitle() {
525 return title;
526 }
527
528 public void setTitle(String title) {
529 this.title = title;
530 }
531
532 public String getDescription() {
533 return description;
534 }
535
536 public void setDescription(String description) {
537 this.description = description;
538 }
539
540 public String getPublicationDate() {
541 return publicationDate;
542 }
543
544 public void setPublicationDate(String publicationDate) {
545 this.publicationDate = publicationDate;
546 }
547
548 public String getBarcode() {
549 return barcode;
550 }
551
552 public void setBarcode(String barcode) {
553 this.barcode = barcode;
554 }
555
556 public String getSearchResults() {
557 return searchResults;
558 }
559
560 public void setSearchResults(String searchResults) {
561 this.searchResults = searchResults;
562 }
563
564 public String getControl() {
565 return control;
566 }
567
568 public void setControl(String control) {
569 this.control = control;
570 }
571
572 public String getTree2LabelText() {
573 return tree2LabelText;
574 }
575
576 public void setTree2LabelText(String tree2LabelText) {
577 this.tree2LabelText = tree2LabelText;
578 }
579
580 public boolean isSelectTree1() {
581 return selectTree1;
582 }
583
584 public void setSelectTree1(boolean selectTree1) {
585 this.selectTree1 = selectTree1;
586 }
587
588 public boolean isSelectTree2() {
589 return selectTree2;
590 }
591
592 public void setSelectTree2(boolean selectTree2) {
593 this.selectTree2 = selectTree2;
594 }
595
596 public List<DocumentTreeNode> getDisplayRecordList() {
597 return displayRecordList;
598 }
599
600 public void setDisplayRecordList(List<DocumentTreeNode> displayRecordList) {
601 this.displayRecordList = displayRecordList;
602 }
603
604
605 public void clearFormFields() {
606 this.setId("");
607 this.setAuthor("");
608 this.setTitle("");
609 this.setDescription("");
610 this.setPublicationDate("");
611 this.setBarcode("");
612 }
613
614 public boolean isSelected() {
615 return isSelected;
616 }
617
618 public void setSelected(boolean selected) {
619 isSelected = selected;
620 }
621
622 public String getStatus() {
623 return status;
624 }
625
626 public void setStatus(String status) {
627 this.status = status;
628 }
629
630 public Tree<BoundwithSelection, String> getBibTree1() {
631 return bibTree1;
632 }
633
634 public void setBibTree1(Tree<BoundwithSelection, String> bibTree1) {
635 this.bibTree1 = bibTree1;
636 }
637
638 public Tree<BoundwithSelection, String> getBibTree2() {
639 return bibTree2;
640 }
641
642 public void setBibTree2(Tree<BoundwithSelection, String> bibTree2) {
643 this.bibTree2 = bibTree2;
644 }
645
646 public Tree<BoundwithSelection, String> getBoundWithTree() {
647 return boundWithTree;
648 }
649
650 public void setBoundWithTree(Tree<BoundwithSelection, String> boundWithTree) {
651 this.boundWithTree = boundWithTree;
652 }
653
654 public Map<String, String> getInstanceMap() {
655 return instanceMap;
656 }
657
658 public void setInstanceMap(Map<String, String> instanceMap) {
659 this.instanceMap = instanceMap;
660 }
661
662 public String getBoundwithTreeLabelText() {
663 return boundwithTreeLabelText;
664 }
665
666 public void setBoundwithTreeLabelText(String boundwithTreeLabelText) {
667 this.boundwithTreeLabelText = boundwithTreeLabelText;
668 }
669
670 public boolean isSelectBoundwithTree() {
671 return selectBoundwithTree;
672 }
673
674 public void setSelectBoundwithTree(boolean selectBoundwithTree) {
675 this.selectBoundwithTree = selectBoundwithTree;
676 }
677
678 public boolean isSelect() {
679 return select;
680 }
681
682 public void setSelect(boolean select) {
683 this.select = select;
684 }
685
686 public Map<String, String> getBibMap() {
687 return bibMap;
688 }
689
690 public void setBibMap(Map<String, String> bibMap) {
691 this.bibMap = bibMap;
692 }
693
694 public Tree<DocumentTreeNode, String> getLeftTree() {
695 return leftTree;
696 }
697
698 public void setLeftTree(Tree<DocumentTreeNode, String> leftTree) {
699 this.leftTree = leftTree;
700 }
701
702 public Tree<DocumentTreeNode, String> getRightTree() {
703 return rightTree;
704 }
705
706 public void setRightTree(Tree<DocumentTreeNode, String> rightTree) {
707 this.rightTree = rightTree;
708 }
709
710 public Tree<DocumentTreeNode, String> getBoundwithTree() {
711 return boundwithTree;
712 }
713
714 public void setBoundwithTree(Tree<DocumentTreeNode, String> boundwithTree) {
715 this.boundwithTree = boundwithTree;
716 }
717
718 public Tree<DocumentTreeNode, String> getDeleteConfirmationTree() {
719 return deleteConfirmationTree;
720 }
721
722 public void setDeleteConfirmationTree(Tree<DocumentTreeNode, String> deleteConfirmationTree) {
723 this.deleteConfirmationTree = deleteConfirmationTree;
724 }
725
726 public String getDeleteVerifyResponse() {
727 return deleteVerifyResponse;
728 }
729
730 public void setDeleteVerifyResponse(String deleteVerifyResponse) {
731 this.deleteVerifyResponse = deleteVerifyResponse;
732 }
733
734 public String getDocCategory() {
735 return docCategory;
736 }
737
738 public void setDocCategory(String docCategory) {
739 this.docCategory = docCategory;
740 }
741
742 public String getDocType() {
743 return docType;
744 }
745
746 public void setDocType(String docType) {
747 this.docType = docType;
748 }
749
750 public String getDocFormat() {
751 return docFormat;
752 }
753
754 public void setDocFormat(String docFormat) {
755 this.docFormat = docFormat;
756 }
757
758 public String getDocId() {
759 return docId;
760 }
761
762 public void setDocId(String docId) {
763 this.docId = docId;
764 }
765
766 public String getInDelete() {
767 return inDelete;
768 }
769
770 public void setInDelete(String inDelete) {
771 this.inDelete = inDelete;
772 }
773
774 public boolean isShowRightTree() {
775 return showRightTree;
776 }
777
778 public void setShowRightTree(boolean showRightTree) {
779 this.showRightTree = showRightTree;
780 }
781
782 public boolean isShowLeftTree() {
783 return showLeftTree;
784 }
785
786 public void setShowLeftTree(boolean showLeftTree) {
787 this.showLeftTree = showLeftTree;
788 }
789
790 public boolean isShowBoundwithTree() {
791 return showBoundwithTree;
792 }
793
794 public void setShowBoundwithTree(boolean showBoundwithTree) {
795 this.showBoundwithTree = showBoundwithTree;
796 }
797
798 public WorkInstanceDocument getWorkInstanceDocumentForTree1() {
799 if (workInstanceDocumentForTree1 == null) {
800 workInstanceDocumentForTree1 = new WorkInstanceDocument();
801 }
802 return workInstanceDocumentForTree1;
803 }
804
805 public void setWorkInstanceDocumentForTree1(WorkInstanceDocument workInstanceDocumentForTree1) {
806 this.workInstanceDocumentForTree1 = workInstanceDocumentForTree1;
807 }
808
809 public List<String> getSelectedInstancesList() {
810 return selectedInstancesList;
811 }
812
813 public void setSelectedInstancesList(List<String> selectedInstancesList) {
814 this.selectedInstancesList = selectedInstancesList;
815 }
816
817 public String getTree1BibId() {
818 return tree1BibId;
819 }
820
821 public void setTree1BibId(String tree1BibId) {
822 this.tree1BibId = tree1BibId;
823 }
824
825 public Set<String> getSelectedBibsList() {
826 return selectedBibsList;
827 }
828
829 public void setSelectedBibsList(Set<String> selectedBibsList) {
830 this.selectedBibsList = selectedBibsList;
831 }
832 public List<SearchResultDisplayRow> getSearchResultDisplayRowList() {
833 return searchResultDisplayRowList;
834 }
835
836 public void setSearchResultDisplayRowList(List<SearchResultDisplayRow> searchResultDisplayRowList) {
837 this.searchResultDisplayRowList = searchResultDisplayRowList;
838 }
839
840 public List<String> getSelectedHoldings() {
841 return selectedHoldings;
842 }
843
844 public void setSelectedHoldings(List<String> selectedHoldings) {
845 this.selectedHoldings = selectedHoldings;
846 }
847
848 public List<String> getSelectedBibs() {
849 return selectedBibs;
850 }
851
852 public void setSelectedBibs(List<String> selectedBibs) {
853 this.selectedBibs = selectedBibs;
854 }
855
856 public BibTree getBibTree() {
857 return bibTree;
858 }
859
860 public void setBibTree(BibTree bibTree) {
861 this.bibTree = bibTree;
862 }
863
864 public List<String> getDeleteIds() {
865 return deleteIds;
866 }
867
868 public void setDeleteIds(List<String> deleteIds) {
869 this.deleteIds = deleteIds;
870 }
871
872 public List<String> getSelectedBibsFromTree1() {
873 return selectedBibsFromTree1;
874 }
875
876 public void setSelectedBibsFromTree1(List<String> selectedBibsFromTree1) {
877 this.selectedBibsFromTree1 = selectedBibsFromTree1;
878 }
879
880 public List<String> getSelectedBibsFromTree2() {
881 return selectedBibsFromTree2;
882 }
883
884 public void setSelectedBibsFromTree2(List<String> selectedBibsFromTree2) {
885 this.selectedBibsFromTree2 = selectedBibsFromTree2;
886 }
887
888 public List<String> getSelectedHoldingsFromTree1() {
889 return selectedHoldingsFromTree1;
890 }
891
892 public void setSelectedHoldingsFromTree1(List<String> selectedHoldingsFromTree1) {
893 this.selectedHoldingsFromTree1 = selectedHoldingsFromTree1;
894 }
895
896 public boolean isShowExport() {
897
898 return showExport;
899 }
900
901 public void setShowExport(boolean showExport) {
902 this.showExport = showExport;
903 }
904
905 public boolean isShowRequestXML() {
906 return showRequestXML;
907 }
908
909 public void setShowRequestXML(boolean showRequestXML) {
910 this.showRequestXML = showRequestXML;
911 }
912
913
914 }