Commits

Sebastian Sdorra committed 9868a4c

added new browse options to restful endpoint

Comments (0)

Files changed (2)

scm-webapp/pom.xml

     <wagon.version>1.0</wagon.version>
     <maven.version>3.0.4</maven.version>
     <mustache.version>0.8.9</mustache.version>
-    <netbeans.hint.deploy.server>gfv3ee6</netbeans.hint.deploy.server>
+    <netbeans.hint.deploy.server>Tomcat</netbeans.hint.deploy.server>
   </properties>
 
   <profiles>

scm-webapp/src/main/java/sonia/scm/api/rest/resources/RepositoryResource.java

    * @param id the id of the repository
    * @param revision the revision of the file
    * @param path the path of the folder
+   * @param disableLastCommit true disables fetch of last commit message
+   * @param disableSubRepositoryDetection true disables sub repository detection
+   * @param recursive true to enable recursive browsing
    *
    * @return a list of folders and files for the given folder
    *
   @Path("{id}/browse")
   @TypeHint(BrowserResult.class)
   @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-  public Response getBrowserResult(@PathParam("id") String id,
-    @QueryParam("revision") String revision, @QueryParam("path") String path)
+  //J-
+  public Response getBrowserResult(
+    @PathParam("id") String id,
+    @QueryParam("revision") String revision, 
+    @QueryParam("path") String path,
+    @QueryParam("disableLastCommit") @DefaultValue("false") boolean disableLastCommit,
+    @QueryParam("disableSubRepositoryDetection") @DefaultValue("false") boolean disableSubRepositoryDetection,
+    @QueryParam("recursive") @DefaultValue("false") boolean recursive)
     throws RepositoryException, IOException
+  //J+
   {
     Response response = null;
     RepositoryService service = null;
       {
         builder.setPath(path);
       }
+      //J-
+      builder.setDisableLastCommit(disableLastCommit)
+             .setDisableSubRepositoryDetection(disableSubRepositoryDetection)
+             .setRecursive(recursive);
+      //J+
 
       BrowserResult result = builder.getBrowserResult();