GitHub PullRequestReviewCommentEvent at 2014-12-17 20:01:28
Repository: kc
Actor: bhutchinson
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/kuali/kc/pulls/comments/21999459","id":21999459,"diff_hunk":"@@ -0,0 +1,209 @@\n+package org.kuali.kra.award.external.award;\n+\n+import java.util.ArrayList;\n+import java.util.Collection;\n+import java.util.Date;\n+import java.util.HashMap;\n+import java.util.List;\n+import java.util.Map;\n+\n+import javax.jws.WebParam;\n+\n+import org.apache.commons.lang.StringUtils;\n+import org.kuali.kra.award.cgb.AwardCgb;\n+import org.kuali.kra.award.home.Award;\n+import org.kuali.kra.award.home.AwardConstants;\n+import org.kuali.kra.award.home.AwardService;\n+import org.kuali.kra.award.paymentreports.awardreports.AwardReportTerm;\n+import org.kuali.coeus.common.framework.version.VersionStatus;\n+import org.kuali.kra.award.dao.AwardLookupDao;\n+import org.kuali.kra.external.HashMapElement;\n+import org.kuali.kra.external.service.KcDtoService;\n+import org.kuali.kra.institutionalproposal.home.InstitutionalProposal;\n+import org.kuali.rice.coreservice.framework.parameter.ParameterService;\n+import org.kuali.rice.krad.service.BusinessObjectService;\n+import org.springframework.beans.factory.annotation.Autowired;\n+import org.springframework.beans.factory.annotation.Qualifier;\n+\n+public class AwardWebServiceImpl implements AwardWebService {\n+\t\n+\tprivate BusinessObjectService businessObjectService;\n+\tprivate AwardService awardService;\n+\tprivate AwardLookupDao awardLookupDao;\n+\tprivate KcDtoService<AwardDTO, Award> awardDtoService;\n+\tprivate ParameterService parameterService;\n+\t\n+\tpublic AwardDTO getAward(Long awardId) {\n+\t\tAward award = getAwardService().getAward(awardId);\n+\t\tif (award != null) {\n+\t\t\tAward newestAward = getAwardService().getActiveOrNewestAward(award.getAwardNumber());\n+\t\t\tAwardDTO result = getAwardDtoService().buildDto(newestAward);\n+\t\t\treturn result;\n+\t\t} else {\n+\t\t\treturn null;\n+\t\t}\n+\t}\n+\t\n+\tpublic List<AwardDTO> searchAwards(AwardSearchCriteriaDto searchDto) {\n+\t\tList<AwardDTO> results = new ArrayList<AwardDTO>();\n+\t\tMap<String, String> values = new HashMap<String, String>();\n+\t\tvalues.put(\"awardId\", searchDto.getAwardId());\n+\t\tvalues.put(\"financialChartOfAccountsCode\", searchDto.getChartOfAccounts());\n+\t\tvalues.put(\"accountNumber\", searchDto.getAccountNumber());\n+\t\tvalues.put(\"awardNumber\", searchDto.getAwardNumber());\n+\t\tvalues.put(\"projectPersons.personId\", searchDto.getPrincipalInvestigatorId());\n+\t\tvalues.put(\"sponsorCode\", searchDto.getSponsorCode());\n+\t\tvalues.put(\"beginDate\",\tsearchDto.getStartDate());\n+\t\tvalues.put(\"rangeLowerBoundKeyPrefix_beginDate\", searchDto.getStartDateLowerBound());\n+\t\tvalues.put(\"awardAmountInfos.finalExpirationDate\", searchDto.getEndDate());\n+\t\tvalues.put(\"rangeLowerBoundKeyPrefix_awardAmountInfos.finalExpirationDate\", searchDto.getEndDateLowerBound());\n+\t\tvalues.put(\"awardAmountInfos.amountObligatedToDate\", searchDto.getAwardTotal());\n+\t\t\n+\t\tString invoiceReportDesc =  getParameterService().getParameterValueAsString(Award.class, AwardConstants.INVOICE_REPORT_DESC_PARAM);\n+\t\tvalues.put(\"awardReportTermItems.report.description\", invoiceReportDesc);\n+\t\tvalues.put(\"awardReportTermItems.frequencyCode\", searchDto.getBillingFrequency());\n+\t\t\n+\t\tList<Award> awards = (List<Award>) getAwardLookupDao().getAwardSearchResults(values, false);\n+\t\tif (awards != null && !awards.isEmpty()) {\n+\t\t\tfor (Award award : awards) {\n+\t\t\t\tresults.add(getAwardDtoService().buildDto(award));\n+\t\t\t}\n+\t\t}\n+\t\treturn results;\n+\t\t\n+\t}\n+\n+\tpublic List<AwardDTO> getMatchingAwards(AwardFieldValuesDto fieldValuesDto) {\n+\t\tList<AwardDTO> results = new ArrayList<AwardDTO>();\n+\t\tMap<String, Object> fieldValues = new HashMap<String, Object>();\n+\t\tif (fieldValuesDto.getAwardId() != null) {\n+\t\t\tfieldValues.put(\"awardId\", fieldValuesDto.getAwardId());\n+\t\t}\n+\t\tif (fieldValuesDto.getChartOfAccounts() != null) {\n+\t\t\tfieldValues.put(\"financialChartOfAccountsCode\", fieldValuesDto.getChartOfAccounts());\n+\t\t}\n+\t\tif (fieldValuesDto.getAccountNumber() != null) {\n+\t\t\tfieldValues.put(\"accountNumber\", fieldValuesDto.getAccountNumber());\n+\t\t}\n+\t\tif (fieldValuesDto.getPrincipalInvestigatorId() != null) {\n+\t\t\tfieldValues.put(\"projectPersons.personId\", fieldValuesDto.getPrincipalInvestigatorId());\n+\t\t}\n+\t\tif (fieldValuesDto.getAwardNumber() != null) {\n+\t\t\tfieldValues.put(\"awardNumber\", fieldValuesDto.getAwardNumber());\n+\t\t}\n+        // use the awardSequenceStatus to return the latest active award\n+\t\tfieldValues.put(\"awardSequenceStatus\", VersionStatus.ACTIVE.name());\n+\t\tList<Award> awards = new ArrayList<Award>(businessObjectService.findMatching(Award.class, fieldValues));","path":"coeus-impl/src/main/java/org/kuali/kra/award/external/award/AwardWebServiceImpl.java","position":97,"original_position":96,"commit_id":"960a04ddff0e703ffaae5459f91b5bcaf44baad9","original_commit_id":"c9f16ff5fa3c8a93303a4016fbaa10f545876ad4","user":{"login":"bhutchinson","id":1806259,"avatar_url":"https://avatars.githubusercontent.com/u/1806259?v=3","gravatar_id":"","url":"https://api.github.com/users/bhutchinson","html_url":"https://github.com/bhutchinson","followers_url":"https://api.github.com/users/bhutchinson/followers","following_url":"https://api.github.com/users/bhutchinson/following{/other_user}","gists_url":"https://api.github.com/users/bhutchinson/gists{/gist_id}","starred_url":"https://api.github.com/users/bhutchinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhutchinson/subscriptions","organizations_url":"https://api.github.com/users/bhutchinson/orgs","repos_url":"https://api.github.com/users/bhutchinson/repos","events_url":"https://api.github.com/users/bhutchinson/events{/privacy}","received_events_url":"https://api.github.com/users/bhutchinson/received_events","type":"User","site_admin":false},"body":"apply the Award lookup limit here too?","created_at":"2014-12-17T20:01:28Z","updated_at":"2014-12-17T20:01:28Z","html_url":"https://github.com/kuali/kc/pull/1307#discussion_r21999459","pull_request_url":"https://api.github.com/repos/kuali/kc/pulls/1307","_links":{"self":{"href":"https://api.github.com/repos/kuali/kc/pulls/comments/21999459"},"html":{"href":"https://github.com/kuali/kc/pull/1307#discussion_r21999459"},"pull_request":{"href":"https://api.github.com/repos/kuali/kc/pulls/1307"}}},"pull_request":{"url":"https://api.github.com/repos/kuali/kc/pulls/1307","id":26150998,"html_url":"https://github.com/kuali/kc/pull/1307","diff_url":"https://github.com/kuali/kc/pull/1307.diff","patch_url":"https://github.com/kuali/kc/pull/1307.patch","issue_url":"https://api.github.com/repos/kuali/kc/issues/1307","number":1307,"state":"open","locked":false,"title":"Kfsti 668","user":{"login":"bhutchinson","id":1806259,"avatar_url":"https://avatars.githubusercontent.com/u/1806259?v=3","gravatar_id":"","url":"https://api.github.com/users/bhutchinson","html_url":"https://github.com/bhutchinson","followers_url":"https://api.github.com/users/bhutchinson/followers","following_url":"https://api.github.com/users/bhutchinson/following{/other_user}","gists_url":"https://api.github.com/users/bhutchinson/gists{/gist_id}","starred_url":"https://api.github.com/users/bhutchinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhutchinson/subscriptions","organizations_url":"https://api.github.com/users/bhutchinson/orgs","repos_url":"https://api.github.com/users/bhutchinson/repos","events_url":"https://api.github.com/users/bhutchinson/events{/privacy}","received_events_url":"https://api.github.com/users/bhutchinson/received_events","type":"User","site_admin":false},"body":"This is the initial PR  for applying the KC CGB overlay project to KC 6.0. It should obviously be reviewed closely.","created_at":"2014-12-16T14:49:34Z","updated_at":"2014-12-17T20:01:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"00584c440fd53542e69d95f97dd39f5133d30f3f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kuali/kc/pulls/1307/commits","review_comments_url":"https://api.github.com/repos/kuali/kc/pulls/1307/comments","review_comment_url":"https://api.github.com/repos/kuali/kc/pulls/comments/{number}","comments_url":"https://api.github.com/repos/kuali/kc/issues/1307/comments","statuses_url":"https://api.github.com/repos/kuali/kc/statuses/960a04ddff0e703ffaae5459f91b5bcaf44baad9","head":{"label":"bhutchinson:kfsti-668","ref":"kfsti-668","sha":"960a04ddff0e703ffaae5459f91b5bcaf44baad9","user":{"login":"bhutchinson","id":1806259,"avatar_url":"https://avatars.githubusercontent.com/u/1806259?v=3","gravatar_id":"","url":"https://api.github.com/users/bhutchinson","html_url":"https://github.com/bhutchinson","followers_url":"https://api.github.com/users/bhutchinson/followers","following_url":"https://api.github.com/users/bhutchinson/following{/other_user}","gists_url":"https://api.github.com/users/bhutchinson/gists{/gist_id}","starred_url":"https://api.github.com/users/bhutchinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhutchinson/subscriptions","organizations_url":"https://api.github.com/users/bhutchinson/orgs","repos_url":"https://api.github.com/users/bhutchinson/repos","events_url":"https://api.github.com/users/bhutchinson/events{/privacy}","received_events_url":"https://api.github.com/users/bhutchinson/received_events","type":"User","site_admin":false},"repo":{"id":27552512,"name":"kc","full_name":"bhutchinson/kc","owner":{"login":"bhutchinson","id":1806259,"avatar_url":"https://avatars.githubusercontent.com/u/1806259?v=3","gravatar_id":"","url":"https://api.github.com/users/bhutchinson","html_url":"https://github.com/bhutchinson","followers_url":"https://api.github.com/users/bhutchinson/followers","following_url":"https://api.github.com/users/bhutchinson/following{/other_user}","gists_url":"https://api.github.com/users/bhutchinson/gists{/gist_id}","starred_url":"https://api.github.com/users/bhutchinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhutchinson/subscriptions","organizations_url":"https://api.github.com/users/bhutchinson/orgs","repos_url":"https://api.github.com/users/bhutchinson/repos","events_url":"https://api.github.com/users/bhutchinson/events{/privacy}","received_events_url":"https://api.github.com/users/bhutchinson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bhutchinson/kc","description":"Kuali Coeus","fork":true,"url":"https://api.github.com/repos/bhutchinson/kc","forks_url":"https://api.github.com/repos/bhutchinson/kc/forks","keys_url":"https://api.github.com/repos/bhutchinson/kc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bhutchinson/kc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bhutchinson/kc/teams","hooks_url":"https://api.github.com/repos/bhutchinson/kc/hooks","issue_events_url":"https://api.github.com/repos/bhutchinson/kc/issues/events{/number}","events_url":"https://api.github.com/repos/bhutchinson/kc/events","assignees_url":"https://api.github.com/repos/bhutchinson/kc/assignees{/user}","branches_url":"https://api.github.com/repos/bhutchinson/kc/branches{/branch}","tags_url":"https://api.github.com/repos/bhutchinson/kc/tags","blobs_url":"https://api.github.com/repos/bhutchinson/kc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bhutchinson/kc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bhutchinson/kc/git/refs{/sha}","trees_url":"https://api.github.com/repos/bhutchinson/kc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bhutchinson/kc/statuses/{sha}","languages_url":"https://api.github.com/repos/bhutchinson/kc/languages","stargazers_url":"https://api.github.com/repos/bhutchinson/kc/stargazers","contributors_url":"https://api.github.com/repos/bhutchinson/kc/contributors","subscribers_url":"https://api.github.com/repos/bhutchinson/kc/subscribers","subscription_url":"https://api.github.com/repos/bhutchinson/kc/subscription","commits_url":"https://api.github.com/repos/bhutchinson/kc/commits{/sha}","git_commits_url":"https://api.github.com/repos/bhutchinson/kc/git/commits{/sha}","comments_url":"https://api.github.com/repos/bhutchinson/kc/comments{/number}","issue_comment_url":"https://api.github.com/repos/bhutchinson/kc/issues/comments/{number}","contents_url":"https://api.github.com/repos/bhutchinson/kc/contents/{+path}","compare_url":"https://api.github.com/repos/bhutchinson/kc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bhutchinson/kc/merges","archive_url":"https://api.github.com/repos/bhutchinson/kc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bhutchinson/kc/downloads","issues_url":"https://api.github.com/repos/bhutchinson/kc/issues{/number}","pulls_url":"https://api.github.com/repos/bhutchinson/kc/pulls{/number}","milestones_url":"https://api.github.com/repos/bhutchinson/kc/milestones{/number}","notifications_url":"https://api.github.com/repos/bhutchinson/kc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bhutchinson/kc/labels{/name}","releases_url":"https://api.github.com/repos/bhutchinson/kc/releases{/id}","created_at":"2014-12-04T17:51:44Z","updated_at":"2014-12-16T13:53:14Z","pushed_at":"2014-12-17T19:47:29Z","git_url":"git://github.com/bhutchinson/kc.git","ssh_url":"git@github.com:bhutchinson/kc.git","clone_url":"https://github.com/bhutchinson/kc.git","svn_url":"https://github.com/bhutchinson/kc","homepage":"http://www.kuali.org/kc","size":338853,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"kuali:master","ref":"master","sha":"4e3c6a9c40b4c5b3580f22a5ac81395b94386746","user":{"login":"kuali","id":371097,"avatar_url":"https://avatars.githubusercontent.com/u/371097?v=3","gravatar_id":"","url":"https://api.github.com/users/kuali","html_url":"https://github.com/kuali","followers_url":"https://api.github.com/users/kuali/followers","following_url":"https://api.github.com/users/kuali/following{/other_user}","gists_url":"https://api.github.com/users/kuali/gists{/gist_id}","starred_url":"https://api.github.com/users/kuali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuali/subscriptions","organizations_url":"https://api.github.com/users/kuali/orgs","repos_url":"https://api.github.com/users/kuali/repos","events_url":"https://api.github.com/users/kuali/events{/privacy}","received_events_url":"https://api.github.com/users/kuali/received_events","type":"Organization","site_admin":false},"repo":{"id":16106733,"name":"kc","full_name":"kuali/kc","owner":{"login":"kuali","id":371097,"avatar_url":"https://avatars.githubusercontent.com/u/371097?v=3","gravatar_id":"","url":"https://api.github.com/users/kuali","html_url":"https://github.com/kuali","followers_url":"https://api.github.com/users/kuali/followers","following_url":"https://api.github.com/users/kuali/following{/other_user}","gists_url":"https://api.github.com/users/kuali/gists{/gist_id}","starred_url":"https://api.github.com/users/kuali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuali/subscriptions","organizations_url":"https://api.github.com/users/kuali/orgs","repos_url":"https://api.github.com/users/kuali/repos","events_url":"https://api.github.com/users/kuali/events{/privacy}","received_events_url":"https://api.github.com/users/kuali/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kuali/kc","description":"Kuali Coeus","fork":false,"url":"https://api.github.com/repos/kuali/kc","forks_url":"https://api.github.com/repos/kuali/kc/forks","keys_url":"https://api.github.com/repos/kuali/kc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kuali/kc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kuali/kc/teams","hooks_url":"https://api.github.com/repos/kuali/kc/hooks","issue_events_url":"https://api.github.com/repos/kuali/kc/issues/events{/number}","events_url":"https://api.github.com/repos/kuali/kc/events","assignees_url":"https://api.github.com/repos/kuali/kc/assignees{/user}","branches_url":"https://api.github.com/repos/kuali/kc/branches{/branch}","tags_url":"https://api.github.com/repos/kuali/kc/tags","blobs_url":"https://api.github.com/repos/kuali/kc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kuali/kc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kuali/kc/git/refs{/sha}","trees_url":"https://api.github.com/repos/kuali/kc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kuali/kc/statuses/{sha}","languages_url":"https://api.github.com/repos/kuali/kc/languages","stargazers_url":"https://api.github.com/repos/kuali/kc/stargazers","contributors_url":"https://api.github.com/repos/kuali/kc/contributors","subscribers_url":"https://api.github.com/repos/kuali/kc/subscribers","subscription_url":"https://api.github.com/repos/kuali/kc/subscription","commits_url":"https://api.github.com/repos/kuali/kc/commits{/sha}","git_commits_url":"https://api.github.com/repos/kuali/kc/git/commits{/sha}","comments_url":"https://api.github.com/repos/kuali/kc/comments{/number}","issue_comment_url":"https://api.github.com/repos/kuali/kc/issues/comments/{number}","contents_url":"https://api.github.com/repos/kuali/kc/contents/{+path}","compare_url":"https://api.github.com/repos/kuali/kc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kuali/kc/merges","archive_url":"https://api.github.com/repos/kuali/kc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kuali/kc/downloads","issues_url":"https://api.github.com/repos/kuali/kc/issues{/number}","pulls_url":"https://api.github.com/repos/kuali/kc/pulls{/number}","milestones_url":"https://api.github.com/repos/kuali/kc/milestones{/number}","notifications_url":"https://api.github.com/repos/kuali/kc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kuali/kc/labels{/name}","releases_url":"https://api.github.com/repos/kuali/kc/releases{/id}","created_at":"2014-01-21T15:32:22Z","updated_at":"2014-12-17T18:56:08Z","pushed_at":"2014-12-17T18:56:07Z","git_url":"git://github.com/kuali/kc.git","ssh_url":"git@github.com:kuali/kc.git","clone_url":"https://github.com/kuali/kc.git","svn_url":"https://github.com/kuali/kc","homepage":"http://www.kuali.org/kc","size":694508,"stargazers_count":12,"watchers_count":12,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":48,"mirror_url":null,"open_issues_count":7,"forks":48,"open_issues":7,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kuali/kc/pulls/1307"},"html":{"href":"https://github.com/kuali/kc/pull/1307"},"issue":{"href":"https://api.github.com/repos/kuali/kc/issues/1307"},"comments":{"href":"https://api.github.com/repos/kuali/kc/issues/1307/comments"},"review_comments":{"href":"https://api.github.com/repos/kuali/kc/pulls/1307/comments"},"review_comment":{"href":"https://api.github.com/repos/kuali/kc/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/kuali/kc/pulls/1307/commits"},"statuses":{"href":"https://api.github.com/repos/kuali/kc/statuses/960a04ddff0e703ffaae5459f91b5bcaf44baad9"}}}}