Search in sources :

Example 51 with PathVariable

use of org.springframework.web.bind.annotation.PathVariable in project alien4cloud by alien4cloud.

the class ServiceSecurityController method getAuthorizedEnvironmentsPerApplication.

/**
 * List all environments per application authorised to access the location.
 *
 * @return list of all environments per application.
 */
@ApiOperation(value = "List all applications, environments and environment types authorized to access the service resource", notes = "Only user with ADMIN role can list authorized applications, environments and environment types for the location.")
@RequestMapping(value = "/environmentsPerApplication", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
@PreAuthorize("hasAuthority('ADMIN')")
public RestResponse<List<ApplicationEnvironmentAuthorizationDTO>> getAuthorizedEnvironmentsPerApplication(@PathVariable String serviceId) {
    ServiceResource service = serviceResourceService.getOrFail(serviceId);
    List<Application> applicationsRelatedToEnvironment = Lists.newArrayList();
    List<Application> applicationsRelatedToEnvironmentType = Lists.newArrayList();
    List<ApplicationEnvironment> environments = Lists.newArrayList();
    List<String> environmentTypes = Lists.newArrayList();
    List<Application> applications = Lists.newArrayList();
    if (service.getEnvironmentPermissions() != null && service.getEnvironmentPermissions().size() > 0) {
        environments = alienDAO.findByIds(ApplicationEnvironment.class, service.getEnvironmentPermissions().keySet().toArray(new String[service.getEnvironmentPermissions().size()]));
        Set<String> environmentApplicationIds = environments.stream().map(ae -> ae.getApplicationId()).collect(Collectors.toSet());
        applicationsRelatedToEnvironment = alienDAO.findByIds(Application.class, environmentApplicationIds.toArray(new String[environmentApplicationIds.size()]));
    }
    if (service.getEnvironmentTypePermissions() != null && service.getEnvironmentTypePermissions().size() > 0) {
        environmentTypes.addAll(service.getEnvironmentTypePermissions().keySet());
        Set<String> environmentTypeApplicationIds = Sets.newHashSet();
        for (String envType : safe(service.getEnvironmentTypePermissions()).keySet()) {
            environmentTypeApplicationIds.add(envType.split(":")[0]);
        }
        applicationsRelatedToEnvironmentType = alienDAO.findByIds(Application.class, environmentTypeApplicationIds.toArray(new String[environmentTypeApplicationIds.size()]));
    }
    if (service.getApplicationPermissions() != null && service.getApplicationPermissions().size() > 0) {
        applications = alienDAO.findByIds(Application.class, service.getApplicationPermissions().keySet().toArray(new String[service.getApplicationPermissions().size()]));
    }
    List<ApplicationEnvironmentAuthorizationDTO> result = ApplicationEnvironmentAuthorizationDTO.buildDTOs(applicationsRelatedToEnvironment, applicationsRelatedToEnvironmentType, environments, applications, environmentTypes);
    return RestResponseBuilder.<List<ApplicationEnvironmentAuthorizationDTO>>builder().data(result).build();
}
Also used : PathVariable(org.springframework.web.bind.annotation.PathVariable) Lists(org.elasticsearch.common.collect.Lists) Arrays(java.util.Arrays) ApplicationEnvironmentService(alien4cloud.application.ApplicationEnvironmentService) Subject(alien4cloud.security.Subject) PreAuthorize(org.springframework.security.access.prepost.PreAuthorize) ServiceResourceService(org.alien4cloud.alm.service.ServiceResourceService) ResourcePermissionService(alien4cloud.authorization.ResourcePermissionService) ApplicationEnvironmentAuthorizationDTO(alien4cloud.rest.orchestrator.model.ApplicationEnvironmentAuthorizationDTO) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) AlienUtils.safe(alien4cloud.utils.AlienUtils.safe) RequestBody(org.springframework.web.bind.annotation.RequestBody) ApiOperation(io.swagger.annotations.ApiOperation) Audit(alien4cloud.audit.annotation.Audit) RestResponseBuilder(alien4cloud.rest.model.RestResponseBuilder) RestResponse(alien4cloud.rest.model.RestResponse) Application(alien4cloud.model.application.Application) Api(io.swagger.annotations.Api) ApplicationEnvironment(alien4cloud.model.application.ApplicationEnvironment) MediaType(org.springframework.http.MediaType) Resource(javax.annotation.Resource) RequestMethod(org.springframework.web.bind.annotation.RequestMethod) Set(java.util.Set) IGenericSearchDAO(alien4cloud.dao.IGenericSearchDAO) RestController(org.springframework.web.bind.annotation.RestController) Collectors(java.util.stream.Collectors) Sets(com.google.common.collect.Sets) List(java.util.List) GroupDTO(alien4cloud.rest.orchestrator.model.GroupDTO) UserDTO(alien4cloud.rest.orchestrator.model.UserDTO) ApplicationEnvironmentAuthorizationUpdateRequest(alien4cloud.rest.orchestrator.model.ApplicationEnvironmentAuthorizationUpdateRequest) ServiceResource(alien4cloud.model.service.ServiceResource) ApplicationEnvironmentAuthorizationDTO(alien4cloud.rest.orchestrator.model.ApplicationEnvironmentAuthorizationDTO) ServiceResource(alien4cloud.model.service.ServiceResource) List(java.util.List) Application(alien4cloud.model.application.Application) ApplicationEnvironment(alien4cloud.model.application.ApplicationEnvironment) ApiOperation(io.swagger.annotations.ApiOperation) PreAuthorize(org.springframework.security.access.prepost.PreAuthorize) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 52 with PathVariable

use of org.springframework.web.bind.annotation.PathVariable in project alien4cloud by alien4cloud.

the class ServiceSecurityController method revokeApplicationAccess.

/**
 *****************************************************************************************************************************
 *
 * SECURITY ON APPLICATIONS
 *
 ******************************************************************************************************************************
 */
/**
 * Revoke the application's authorisation to access the location (including all related environments and environment types).
 *
 * @param serviceId The id of the location.
 * @param applicationId The authorized application.
 * @return A {@link Void} {@link RestResponse}.
 */
@ApiOperation(value = "Revoke the application's authorisation to access the service resource", notes = "Only user with ADMIN role can revoke access to the location.")
@RequestMapping(value = "/applications/{applicationId}", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE)
@PreAuthorize("hasAuthority('ADMIN')")
@Audit
public synchronized RestResponse<Void> revokeApplicationAccess(@PathVariable String serviceId, @PathVariable String applicationId) {
    ServiceResource service = serviceResourceService.getOrFail(serviceId);
    resourcePermissionService.revokePermission(service, Subject.APPLICATION, applicationId);
    // remove all environments related to this application
    ApplicationEnvironment[] aes = applicationEnvironmentService.getByApplicationId(applicationId);
    String[] envIds = Arrays.stream(aes).map(ae -> ae.getId()).toArray(String[]::new);
    resourcePermissionService.revokePermission(service, Subject.ENVIRONMENT, envIds);
    // remove all environments types related to this application
    Set<String> envTypeIds = Sets.newHashSet();
    for (String envType : safe(service.getEnvironmentTypePermissions()).keySet()) {
        if (envType.contains(applicationId)) {
            envTypeIds.add(envType);
        }
    }
    resourcePermissionService.revokePermission(service, Subject.ENVIRONMENT_TYPE, envTypeIds.toArray(new String[envTypeIds.size()]));
    return RestResponseBuilder.<Void>builder().build();
}
Also used : PathVariable(org.springframework.web.bind.annotation.PathVariable) Lists(org.elasticsearch.common.collect.Lists) Arrays(java.util.Arrays) ApplicationEnvironmentService(alien4cloud.application.ApplicationEnvironmentService) Subject(alien4cloud.security.Subject) PreAuthorize(org.springframework.security.access.prepost.PreAuthorize) ServiceResourceService(org.alien4cloud.alm.service.ServiceResourceService) ResourcePermissionService(alien4cloud.authorization.ResourcePermissionService) ApplicationEnvironmentAuthorizationDTO(alien4cloud.rest.orchestrator.model.ApplicationEnvironmentAuthorizationDTO) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) AlienUtils.safe(alien4cloud.utils.AlienUtils.safe) RequestBody(org.springframework.web.bind.annotation.RequestBody) ApiOperation(io.swagger.annotations.ApiOperation) Audit(alien4cloud.audit.annotation.Audit) RestResponseBuilder(alien4cloud.rest.model.RestResponseBuilder) RestResponse(alien4cloud.rest.model.RestResponse) Application(alien4cloud.model.application.Application) Api(io.swagger.annotations.Api) ApplicationEnvironment(alien4cloud.model.application.ApplicationEnvironment) MediaType(org.springframework.http.MediaType) Resource(javax.annotation.Resource) RequestMethod(org.springframework.web.bind.annotation.RequestMethod) Set(java.util.Set) IGenericSearchDAO(alien4cloud.dao.IGenericSearchDAO) RestController(org.springframework.web.bind.annotation.RestController) Collectors(java.util.stream.Collectors) Sets(com.google.common.collect.Sets) List(java.util.List) GroupDTO(alien4cloud.rest.orchestrator.model.GroupDTO) UserDTO(alien4cloud.rest.orchestrator.model.UserDTO) ApplicationEnvironmentAuthorizationUpdateRequest(alien4cloud.rest.orchestrator.model.ApplicationEnvironmentAuthorizationUpdateRequest) ServiceResource(alien4cloud.model.service.ServiceResource) ServiceResource(alien4cloud.model.service.ServiceResource) ApplicationEnvironment(alien4cloud.model.application.ApplicationEnvironment) Audit(alien4cloud.audit.annotation.Audit) ApiOperation(io.swagger.annotations.ApiOperation) PreAuthorize(org.springframework.security.access.prepost.PreAuthorize) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 53 with PathVariable

use of org.springframework.web.bind.annotation.PathVariable in project cas by apereo.

the class UmaUpdatePolicyForResourceSetEndpointController method updatePoliciesForResourceSet.

/**
 * Update policy for resource set.
 *
 * @param resourceId the resource id
 * @param policyId   the policy id
 * @param body       the body
 * @param request    the request
 * @param response   the response
 * @return the policy for resource set
 */
@PutMapping(value = '/' + OAuth20Constants.BASE_OAUTH20_URL + "/{resourceId}/" + OAuth20Constants.UMA_POLICY_URL + "/{policyId}", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity updatePoliciesForResourceSet(@PathVariable(value = "resourceId") final long resourceId, @PathVariable(value = "policyId") final long policyId, @RequestBody final String body, final HttpServletRequest request, final HttpServletResponse response) {
    try {
        val profileResult = getAuthenticatedProfile(request, response, OAuth20Constants.UMA_PROTECTION_SCOPE);
        val resourceSetResult = getUmaConfigurationContext().getUmaResourceSetRepository().getById(resourceId);
        if (resourceSetResult.isEmpty()) {
            val model = buildResponseEntityErrorModel(HttpStatus.NOT_FOUND, "Requested resource-set cannot be found");
            return new ResponseEntity(model, model, HttpStatus.BAD_REQUEST);
        }
        val resourceSet = resourceSetResult.get();
        resourceSet.validate(profileResult);
        val umaRequest = MAPPER.readValue(JsonValue.readHjson(body).toString(), ResourceSetPolicy.class);
        val policyResult = resourceSet.getPolicies().stream().filter(p -> p.getId() == policyId).findFirst();
        if (policyResult.isPresent()) {
            val policy = policyResult.get();
            policy.setPermissions(umaRequest.getPermissions());
            val currentPolicies = resourceSet.getPolicies().stream().filter(p -> p.getId() != policyId).collect(Collectors.toSet());
            currentPolicies.add(policy);
            resourceSet.setPolicies(new HashSet<>(currentPolicies));
            getUmaConfigurationContext().getUmaResourceSetRepository().save(resourceSet);
            val model = CollectionUtils.wrap("entity", resourceSet, "code", HttpStatus.FOUND);
            return new ResponseEntity(model, HttpStatus.OK);
        }
        val model = CollectionUtils.wrap("code", HttpStatus.NOT_FOUND);
        return new ResponseEntity(model, HttpStatus.OK);
    } catch (final Exception e) {
        LoggingUtils.error(LOGGER, e);
    }
    return new ResponseEntity("Unable to locate resource-set.", HttpStatus.BAD_REQUEST);
}
Also used : lombok.val(lombok.val) PathVariable(org.springframework.web.bind.annotation.PathVariable) OAuth20Constants(org.apereo.cas.support.oauth.OAuth20Constants) UmaConfigurationContext(org.apereo.cas.uma.UmaConfigurationContext) MediaType(org.springframework.http.MediaType) lombok.val(lombok.val) HttpServletResponse(javax.servlet.http.HttpServletResponse) ResourceSetPolicy(org.apereo.cas.uma.ticket.resource.ResourceSetPolicy) Controller(org.springframework.stereotype.Controller) Collectors(java.util.stream.Collectors) RequestBody(org.springframework.web.bind.annotation.RequestBody) HashSet(java.util.HashSet) HttpStatus(org.springframework.http.HttpStatus) LoggingUtils(org.apereo.cas.util.LoggingUtils) Slf4j(lombok.extern.slf4j.Slf4j) HttpServletRequest(javax.servlet.http.HttpServletRequest) PutMapping(org.springframework.web.bind.annotation.PutMapping) CollectionUtils(org.apereo.cas.util.CollectionUtils) JsonValue(org.hjson.JsonValue) ResponseEntity(org.springframework.http.ResponseEntity) BaseUmaEndpointController(org.apereo.cas.uma.web.controllers.BaseUmaEndpointController) ResponseEntity(org.springframework.http.ResponseEntity) PutMapping(org.springframework.web.bind.annotation.PutMapping)

Example 54 with PathVariable

use of org.springframework.web.bind.annotation.PathVariable in project mica2 by obiba.

the class NetworkController method network.

@GetMapping("/network/{id:.+}")
public ModelAndView network(@PathVariable String id, @RequestParam(value = "draft", required = false) String shareKey) {
    Map<String, Object> params = newParameters();
    Network network = getNetwork(id, shareKey);
    params.put("network", network);
    params.put("draft", !Strings.isNullOrEmpty(shareKey));
    List<Network> networks = publishedNetworkService.findByIds(network.getNetworkIds());
    params.put("networks", networks.stream().filter(n -> subjectAclService.isAccessible("/network", n.getId())).collect(Collectors.toList()));
    List<BaseStudy> studies = publishedStudyService.findByIds(network.getStudyIds());
    List<BaseStudy> individualStudies = studies.stream().filter(s -> (s instanceof Study) && subjectAclService.isAccessible("/individual-study", s.getId())).collect(Collectors.toList());
    params.put("individualStudies", individualStudies);
    List<BaseStudy> harmonizationStudies = studies.stream().filter(s -> (s instanceof HarmonizationStudy) && subjectAclService.isAccessible("/harmonization-study", s.getId())).collect(Collectors.toList());
    params.put("harmonizationStudies", harmonizationStudies);
    Map<String, LocalizedString> studyAcronyms = studies.stream().collect(Collectors.toMap(AbstractGitPersistable::getId, BaseStudy::getAcronym));
    params.put("studyAcronyms", studyAcronyms);
    List<String> ids = individualStudies.stream().map(AbstractGitPersistable::getId).collect(Collectors.toList());
    ids.addAll(harmonizationStudies.stream().map(AbstractGitPersistable::getId).collect(Collectors.toList()));
    if (!ids.isEmpty()) {
        params.put("affiliatedMembersQuery", "studyMemberships.parentId:(" + Joiner.on(" OR ").join(ids) + ")");
    }
    Map<String, List<Membership>> membershipMap = personService.getNetworkMembershipMap(network.getId());
    network.setMemberships(personService.setMembershipOrder(network.getMembershipSortOrder(), membershipMap));
    return new ModelAndView("network", params);
}
Also used : PathVariable(org.springframework.web.bind.annotation.PathVariable) LocalizedString(org.obiba.mica.core.domain.LocalizedString) RequestParam(org.springframework.web.bind.annotation.RequestParam) Membership(org.obiba.mica.core.domain.Membership) AbstractGitPersistable(org.obiba.mica.core.domain.AbstractGitPersistable) Controller(org.springframework.stereotype.Controller) Inject(javax.inject.Inject) Strings(com.google.common.base.Strings) Lists(com.google.common.collect.Lists) Map(java.util.Map) GetMapping(org.springframework.web.bind.annotation.GetMapping) Network(org.obiba.mica.network.domain.Network) PersonService(org.obiba.mica.core.service.PersonService) SubjectAclService(org.obiba.mica.security.service.SubjectAclService) HarmonizationStudy(org.obiba.mica.study.domain.HarmonizationStudy) BaseStudy(org.obiba.mica.study.domain.BaseStudy) NoSuchNetworkException(org.obiba.mica.network.NoSuchNetworkException) Collectors(java.util.stream.Collectors) PublishedStudyService(org.obiba.mica.study.service.PublishedStudyService) ModelAndView(org.springframework.web.servlet.ModelAndView) List(java.util.List) Study(org.obiba.mica.study.domain.Study) PublishedNetworkService(org.obiba.mica.network.service.PublishedNetworkService) NetworkService(org.obiba.mica.network.service.NetworkService) Joiner(com.google.common.base.Joiner) HarmonizationStudy(org.obiba.mica.study.domain.HarmonizationStudy) BaseStudy(org.obiba.mica.study.domain.BaseStudy) Study(org.obiba.mica.study.domain.Study) HarmonizationStudy(org.obiba.mica.study.domain.HarmonizationStudy) ModelAndView(org.springframework.web.servlet.ModelAndView) LocalizedString(org.obiba.mica.core.domain.LocalizedString) LocalizedString(org.obiba.mica.core.domain.LocalizedString) Network(org.obiba.mica.network.domain.Network) List(java.util.List) BaseStudy(org.obiba.mica.study.domain.BaseStudy) AbstractGitPersistable(org.obiba.mica.core.domain.AbstractGitPersistable) GetMapping(org.springframework.web.bind.annotation.GetMapping)

Example 55 with PathVariable

use of org.springframework.web.bind.annotation.PathVariable in project ArachneCentralAPI by OHDSI.

the class BaseSubmissionController method getResultFiles.

@ApiOperation("Get result files of the submission.")
@GetMapping("/api/v1/analysis-management/submissions/{submissionId}/results")
public List<ResultFileDTO> getResultFiles(Principal principal, @PathVariable("submissionId") Long submissionId, @RequestParam(value = "path", required = false, defaultValue = "") String path, @RequestParam(value = "real-name", required = false) String realName) throws PermissionDeniedException, IOException {
    IUser user = userService.getByUsername(principal.getName());
    ResultFileSearch resultFileSearch = new ResultFileSearch();
    resultFileSearch.setPath(path);
    resultFileSearch.setRealName(realName);
    List<? extends ArachneFileMeta> resultFileList = submissionService.getResultFiles(user, submissionId, resultFileSearch);
    String resultFilesPath = contentStorageHelper.getResultFilesDir(Submission.class, submissionId, null);
    return resultFileList.stream().map(rf -> {
        ResultFileDTO rfDto = conversionService.convert(rf, ResultFileDTO.class);
        rfDto.setSubmissionId(submissionId);
        rfDto.setRelativePath(contentStorageHelper.getRelativePath(resultFilesPath, rfDto.getPath()));
        return rfDto;
    }).collect(Collectors.toList());
}
Also used : PathVariable(org.springframework.web.bind.annotation.PathVariable) RequestParam(org.springframework.web.bind.annotation.RequestParam) AnalysisHelper(com.odysseusinc.arachne.portal.util.AnalysisHelper) ResultFile(com.odysseusinc.arachne.portal.model.ResultFile) LoggerFactory(org.slf4j.LoggerFactory) StringUtils(org.apache.commons.lang3.StringUtils) Valid(javax.validation.Valid) ApiOperation(io.swagger.annotations.ApiOperation) PutMapping(org.springframework.web.bind.annotation.PutMapping) Analysis(com.odysseusinc.arachne.portal.model.Analysis) ResultFileSearch(com.odysseusinc.arachne.portal.model.search.ResultFileSearch) SubmissionFile(com.odysseusinc.arachne.portal.model.SubmissionFile) DeleteMapping(org.springframework.web.bind.annotation.DeleteMapping) Path(java.nio.file.Path) SubmissionStatusHistoryElement(com.odysseusinc.arachne.portal.model.SubmissionStatusHistoryElement) ToPdfConverter(com.odysseusinc.arachne.portal.service.ToPdfConverter) BaseSubmissionService(com.odysseusinc.arachne.portal.service.submission.BaseSubmissionService) PostMapping(org.springframework.web.bind.annotation.PostMapping) BaseAnalysisService(com.odysseusinc.arachne.portal.service.analysis.BaseAnalysisService) ContentStorageService(com.odysseusinc.arachne.storage.service.ContentStorageService) ResultFileDTO(com.odysseusinc.arachne.portal.api.v1.dto.ResultFileDTO) HttpUtils(com.odysseusinc.arachne.portal.util.HttpUtils) MediaType(org.springframework.http.MediaType) ArachneFileMeta(com.odysseusinc.arachne.storage.model.ArachneFileMeta) Collectors(java.util.stream.Collectors) FileNotFoundException(java.io.FileNotFoundException) StandardCharsets(java.nio.charset.StandardCharsets) IUser(com.odysseusinc.arachne.portal.model.IUser) FileDTO(com.odysseusinc.arachne.portal.api.v1.dto.FileDTO) IOUtils(org.apache.commons.io.IOUtils) Principal(java.security.Principal) BaseSubmissionDTO(com.odysseusinc.arachne.portal.api.v1.dto.BaseSubmissionDTO) SubmissionStatus(com.odysseusinc.arachne.portal.model.SubmissionStatus) FilenameUtils(org.apache.commons.io.FilenameUtils) java.util(java.util) FileDtoContentHandler(com.odysseusinc.arachne.portal.api.v1.dto.converters.FileDtoContentHandler) ZipInputStream(java.util.zip.ZipInputStream) StringUtils.getFilename(org.springframework.util.StringUtils.getFilename) ArrayUtils(org.apache.commons.lang3.ArrayUtils) Submission(com.odysseusinc.arachne.portal.model.Submission) ValidationException(com.odysseusinc.arachne.portal.exception.ValidationException) JsonResult(com.odysseusinc.arachne.commons.api.v1.dto.util.JsonResult) RequestBody(org.springframework.web.bind.annotation.RequestBody) NoExecutableFileException(com.odysseusinc.arachne.portal.exception.NoExecutableFileException) ApproveDTO(com.odysseusinc.arachne.portal.api.v1.dto.ApproveDTO) ZipUtil(com.odysseusinc.arachne.portal.util.ZipUtil) Files(com.google.common.io.Files) ObjectUtils(org.apache.commons.lang3.ObjectUtils) SubmissionStatusHistoryElementDTO(com.odysseusinc.arachne.portal.api.v1.dto.SubmissionStatusHistoryElementDTO) NO_ERROR(com.odysseusinc.arachne.commons.api.v1.dto.util.JsonResult.ErrorCode.NO_ERROR) GetMapping(org.springframework.web.bind.annotation.GetMapping) UploadFileDTO(com.odysseusinc.arachne.portal.api.v1.dto.UploadFileDTO) BaseController(com.odysseusinc.arachne.portal.api.v1.controller.BaseController) Validated(org.springframework.validation.annotation.Validated) Logger(org.slf4j.Logger) HttpServletResponse(javax.servlet.http.HttpServletResponse) FileUtils(org.apache.commons.io.FileUtils) IOException(java.io.IOException) CommonAnalysisExecutionStatusDTO(com.odysseusinc.arachne.commons.api.v1.dto.CommonAnalysisExecutionStatusDTO) CreateSubmissionsDTO(com.odysseusinc.arachne.portal.api.v1.dto.CreateSubmissionsDTO) SubmissionFileDTO(com.odysseusinc.arachne.portal.api.v1.dto.SubmissionFileDTO) File(java.io.File) PermissionDeniedException(com.odysseusinc.arachne.portal.exception.PermissionDeniedException) ContentStorageHelper(com.odysseusinc.arachne.portal.util.ContentStorageHelper) HttpStatus(org.springframework.http.HttpStatus) NotExistException(com.odysseusinc.arachne.portal.exception.NotExistException) MultipartFile(org.springframework.web.multipart.MultipartFile) SubmissionDTO(com.odysseusinc.arachne.portal.api.v1.dto.SubmissionDTO) BaseSubmissionAndAnalysisTypeDTO(com.odysseusinc.arachne.portal.api.v1.dto.BaseSubmissionAndAnalysisTypeDTO) SubmissionInsightService(com.odysseusinc.arachne.portal.service.submission.SubmissionInsightService) ResultFileDTO(com.odysseusinc.arachne.portal.api.v1.dto.ResultFileDTO) IUser(com.odysseusinc.arachne.portal.model.IUser) ResultFileSearch(com.odysseusinc.arachne.portal.model.search.ResultFileSearch) GetMapping(org.springframework.web.bind.annotation.GetMapping) ApiOperation(io.swagger.annotations.ApiOperation)

Aggregations

PathVariable (org.springframework.web.bind.annotation.PathVariable)83 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)65 List (java.util.List)61 RequestParam (org.springframework.web.bind.annotation.RequestParam)54 Collectors (java.util.stream.Collectors)50 RequestMethod (org.springframework.web.bind.annotation.RequestMethod)48 RestController (org.springframework.web.bind.annotation.RestController)44 Autowired (org.springframework.beans.factory.annotation.Autowired)43 RequestBody (org.springframework.web.bind.annotation.RequestBody)42 MediaType (org.springframework.http.MediaType)40 ApiOperation (io.swagger.annotations.ApiOperation)37 HttpStatus (org.springframework.http.HttpStatus)33 IOException (java.io.IOException)32 Set (java.util.Set)29 ApiParam (io.swagger.annotations.ApiParam)27 HttpServletResponse (javax.servlet.http.HttpServletResponse)27 Map (java.util.Map)26 PreAuthorize (org.springframework.security.access.prepost.PreAuthorize)26 ResponseEntity (org.springframework.http.ResponseEntity)25 GetMapping (org.springframework.web.bind.annotation.GetMapping)24