mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 08:25:44 +01:00
added new browse options to restful endpoint
This commit is contained in:
@@ -440,7 +440,7 @@
|
|||||||
<wagon.version>1.0</wagon.version>
|
<wagon.version>1.0</wagon.version>
|
||||||
<maven.version>3.0.4</maven.version>
|
<maven.version>3.0.4</maven.version>
|
||||||
<mustache.version>0.8.9</mustache.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>
|
</properties>
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
|
|||||||
@@ -467,6 +467,9 @@ public class RepositoryResource
|
|||||||
* @param id the id of the repository
|
* @param id the id of the repository
|
||||||
* @param revision the revision of the file
|
* @param revision the revision of the file
|
||||||
* @param path the path of the folder
|
* @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
|
* @return a list of folders and files for the given folder
|
||||||
*
|
*
|
||||||
@@ -477,9 +480,16 @@ public class RepositoryResource
|
|||||||
@Path("{id}/browse")
|
@Path("{id}/browse")
|
||||||
@TypeHint(BrowserResult.class)
|
@TypeHint(BrowserResult.class)
|
||||||
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
|
||||||
public Response getBrowserResult(@PathParam("id") String id,
|
//J-
|
||||||
@QueryParam("revision") String revision, @QueryParam("path") String path)
|
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
|
throws RepositoryException, IOException
|
||||||
|
//J+
|
||||||
{
|
{
|
||||||
Response response = null;
|
Response response = null;
|
||||||
RepositoryService service = null;
|
RepositoryService service = null;
|
||||||
@@ -499,6 +509,11 @@ public class RepositoryResource
|
|||||||
{
|
{
|
||||||
builder.setPath(path);
|
builder.setPath(path);
|
||||||
}
|
}
|
||||||
|
//J-
|
||||||
|
builder.setDisableLastCommit(disableLastCommit)
|
||||||
|
.setDisableSubRepositoryDetection(disableSubRepositoryDetection)
|
||||||
|
.setRecursive(recursive);
|
||||||
|
//J+
|
||||||
|
|
||||||
BrowserResult result = builder.getBrowserResult();
|
BrowserResult result = builder.getBrowserResult();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user