1 package com.trendmicro.grid.acl.l0;
2
3 import com.trendmicro.grid.acl.ProtectedRequestContext;
4 import com.trendmicro.grid.acl.RequiredRoles;
5 import com.trendmicro.grid.acl.l0.datatypes.FileIdentifier;
6 import com.trendmicro.grid.acl.l0.datatypes.PackageDetails;
7 import com.trendmicro.grid.acl.l0.datatypes.PackageFamily;
8 import com.trendmicro.grid.acl.l0.datatypes.Vendor;
9
10 import javax.jws.WebMethod;
11 import javax.jws.WebParam;
12 import javax.jws.WebResult;
13 import javax.jws.WebService;
14 import javax.servlet.annotation.WebServlet;
15 import javax.xml.ws.ResponseWrapper;
16 import java.util.Collection;
17
18 import static com.trendmicro.grid.acl.l0.KnownRoles.ROLE_ACCESS_DETAILS;
19 import static com.trendmicro.grid.acl.l0.KnownRoles.ROLE_ACCESS_PROTECTED_SERVICES;
20 import static com.trendmicro.grid.acl.l0.KnownRoles.ROLE_RUN_PACKAGE_QUERIES;
21
22
23
24
25
26
27
28 @ProtectedRequestContext
29 @WebServlet("/ws/level-0/internal/packages")
30 @WebService(targetNamespace = Level0Constants.NAMESPACE)
31 public interface PackageService extends PublicPackageService {
32
33
34
35
36
37
38
39
40 @WebMethod
41 @WebResult(name = "vendor")
42 @RequiredRoles({ROLE_RUN_PACKAGE_QUERIES, ROLE_ACCESS_DETAILS, ROLE_ACCESS_PROTECTED_SERVICES})
43 Vendor getVendor(@WebParam(name = "name") String name) throws AuthenticationException;
44
45
46
47
48
49
50
51
52
53 @WebMethod
54 @WebResult(name = "packageFamily")
55 @RequiredRoles({ROLE_RUN_PACKAGE_QUERIES, ROLE_ACCESS_DETAILS, ROLE_ACCESS_PROTECTED_SERVICES})
56 PackageFamily getPackageFamily(
57 @WebParam(name = "basename") String basename) throws AuthenticationException;
58
59
60
61
62
63
64
65
66
67 @WebMethod
68 @WebResult(name = "packageDetails")
69 @RequiredRoles({ROLE_RUN_PACKAGE_QUERIES, ROLE_ACCESS_DETAILS, ROLE_ACCESS_PROTECTED_SERVICES})
70 PackageDetails getPackageDetailsById(
71 @WebParam(name = "packageFileId") FileIdentifier file) throws AuthenticationException;
72
73
74
75
76
77
78
79
80
81 @WebMethod
82 @WebResult(name = "packageDetails")
83 @ResponseWrapper(
84 className = "com.trendmicro.grid.acl.l0.wrappers.GetPackageDetailsListByIdResponse")
85 @RequiredRoles({ROLE_RUN_PACKAGE_QUERIES, ROLE_ACCESS_DETAILS, ROLE_ACCESS_PROTECTED_SERVICES})
86 Collection<PackageDetails> getPackageDetailsListById(
87 @WebParam(name = "packageFileId") BatchCollection<FileIdentifier> files) throws AuthenticationException;
88
89
90
91
92
93
94
95
96
97 @WebMethod
98 @WebResult(name = "packageDetails")
99 @RequiredRoles({ROLE_RUN_PACKAGE_QUERIES, ROLE_ACCESS_DETAILS, ROLE_ACCESS_PROTECTED_SERVICES})
100 PackageDetails getPackageDetailsByName(
101 @WebParam(name = "packageName") String packageName) throws AuthenticationException;
102
103
104
105
106
107
108
109
110
111 @WebMethod
112 @WebResult(name = "packageDetails")
113 @ResponseWrapper(
114 className = "com.trendmicro.grid.acl.l0.wrappers.GetPackageDetailsListByNameResponse")
115 @RequiredRoles({ROLE_RUN_PACKAGE_QUERIES, ROLE_ACCESS_DETAILS, ROLE_ACCESS_PROTECTED_SERVICES})
116 Collection<PackageDetails> getPackageDetailsListByName(
117 @WebParam(name = "packageName") BatchCollection<String> packageNames) throws AuthenticationException;
118 }