Subversion Repositories XServices

Rev

Rev 92 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 92 Rev 109
Line 1... Line -...
1
/*
-
 
2
 *   Copyright 2012 Brian Rosenberger (Brutex Network)
-
 
3
 *
-
 
4
 *   Licensed under the Apache License, Version 2.0 (the "License");
-
 
5
 *   you may not use this file except in compliance with the License.
-
 
6
 *   You may obtain a copy of the License at
-
 
7
 *
-
 
8
 *       http://www.apache.org/licenses/LICENSE-2.0
-
 
9
 *
-
 
10
 *   Unless required by applicable law or agreed to in writing, software
-
 
11
 *   distributed under the License is distributed on an "AS IS" BASIS,
-
 
12
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-
 
13
 *   See the License for the specific language governing permissions and
-
 
14
 *   limitations under the License.
-
 
15
 */
-
 
16
 
-
 
17
package net.brutex.xservices.ws.rs;
1
package net.brutex.xservices.ws.rs;
Line 18... Line -...
18
 
-
 
19
import java.util.List;
-
 
20
 
2
 
21
import javax.ws.rs.DefaultValue;
3
import javax.ws.rs.DefaultValue;
22
import javax.ws.rs.GET;
4
import javax.ws.rs.GET;
23
import javax.ws.rs.Path;
-
 
24
import javax.ws.rs.PathParam;
5
import javax.ws.rs.Path;
25
import javax.ws.rs.Produces;
6
import javax.ws.rs.Produces;
26
import javax.ws.rs.QueryParam;
7
import javax.ws.rs.QueryParam;
27
import javax.ws.rs.core.Context;
8
import javax.ws.rs.core.Context;
28
import javax.ws.rs.core.HttpHeaders;
9
import javax.ws.rs.core.HttpHeaders;
Line 29... Line -...
29
import javax.ws.rs.core.Response;
-
 
30
 
-
 
31
import net.brutex.xservices.types.FileInfoType;
-
 
32
 
-
 
33
 
10
import javax.ws.rs.core.Response;
34
 
11
 
35
@Path("/FileService/")
12
@Path("/FileService/")
36
@Produces ("application/xml")
13
@Produces({"application/xml"})
37
public interface FileInfo {
-
 
38
 
-
 
39
/**
-
 
40
 * @param dir
-
 
41
 * @param withDir
-
 
42
 * @param withFiles
-
 
43
 * @param depth
-
 
44
 * @param search
-
 
45
 * @param count
-
 
46
 * @param page
-
 
47
 * @return List of File
14
public abstract interface FileInfo
48
 */
15
{
49
@GET
16
  @GET
50
@Path("getFiles/")
-
 
51
public Response getFiles(@Context HttpHeaders h,
-
 
52
		@QueryParam("directory") String dir,
-
 
53
		@QueryParam("includeDirectories") @DefaultValue("0") boolean withDir,
-
 
54
		@QueryParam("includeFiles") @DefaultValue("1")  boolean withFiles,
-
 
55
		@QueryParam("depth") @DefaultValue("1") int depth,
-
 
56
		@QueryParam("search") String search,
-
 
57
		@QueryParam("itemsPerPage") @DefaultValue("50") int count,
-
 
58
		@QueryParam("page") @DefaultValue("1") int page);
17
  @Path("getFiles/")
Line 59... Line -...
59
 
-
 
60
}
-