@Override public void setRawMessageDelivery(String subscriptionArn, boolean rawMessageDelivery) throws Exception { CNSSubscription sub; sub = getSubscription(subscriptionArn); if (sub != null) { sub.setRawMessageDelivery(rawMessageDelivery); insertOrUpdateSubsAndIndexes(sub, null); } }
private static CNSSubscription extractSubscriptionFromColumn( CmbColumn<CmbComposite, String> column, String topicArn) throws JSONException { JSONObject json = new JSONObject(column.getValue()); CNSSubscription s = new CNSSubscription(json.getString("subArn")); s.setEndpoint(json.getString("endPoint")); s.setUserId(json.getString("userId")); if (json.has("confirmDate")) { s.setConfirmDate(new Date(json.getLong("confirmDate"))); } if (json.has("requestDate")) { s.setRequestDate(new Date(json.getLong("requestDate"))); } if (json.has("protocol")) { s.setProtocol(CnsSubscriptionProtocol.valueOf(json.getString("protocol"))); } if (json.has("isConfirmed")) { s.setConfirmed(json.getBoolean("isConfirmed")); } s.setToken(json.getString("token")); if (json.has("authenticateOnSubscribe")) { s.setAuthenticateOnUnsubscribe(json.getBoolean("authenticateOnSubscribe")); } if (json.has("rawMessageDelivery")) { s.setRawMessageDelivery(json.getBoolean("rawMessageDelivery")); } s.setTopicArn(topicArn); return s; }