ApplicationController { @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/deps", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.Default.class) public ResponseEntity<List<Dependency>> getDependencies( @PathVariable String mvnGroup, @PathVariable String artifact, @PathVariable String version, @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false) String space) { Space s = null; try { s = this.spaceRepository.getSpace(space); } catch (Exception e) { log.error("Error retrieving space: " + e); return new ResponseEntity<List<Dependency>>(HttpStatus.NOT_FOUND); } try { final StopWatch sw = new StopWatch( "Query dependencies for application: " + mvnGroup + ":" + artifact + ":" + version) .start(); final List<Dependency> deps = depRepository.findByGAV(mvnGroup, artifact, version, s); for (Dependency dep : deps) { dep.setTotalTracedExecConstructCount( this.traceRepository.countTracesOfExecConstructLibrary( dep.getApp(), dep.getLib().getDigest())); dep.setTotalReachExecConstructCount( this.cidRepository.countReachableExecConstructsLibrary(dep)); } sw.stop(); return new ResponseEntity<List<Dependency>>(deps, HttpStatus.OK); } catch (EntityNotFoundException enfe) { return new ResponseEntity<List<Dependency>>(HttpStatus.NOT_FOUND); } } @Autowired  ApplicationController(
      ApplicationRepository appRepository,
      GoalExecutionRepository gexeRepository,
      DependencyRepository depRepository,
      TracesRepository traceRepository,
      LibraryRepository libRepository,
      PathRepository pathRepository,
      BugRepository bugRepository,
      SpaceRepository tokenRepository,
      ConstructIdRepository cidRepository,
      AffectedLibraryRepository affLibRepository,
      TenantRepository tenantRepository,
      V_AppVulndepRepository appVulDepRepository,
      ApplicationExporter appExporter,
      Filter cacheFilter); @Bean(name = DispatcherServletAutoConfiguration.DEFAULT_DISPATCHER_SERVLET_BEAN_NAME) DispatcherServlet dispatcherServlet(); @RequestMapping( value = "", method = RequestMethod.POST, consumes = {"application/json;charset=UTF-8"}, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.Default.class) ResponseEntity<Application> createApplication(
      @RequestBody Application application,
      @RequestParam(value = "skipResponseBody", required = false, defaultValue = "false")
          Boolean skipResponseBody,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping(value = "/{mvnGroup:.+}/{artifact:.+}", method = RequestMethod.DELETE) @JsonView(Views.Default.class) ResponseEntity<List<Application>> purgeApplicationVersions(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @RequestParam(value = "keep", required = false, defaultValue = "3") Integer keep,
      @RequestParam(value = "mode", required = false, defaultValue = "versions") String mode,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}", method = RequestMethod.PUT, consumes = {"application/json;charset=UTF-8"}, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.Default.class) ResponseEntity<Application> updateApplication(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @RequestBody Application application,
      @RequestParam(value = "skipResponseBody", required = false, defaultValue = "false")
          Boolean skipResponseBody,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.Default.class) ResponseEntity<Collection<Application>> getApplications(
      @RequestParam(value = "skipEmpty", required = false, defaultValue = "false")
          Boolean skipEmpty,
      //			@RequestParam(value="includeVulnerableFlag", required=false, defaultValue="false")
      // Boolean includeVulnerableFlag,
      @RequestParam(value = "group", required = false, defaultValue = "*") String g,
      @RequestParam(value = "artifact", required = false, defaultValue = "*") String a,
      @RequestParam(value = "version", required = false, defaultValue = "*") String v,
      @RequestParam(value = "asOf", required = false, defaultValue = "0") String asOfTimestamp,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping(value = "/export", method = RequestMethod.GET) void exportApplications(
      @RequestParam(value = "separator", required = false, defaultValue = ";")
          final String separator,
      @RequestParam(value = "includeSpaceProperties", required = false, defaultValue = "")
          final String[] includeSpaceProperties,
      @RequestParam(value = "includeGoalConfiguration", required = false, defaultValue = "")
          final String[] includeGoalConfiguration,
      @RequestParam(value = "includeGoalSystemInfo", required = false, defaultValue = "")
          final String[] includeGoalSystemInfo,
      @RequestParam(value = "vuln", required = false, defaultValue = "") final String[] vuln,
      @RequestParam(value = "to", required = false, defaultValue = "") final String[] to,
      @RequestParam(value = "format", required = false, defaultValue = "csv") final String format,
      @RequestHeader(value = Constants.HTTP_TENANT_HEADER, required = false) final String tenant,
      HttpServletRequest request,
      HttpServletResponse response); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) ResponseEntity<Application> cleanApplication(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @RequestParam(value = "clean", required = true) Boolean clean,
      @RequestParam(value = "cleanGoalHistory", required = false, defaultValue = "false")
          Boolean cleanGoalHistory,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/search", method = RequestMethod.GET) @JsonView(Views.Default.class) ResponseEntity<Set<ConstructSearchResult>> searchConstructsInAppDependencies(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @RequestParam(value = "searchString", required = true, defaultValue = "") String searchString,
      @RequestParam(value = "constructTypes", required = false, defaultValue = "")
          ConstructType[] constructTypes,
      @RequestParam(value = "wildcardSearch", required = false, defaultValue = "true")
          boolean wildcardSearch,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}", method = RequestMethod.OPTIONS) ResponseEntity<Application> isApplicationExisting(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.CountDetails.class) ResponseEntity<Application> getApplication(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @RequestParam(value = "inclTraces", required = false, defaultValue = "true")
          Boolean inclTraces,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/constructIds", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) ResponseEntity<Collection<ConstructId>> getApplicationConstructIds(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/goals", method = RequestMethod.POST, consumes = {"application/json;charset=UTF-8"}, produces = {"application/json;charset=UTF-8"}) ResponseEntity<GoalExecution> createGoalExecution(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @RequestBody GoalExecution goalExecution,
      @RequestParam(value = "skipResponseBody", required = false, defaultValue = "false")
          Boolean skipResponseBody,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/goals/{executionId}", method = RequestMethod.PUT, consumes = {"application/json;charset=UTF-8"}, produces = {"application/json;charset=UTF-8"}) ResponseEntity<GoalExecution> updateGoalExecution(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @PathVariable String executionId,
      @RequestBody GoalExecution goalExecution,
      @RequestParam(value = "skipResponseBody", required = false, defaultValue = "false")
          Boolean skipResponseBody,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/goals/{executionId}", method = RequestMethod.OPTIONS) ResponseEntity<GoalExecution> isGoalExecutionExisting(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @PathVariable String executionId,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/goals/{id}", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.GoalDetails.class) ResponseEntity<GoalExecution> getGoalExecution(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @PathVariable Long id,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/goals/latest", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.GoalDetails.class) ResponseEntity<GoalExecution> getLatestGoalExecution(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @RequestParam(value = "type", required = false, defaultValue = "") String type,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/goals", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.Default.class) ResponseEntity<List<GoalExecution>> getGoalExecutions(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/goals", method = RequestMethod.DELETE) ResponseEntity<List<GoalExecution>> deleteGoalExecutions(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/bugs", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.BugDetails.class) ResponseEntity<List<Bug>> getApplicationBugs(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @RequestParam(value = "historical", required = false, defaultValue = "false")
          Boolean historical,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/deps/intersect", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.Default.class) ResponseEntity<List<DependencyIntersection>> findDependencyIntersections(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/deps", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.Default.class) ResponseEntity<List<Dependency>> getDependencies(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/deps/{digest}", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.DepDetails.class) // extends View LibDetails that allows to see the properties ResponseEntity<Dependency> getDependency(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @PathVariable String digest,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/metrics", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) ResponseEntity<Metrics> getApplicationMetrics(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @RequestParam(value = "excludedScopes", required = false, defaultValue = "")
          Scope[] excludedScopes,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/deps/{digest}/updateMetrics", method = RequestMethod.POST, consumes = {"application/json;charset=UTF-8"}, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.DepDetails.class) // extends View LibDetails that allows to see the properties ResponseEntity<org.eclipse.steady.backend.model.DependencyUpdate> getUpdateMetrics(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @PathVariable String digest,
      @RequestBody LibraryId otherVersion,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/deps/{digest}/updateChanges", method = RequestMethod.POST, consumes = {"application/json;charset=UTF-8"}, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.DepDetails.class) // extends View LibDetails that allows to see the properties ResponseEntity<org.eclipse.steady.backend.model.DependencyUpdate> getUpdateChanges(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @PathVariable String digest,
      @RequestBody LibraryId otherVersion,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/vulndeps", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.Default.class) ResponseEntity<TreeSet<VulnerableDependency>> getAppVulnerableDependencies(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @RequestParam(value = "includeHistorical", required = false, defaultValue = "false")
          Boolean historical, // affected==0
      @RequestParam(value = "includeAffected", required = false, defaultValue = "true")
          Boolean affected, // affected==1
      @RequestParam(value = "includeAffectedUnconfirmed", required = false, defaultValue = "true")
          Boolean includeAffectedUnconfirmed, // affectedConfirmed==0
      @RequestParam(value = "addExcemptionInfo", required = false, defaultValue = "false")
          Boolean addExcemptionInfo, // consider configuration setting
      // "vulas.report.exceptionScopeBlacklist" and
      // "vulas.report.exceptionExcludeBugs"
      @RequestParam(value = "lastChange", required = false, defaultValue = "")
          String lastChange, // a timestamp identifier which is used to cache the response or not
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/vulndeps", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.Default.class) ResponseEntity<TreeSet<VulnerableDependency>> getVulnerableDependencies(
      @RequestParam(value = "unconfirmedOnly", required = false, defaultValue = "true")
          Boolean unconfirmedOnly); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/vulndeps/{digest}/bugs/{bugid}", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.VulnDepDetails.class) ResponseEntity<VulnerableDependency> getVulnerableDependencyBugDetails(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @PathVariable String digest,
      @PathVariable String bugid,
      @RequestParam(value = "origin", required = true, defaultValue = "CC")
          VulnDepOrigin vulnDepOrigin,
      @RequestParam(value = "bundledGroup", required = false, defaultValue = "")
          String bundledGroup,
      @RequestParam(value = "bundledArtifact", required = false, defaultValue = "")
          String bundledArtifact,
      @RequestParam(value = "bundledVersion", required = false, defaultValue = "")
          String bundledVersion,
      @RequestParam(value = "bundledLibrary", required = false, defaultValue = "")
          String bundledLibrary,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/traces", method = RequestMethod.POST, consumes = {"application/json;charset=UTF-8"}, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.Default.class) ResponseEntity<List<Trace>> createTraces(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @RequestBody Trace[] traces,
      @RequestParam(value = "skipResponseBody", required = false, defaultValue = "false")
          Boolean skipResponseBody,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/traces", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.Default.class) ResponseEntity<List<Trace>> getTraces(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/reachableConstructIds", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.DepDetails.class) ResponseEntity<Collection<Dependency>> getReachableContructIds(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/paths", method = RequestMethod.POST, consumes = {"application/json;charset=UTF-8"}, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.Default.class) ResponseEntity<List<Path>> createPaths(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @RequestBody Path[] paths,
      @RequestParam(value = "skipResponseBody", required = false, defaultValue = "false")
          Boolean skipResponseBody,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/paths", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.Default.class) ResponseEntity<List<Path>> getPaths(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/deps/{digest}/paths/{bugId}", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.Default.class) ResponseEntity<List<Path>> getVulndepPaths(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @PathVariable String digest,
      @PathVariable String bugId,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/deps/{digest}/paths/{bugId}/{qname}", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) @JsonView(Views.Default.class) ResponseEntity<List<Path>> getVulndepConstructPaths(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @PathVariable String digest,
      @PathVariable String bugId,
      @PathVariable String qname,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/deps/{digest}/reachableConstructIds", method = RequestMethod.POST, consumes = {"application/json;charset=UTF-8"}, produces = {"application/json;charset=UTF-8"}) ResponseEntity<Set<ConstructId>> createReachableConstructIds(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @PathVariable String digest,
      @RequestBody ConstructId[] constructIds,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); @RequestMapping( value = "/{mvnGroup:.+}/{artifact:.+}/{version:.+}/deps/{digest}/touchPoints", method = RequestMethod.POST, consumes = {"application/json;charset=UTF-8"}, produces = {"application/json;charset=UTF-8"}) ResponseEntity<Set<TouchPoint>> createTouchPoints(
      @PathVariable String mvnGroup,
      @PathVariable String artifact,
      @PathVariable String version,
      @PathVariable String digest,
      @RequestBody TouchPoint[] touchPoints,
      @RequestParam(value = "skipResponseBody", required = false, defaultValue = "false")
          Boolean skipResponseBody,
      @ApiIgnore @RequestHeader(value = Constants.HTTP_SPACE_HEADER, required = false)
          String space); static final String SENDER_EMAIL; static final String ALL_APPS_CSV_SUBJECT; }
@Test @Transactional public void testCleanApp() throws Exception { final Library lib = this.createExampleLibrary(); this.libRepository.customSave(lib); Application app = this.createExampleApplication(); app = this.appRepository.customSave(app); assertEquals(1, this.appRepository.count()); final MockHttpServletRequestBuilder post_builder = post(getAppUri(app)).param("clean", "true").accept(MediaType.APPLICATION_JSON); mockMvc .perform(post_builder) .andExpect(status().isOk()) .andExpect(content().contentType(contentTypeJson)); assertEquals(1, this.appRepository.count()); final Application managed_app = this.appRepository.findOne(app.getId()); final Boolean isEmpty = (managed_app.getConstructs() == null || managed_app.getConstructs().isEmpty()) && (managed_app.getDependencies() == null || managed_app.getDependencies().isEmpty()); assertEquals(true, isEmpty); }