1 /*
2 * Kuali Coeus, a comprehensive research administration system for higher education.
3 *
4 * Copyright 2005-2015 Kuali, Inc.
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as
8 * published by the Free Software Foundation, either version 3 of the
9 * License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
15 *
16 * You should have received a copy of the GNU Affero General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 package org.kuali.coeus.s2sgen.impl.person;
20
21 import org.kuali.coeus.propdev.api.core.ProposalDevelopmentDocumentContract;
22 import org.kuali.coeus.propdev.api.person.ProposalPersonContract;
23
24 import org.kuali.coeus.s2sgen.impl.citizenship.CitizenshipType;
25
26 import java.util.List;
27
28 public interface S2SProposalPersonService {
29
30 /**
31 *
32 * This method limits the number of key persons to n, returns list of key
33 * persons, first n in case firstN is true, or all other than first n, in
34 * case of firstN being false
35 *
36 * @param keyPersons
37 * list of {@link org.kuali.coeus.propdev.api.person.ProposalPersonContract}
38 * @param firstN
39 * value that determines whether the returned list should contain
40 * first n persons or the rest of persons
41 * @param n
42 * number of key persons that are considered as not extra persons
43 * @return list of {@link org.kuali.coeus.propdev.api.person.ProposalPersonContract}
44 */
45 List<ProposalPersonContract> getNKeyPersons(List<? extends ProposalPersonContract> keyPersons,
46 boolean firstN, int n);
47
48 /**
49 *
50 * This method is to get PrincipalInvestigator from person list
51 *
52 * @param pdDoc
53 * Proposal development document.
54 * @return ProposalPerson PrincipalInvestigator for the proposal.
55 */
56 ProposalPersonContract getPrincipalInvestigator(
57 ProposalDevelopmentDocumentContract pdDoc);
58
59 /**
60 * Finds all the co-investigators associated with the provided pdDoc.
61 * @param pdDoc
62 * @return List of Co-Investigators {@link org.kuali.coeus.propdev.api.person.ProposalPersonContract}.
63 */
64
65 List<ProposalPersonContract> getCoInvestigators(ProposalDevelopmentDocumentContract pdDoc);
66
67 /**
68 * Finds all the key Person associated with the provided pdDoc.
69 * @param pdDoc
70 * @return List of Key Persons {@link org.kuali.coeus.propdev.api.person.ProposalPersonContract}.
71 */
72
73 List<ProposalPersonContract> getKeyPersons (ProposalDevelopmentDocumentContract pdDoc);
74
75 /**
76 *
77 * This method is used to get the citizenship from either warehouse or from person custom element
78 * @param proposalPerson
79 * @return
80 */
81 CitizenshipType getCitizenship(ProposalPersonContract proposalPerson);
82 }