public TwilioDelegate(ExecutionContext executionContext, PushObjectMapper objectMapper, PushRequestStore pushRequestStore, PushRequest pushRequest, TwilioSmsPush push, TwilioConfig config) { super(executionContext, objectMapper, pushRequestStore, pushRequest); this.config = ExceptionUtils.assertNotNull(config, "config"); this.push = ExceptionUtils.assertNotNull(push, "push"); // this.bitlyApis = bitlyApis; }
public static ApiException fromCode(int code, FineMessage richMessage) { return fromCode(toHttpStatusCode(code), richMessage); } public static ApiException fromCode(HttpStatusCode httpStatusCode, FineMessage richMessage) {
public static File assertIsDirectory(File file) throws IOException { return assertIsDirectory(file, IOException.class); } public static <X extends Exception> File assertIsDirectory(File file, Class<X> type) throws X {
protected final void throwError(CouchResponse response, String message) { if (response.isNotFound()) { throw ApiNotFoundException.notFound(message); } else if (response.isConflict()) { throw ApiConflictException.conflict(message); } else { message = format("%s: %s", message, response.getErrorReason()).trim(); throw ApiException.internalServerError(message); } }
public static Path assertIsFile(Path path) throws IOException { return assertIsFile(path, IOException.class); } public static <X extends Exception> Path assertIsFile(Path path, Class<X> type) throws X {
public static File assertExists(File file) throws FileNotFoundException { return assertExists(file, FileNotFoundException.class); } public static <X extends Exception> File assertExists(File file, Class<X> type) throws X {
public FineRuntimeException(Throwable ex, Map<?,?> traits) { this(true, toMsgSet(null, null, ex, traits), ex); } public FineRuntimeException(Throwable ex, Collection<String> traits) {
public static <T> T[] assertNotEmpty(T[] value, String name) { return assertNotEmpty(value, name, NullPointerException.class, IllegalArgumentException.class); } public static <T, X1 extends Exception, X2 extends Exception> T[] assertNotEmpty(T[] value, String name, Class<X1> nullType, Class<X2> type) throws X1, X2 {
public static long assertNegative(long value, String name) { return assertNegative(value, name, IllegalArgumentException.class); } public static <X extends Exception> long assertNegative(long value, String name, Class<X> type) throws X {
public SmtpEmailDelegate(ExecutionContext executionContext, PushObjectMapper objectMapper, PushRequestStore pushRequestStore, PushRequest pushRequest, SmtpEmailPush push, SmtpEmailConfig config) { super(executionContext, objectMapper, pushRequestStore, pushRequest); this.push = ExceptionUtils.assertNotNull(push, "push"); this.config = ExceptionUtils.assertNotNull(config, "config"); // this.bitlyApis = bitlyApis; }
public static ApiException fromCode(int code) { return fromCode(toHttpStatusCode(code)); } public static ApiException fromCode(HttpStatusCode httpStatusCode) {
public static Path assertIsDirectory(Path path) throws IOException { return assertIsDirectory(path, IOException.class); } public static <X extends Exception> Path assertIsDirectory(Path path, Class<X> type) throws X {
public static File assertIsFile(File file) throws IOException { return assertIsFile(file, IOException.class); } public static <X extends Exception> File assertIsFile(File file, Class<X> type) throws X {
public static <T> T assertNotNull(T value, String name) { return assertNotNull(value, name, NullPointerException.class); } public static <T, X extends Exception> T assertNotNull(T value, String name, Class<X> type) throws X {
public static ApiException fromCode(int code, String message, Throwable ex, String...traits) { return fromCode(toHttpStatusCode(code), message, ex, traits); } public static ApiException fromCode(HttpStatusCode httpStatusCode, String message, Throwable ex, String...traits) {
public DefaultCouchStore(CouchServer couchServer, Class<T> entityType) { this.couchServer = ExceptionUtils.assertNotNull(couchServer, "couchServer"); this.entityType = ExceptionUtils.assertNotNull(entityType, "entityType"); }
public static ApiException fromCode(int code, FineMessageSet messageSet) { return fromCode(toHttpStatusCode(code), messageSet); } public static ApiException fromCode(HttpStatusCode httpStatusCode, FineMessageSet messageSet) {
public static ApiException fromCode(int code, String message, String...traits) { return fromCode(toHttpStatusCode(code), message, traits); } public static ApiException fromCode(HttpStatusCode httpStatusCode, String message, String...traits) {
public static ApiException fromCode(int code, FineMessage richMessage, Throwable ex) { return fromCode(toHttpStatusCode(code), richMessage, ex); } public static ApiException fromCode(HttpStatusCode httpStatusCode, FineMessage richMessage, Throwable ex) {
public static ApiException fromCode(int code, FineMessageSet messageSet, Throwable ex) { return fromCode(toHttpStatusCode(code), messageSet, ex); } public static ApiException fromCode(HttpStatusCode httpStatusCode, FineMessageSet messageSet, Throwable ex) {