public DestinationDef(String name, DestinationStatus destinationStatus, String provider, String... arguments) { this(name, destinationStatus, provider, BeanUtils.toMap(arguments)); }
public static <T> int compare(Comparable<T> objectA, T objectB) { if (objectA == objectB) { return 0; } int result = compareForNull(objectA, objectB); if (result != 0) return result; // noinspection unchecked return objectA.compareTo(objectB); }
private static ComparisonResults.Builder compareMaps(ComparisonResults.Builder builder, Map<?,?> mapA, Map<?,?> mapB, String beanName) { int countA = mapA.size(); int countB = mapB.size(); if (countA != countB) { builder.add(beanName+":count()", countA, countB, ComparisonResults.SIZE); } Collection<?> keysA = mapA.keySet(); Collection<?> keysB = mapB.keySet(); List<?> intersection = BeanUtils.intersection(keysA, keysB); for (Object key : intersection) { Object valueA = mapA.get(key); Object valueB = mapB.get(key); compare(builder, null, valueA, valueB, beanName+"["+key+"]"); } for (Object key : mapA.keySet()) { if (intersection.contains(key) == false) { builder.add(beanName+"["+key+"]", mapA.get(key), null, ComparisonResults.MISSING_B); } } for (Object key : mapB.keySet()) { if (intersection.contains(key) == false) { builder.add(beanName+"["+key+"]", null, mapA.get(key), ComparisonResults.MISSING_A); } } return builder; }
buffer.append("["); for (int arrayDex = 0; arrayDex < Array.getLength(value); arrayDex++) { buffer.append(getObjectAsString(Array.get(value, arrayDex), false)); if (arrayDex < Array.getLength(value) - 1) { buffer.append(",");
public TraitMap(String...traitStrings) { this(BeanUtils.toMap(traitStrings)); }
public TraitMap(Collection<String> traitStrings) { this(BeanUtils.toMap(traitStrings)); }
public Destination(String name, String provider, String... arguments) { this(name, provider, DestinationStatus.ENABLED, BeanUtils.toMap(arguments)); }
public static LinkedHashMap<String, String> toMap(String... keyValuePairs) { List<String> list = new ArrayList<>(); if (keyValuePairs != null) { Collections.addAll(list, keyValuePairs); } return toMap(list); }
@Bean public TrustedUserStore trustedUserStore() { return new TrustedUserStore(BeanUtils.toMap( "admin:Testing123" )); }
public TraitMap add(Collection<String> traits) { return add(traits == null ? Collections.emptyMap() : BeanUtils.toMap(traits)); }
public TraitMap add(String...traits) { return add(traits == null ? Collections.emptyMap() : BeanUtils.toMap(traits)); }
public static XmppPush newPush(String recipient, String message, String callbackUrl, String...traits) { InetAddress remoteAddress = PushUtils.getLocalHost(); return new XmppPush( recipient, message, callbackUrl, remoteAddress.getCanonicalHostName(), remoteAddress.getHostAddress(), BeanUtils.toMap(traits)); }
public static SmtpEmailPush newPush(String toAddress, String fromAddress, String emailSubject, String htmlContent, String callbackUrl, String... traits) { InetAddress remoteAddress = PushUtils.getLocalHost(); return new SmtpEmailPush(toAddress, fromAddress, emailSubject, htmlContent, callbackUrl, remoteAddress.getCanonicalHostName(), remoteAddress.getHostAddress(), BeanUtils.toMap(traits)); }
public static SmtpEmailPush newPush(String toAddress, String fromAddress, String emailSubject, String htmlContent, String callbackUrl, String... traits) { InetAddress remoteAddress = PushUtils.getLocalHost(); return new SmtpEmailPush(toAddress, fromAddress, emailSubject, htmlContent, callbackUrl, remoteAddress.getCanonicalHostName(), remoteAddress.getHostAddress(), BeanUtils.toMap(traits)); }
public static SesEmailPush newPush(String toAddress, String fromAddress, String emailSubject, String htmlContent, String callbackUrl, String... traits) { InetAddress remoteAddress = PushUtils.getLocalHost(); return new SesEmailPush(toAddress, fromAddress, emailSubject, htmlContent, callbackUrl, remoteAddress.getCanonicalHostName(), remoteAddress.getHostAddress(), BeanUtils.toMap(traits)); }
public static XmppPush newPush(String recipient, String message, String callbackUrl, String...traits) { InetAddress remoteAddress = PushUtils.getLocalHost(); return new XmppPush( recipient, message, callbackUrl, remoteAddress.getCanonicalHostName(), remoteAddress.getHostAddress(), BeanUtils.toMap(traits)); }
public static SesEmailPush newPush(String toAddress, String fromAddress, String emailSubject, String htmlContent, String callbackUrl, String... traits) { InetAddress remoteAddress = PushUtils.getLocalHost(); return new SesEmailPush(toAddress, fromAddress, emailSubject, htmlContent, callbackUrl, remoteAddress.getCanonicalHostName(), remoteAddress.getHostAddress(), BeanUtils.toMap(traits)); }
public static NotificationPushV1 newPush(String message, String callbackUrl, String...traits) { InetAddress remoteAddress = PushUtils.getLocalHost(); return new NotificationPushV1(message, callbackUrl, remoteAddress.getCanonicalHostName(), remoteAddress.getHostAddress(), BeanUtils.toMap(traits)); }
public static TwilioSmsPush newPush(String from, String recipient,String message, String callbackUrl, String...traits) { InetAddress remoteAddress = PushUtils.getLocalHost(); return new TwilioSmsPush(from, recipient, message, callbackUrl, remoteAddress.getCanonicalHostName(), remoteAddress.getHostAddress(), BeanUtils.toMap(traits)); }
public static EmailToSmsPushV1 newPush(String toAddress, String fromAddress, String emailSubject, String callbackUrl, String... traits) { InetAddress remoteAddress = PushUtils.getLocalHost(); return new EmailToSmsPushV1(toAddress, fromAddress, emailSubject, callbackUrl, remoteAddress.getCanonicalHostName(), remoteAddress.getHostAddress(), BeanUtils.toMap(traits)); }