@@ -0,0 +1,1854 @@
+/*%0A * Copyright 2016 SEARCH-The National Consortium for Justice Information and Statistics%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *    http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.search.nibrs.stagingdata.controller;%0A%0Aimport java.util.List;%0A%0Aimport org.joda.time.LocalDateTime;%0Aimport org.search.nibrs.stagingdata.model.Submission;%0Aimport org.search.nibrs.stagingdata.repository.SubmissionRepository;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.web.bind.annotation.GetMapping;%0Aimport org.springframework.web.bind.annotation.PostMapping;%0Aimport org.springframework.web.bind.annotation.RequestBody;%0Aimport org.springframework.web.bind.annotation.RestController;%0A%0A@RestController%0Apublic class SubmissionController %7B%0A%09@Autowired%0A%09private SubmissionRepository submissionRepository;%0A%09%0A%09@PostMapping(%22/submissions%22)%0A%09public Submission saveSubmission(@RequestBody Submission submission)%7B%0A%09%09/*%0A%09%09 * To fulfill the relationship mapping. %0A%09%09 */%0A%09%09submission.getViolations()%0A%09%09%09.forEach(violation-%3Eviolation.setSubmission(submission));%0A%09%09return submissionRepository.save(submission);%0A%09%7D%0A%09%0A%09@GetMapping(value=%22/submissions%22)%0A%09public List%3CSubmission%3E getAllSubmissions()%7B%0A%09%09return submissionRepository.findAll();%0A%09%7D%0A%09%0A%09@GetMapping(value=%22/localDateTime%22)%0A%09public String getLocalDateTime()%7B%0A%09%09return LocalDateTime.now().toString();%0A%09%7D%0A%09%0A%7D%0A

Add the controller to be able to save Submission via rest calls.