@RequestMapping(value = "/op") public void methodWithRequestParams(@RequestParam(value = "param1", required = false) String param1, @RequestParam(value = "param2", required = false) String param2) { if (param1 == null || param2 == null) { throw new ResourceNotFoundException(); } }
@Override public Builder<A> toBuilder() { return new Builder<A>(getApi()).fromApiMetadata(this); }
@Override public Builder toBuilder() { return new Builder(getApi(), getAsyncApi()).fromApiMetadata(this); }
/** * Configures the STS connection. * * @author Adrian Cole */ @ConfiguresHttpApi public class STSHttpApiModule extends FormSigningHttpApiModule<STSApi> { }
@ConfiguresRestClient static class ConfiguresClientModule implements Module { public void configure(Binder arg0) { } }
@Override public ApiMetadata createApiMetadata() { return AnonymousRestApiMetadata.forClientMappedToAsyncClient(IntegrationTestClient.class, IntegrationTestAsyncClient.class).toBuilder().defaultEndpoint( "http://localhost:8080").version("1.0").build(); }
blobStore.getContext().utils().date() .iso8601DateFormat(creationDate).trim());
containerName, options); } catch (AuthorizationException ae) { if (ae.getCause() instanceof AccessDeniedException) { throw new S3Exception(S3ErrorCode.ACCESS_DENIED, "Could not create bucket", ae);
class MeterController { // ... @ExceptionHandler(ResourceNotFoundException.class) @ResponseStatus(HttpStatus.NOT_FOUND) public String handleResourceNotFoundException() { return "meters/notfound"; } // ... @RequestMapping(value = "/{number}/edit", method = RequestMethod.GET) public String viewEdit(@PathVariable("number") final Meter meter, final Model model) { if (meter == null) throw new ResourceNotFoundException(); model.addAttribute("meter", meter); return "meters/edit"; } }
@ConfiguresHttpApi private static final class TestDynECTHttpApiModule extends DynECTHttpApiModule { @Override protected void configure() { install(new SSLModule()); super.configure(); } }
@ConfiguresRestClient private static final class TestS3RestClientModule extends S3RestClientModule<S3Client, S3AsyncClient> { @Override protected String provideTimeStamp(@TimeStamp Supplier<String> cache) { return "2009-11-08T15:54:08.897Z"; } }
@Override public Builder<A> toBuilder() { return new Builder<A>(getApi()).fromApiMetadata(this); }
@Override public Builder toBuilder() { return new Builder(getApi(), getAsyncApi()).fromApiMetadata(this); }
blobStore.getContext().utils().date() .iso8601DateFormat(new Date()));
Project p = this.projectService.findProjectById(pid); if (p == null) { throw new ResourceNotFoundException(pid);
@ConfiguresRestClient private static final class TestAtmosRestClientModule extends AtmosRestClientModule { @Override protected void configure() { super.configure(); } @Override protected String provideTimeStamp(@TimeStamp Supplier<String> cache) { return DEFAULT_DATE; } }
@Override public Builder<A> toBuilder() { return new Builder<A>(getApi()).fromApiMetadata(this); }
@Override public Builder toBuilder() { return new Builder(getApi(), getAsyncApi()).fromApiMetadata(this); }
@ConfiguresRestClient private static final class TestS3RestClientModule extends S3RestClientModule<S3Client, S3AsyncClient> { @Override protected String provideTimeStamp(@TimeStamp Supplier<String> cache) { return "Thu, 05 Jun 2008 16:38:19 GMT"; } }
@Override public Builder<A> toBuilder() { return new Builder<A>(getApi()).fromApiMetadata(this); }