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