blob: 410f98a468dbfca0bf587623935f2a63e97923e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
package com.netscape.certsrv.profile;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Response;
import org.jboss.resteasy.annotations.ClientResponseType;
import com.netscape.certsrv.acls.ACLMapping;
import com.netscape.certsrv.authentication.AuthMethodMapping;
@Path("profiles")
@AuthMethodMapping("profiles")
public interface ProfileResource {
@GET
@ClientResponseType(entityType=ProfileDataInfos.class)
@ACLMapping("profiles.list")
public Response listProfiles(
@QueryParam("start") Integer start,
@QueryParam("size") Integer size);
@GET
@Path("{id}")
@ClientResponseType(entityType=ProfileData.class)
@ACLMapping("profiles.read")
public Response retrieveProfile(@PathParam("id") String id);
@GET
@Path("{id}/raw")
@ClientResponseType(entityType=byte[].class)
@ACLMapping("profiles.read")
public Response retrieveProfileRaw(@PathParam("id") String id);
@POST
@ClientResponseType(entityType=ProfileData.class)
@ACLMapping("profiles.create")
public Response createProfile(ProfileData data);
@POST
@Path("raw")
@ClientResponseType(entityType=byte[].class)
@ACLMapping("profiles.create")
public Response createProfileRaw(byte[] data);
@POST
@Path("{id}")
@ClientResponseType(entityType=Void.class)
@ACLMapping("profiles.approve")
public Response modifyProfileState(@PathParam("id") String id, @QueryParam("action") String action);
@PUT
@Path("{id}")
@ClientResponseType(entityType=ProfileData.class)
@ACLMapping("profiles.modify")
public Response modifyProfile(@PathParam("id") String id, ProfileData data);
@PUT
@Path("{id}/raw")
@ClientResponseType(entityType=byte[].class)
@ACLMapping("profiles.modify")
public Response modifyProfileRaw(@PathParam("id") String id, byte[] data);
@DELETE
@Path("{id}")
@ClientResponseType(entityType=Void.class)
@ACLMapping("profiles.delete")
public Response deleteProfile(@PathParam("id") String id);
}
|