|
26 | 26 | import com.jaspersoft.jasperserver.jaxrs.client.core.exceptions.ResourceNotFoundException; |
27 | 27 | import com.jaspersoft.jasperserver.jaxrs.client.filters.BasicAuthenticationFilter; |
28 | 28 | import com.jaspersoft.jasperserver.jaxrs.client.filters.SessionOutputFilter; |
29 | | -import java.util.Locale; |
30 | | -import java.util.TimeZone; |
| 29 | +import org.glassfish.jersey.client.ClientProperties; |
| 30 | + |
31 | 31 | import javax.ws.rs.client.Entity; |
32 | 32 | import javax.ws.rs.client.WebTarget; |
33 | 33 | import javax.ws.rs.core.Form; |
34 | 34 | import javax.ws.rs.core.MediaType; |
35 | 35 | import javax.ws.rs.core.Response; |
36 | 36 | import javax.ws.rs.core.Response.Status; |
37 | | -import org.glassfish.jersey.client.ClientProperties; |
| 37 | +import java.util.Locale; |
| 38 | +import java.util.TimeZone; |
38 | 39 |
|
39 | 40 | public class JasperserverRestClient { |
40 | 41 | private final RestClientConfiguration configuration; |
@@ -83,6 +84,10 @@ public AnonymousSession getAnonymousSession() { |
83 | 84 | return new AnonymousSession(new SessionStorage(configuration, null, Locale.getDefault(), TimeZone.getDefault())); |
84 | 85 | } |
85 | 86 |
|
| 87 | + public AnonymousSession getAnonymousSession(Locale userLocale) { |
| 88 | + return new AnonymousSession(new SessionStorage(configuration, null, userLocale, TimeZone.getDefault())); |
| 89 | + } |
| 90 | + |
86 | 91 | protected void login(SessionStorage storage) throws JSClientWebException { |
87 | 92 |
|
88 | 93 | AuthenticationCredentials credentials = storage.getCredentials(); |
|
0 commit comments