@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSubscriptionArn() == null) ? 0 : getSubscriptionArn().hashCode()); hashCode = prime * hashCode + ((getOwner() == null) ? 0 : getOwner().hashCode()); hashCode = prime * hashCode + ((getProtocol() == null) ? 0 : getProtocol().hashCode()); hashCode = prime * hashCode + ((getEndpoint() == null) ? 0 : getEndpoint().hashCode()); hashCode = prime * hashCode + ((getTopicArn() == null) ? 0 : getTopicArn().hashCode()); return hashCode; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getSubscriptionArn() != null) sb.append("SubscriptionArn: ").append(getSubscriptionArn()).append(","); if (getOwner() != null) sb.append("Owner: ").append(getOwner()).append(","); if (getProtocol() != null) sb.append("Protocol: ").append(getProtocol()).append(","); if (getEndpoint() != null) sb.append("Endpoint: ").append(getEndpoint()).append(","); if (getTopicArn() != null) sb.append("TopicArn: ").append(getTopicArn()); sb.append("}"); return sb.toString(); }
return false; Subscription other = (Subscription) obj; if (other.getSubscriptionArn() == null ^ this.getSubscriptionArn() == null) return false; if (other.getSubscriptionArn() != null && other.getSubscriptionArn().equals(this.getSubscriptionArn()) == false) return false; if (other.getOwner() == null ^ this.getOwner() == null)
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSubscriptionArn() == null) ? 0 : getSubscriptionArn().hashCode()); hashCode = prime * hashCode + ((getOwner() == null) ? 0 : getOwner().hashCode()); hashCode = prime * hashCode + ((getProtocol() == null) ? 0 : getProtocol().hashCode()); hashCode = prime * hashCode + ((getEndpoint() == null) ? 0 : getEndpoint().hashCode()); hashCode = prime * hashCode + ((getTopicArn() == null) ? 0 : getTopicArn().hashCode()); return hashCode; }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getSubscriptionArn() != null) sb.append("SubscriptionArn: " + getSubscriptionArn() + ","); if (getOwner() != null) sb.append("Owner: " + getOwner() + ","); if (getProtocol() != null) sb.append("Protocol: " + getProtocol() + ","); if (getEndpoint() != null) sb.append("Endpoint: " + getEndpoint() + ","); if (getTopicArn() != null) sb.append("TopicArn: " + getTopicArn()); sb.append("}"); return sb.toString(); }
Subscription other = (Subscription) obj; if (other.getSubscriptionArn() == null ^ this.getSubscriptionArn() == null) return false; if (other.getSubscriptionArn() != null && other.getSubscriptionArn().equals(this.getSubscriptionArn()) == false) return false; if (other.getOwner() == null ^ this.getOwner() == null)
public void marshall(Subscription _subscription, Request<?> request, String _prefix) { String prefix; if (_subscription.getSubscriptionArn() != null) { prefix = _prefix + "SubscriptionArn"; String subscriptionArn = _subscription.getSubscriptionArn(); request.addParameter(prefix, StringUtils.fromString(subscriptionArn)); } if (_subscription.getOwner() != null) { prefix = _prefix + "Owner"; String owner = _subscription.getOwner(); request.addParameter(prefix, StringUtils.fromString(owner)); } if (_subscription.getProtocol() != null) { prefix = _prefix + "Protocol"; String protocol = _subscription.getProtocol(); request.addParameter(prefix, StringUtils.fromString(protocol)); } if (_subscription.getEndpoint() != null) { prefix = _prefix + "Endpoint"; String endpoint = _subscription.getEndpoint(); request.addParameter(prefix, StringUtils.fromString(endpoint)); } if (_subscription.getTopicArn() != null) { prefix = _prefix + "TopicArn"; String topicArn = _subscription.getTopicArn(); request.addParameter(prefix, StringUtils.fromString(topicArn)); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSubscriptionArn() == null) ? 0 : getSubscriptionArn().hashCode()); hashCode = prime * hashCode + ((getOwner() == null) ? 0 : getOwner().hashCode()); hashCode = prime * hashCode + ((getProtocol() == null) ? 0 : getProtocol().hashCode()); hashCode = prime * hashCode + ((getEndpoint() == null) ? 0 : getEndpoint().hashCode()); hashCode = prime * hashCode + ((getTopicArn() == null) ? 0 : getTopicArn().hashCode()); return hashCode; }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getSubscriptionArn() != null) sb.append("SubscriptionArn: " + getSubscriptionArn() + ","); if (getOwner() != null) sb.append("Owner: " + getOwner() + ","); if (getProtocol() != null) sb.append("Protocol: " + getProtocol() + ","); if (getEndpoint() != null) sb.append("Endpoint: " + getEndpoint() + ","); if (getTopicArn() != null) sb.append("TopicArn: " + getTopicArn()); sb.append("}"); return sb.toString(); }
log_.info("Topic " + topicName + " has subscription to " + s.getEndpoint() + " as " + s.getSubscriptionArn()); log_.info("Topic " + topicName + " has subscription to " + s.getEndpoint() + " as " + s.getSubscriptionArn());
private void projectSubscription(Topic topic, Subscription subscription) { ObjectNode n = mapper.createObjectNode(); n.put("aws_topicArn", subscription.getTopicArn()); n.put("aws_endpoint", subscription.getEndpoint()); n.put("aws_protocol", subscription.getProtocol()); n.put("aws_owner", subscription.getOwner()); n.put("aws_region", getRegion().getName()); n.put("aws_account", getAccountId()); String cypher = "merge (s:AwsSnsSubscription {aws_arn:{arn}}) set s+={props}, s.updateTs=timestamp()"; getNeoRxClient().execCypher(cypher, "arn", subscription.getSubscriptionArn(), "props", n); cypher = "match (a:AwsSnsSubscription {aws_arn:{subscriptionArn}}), (t:AwsSnsTopic {aws_arn:{topicArn}}) MERGE (t)-[r:HAS_SUBSCRIPTION]->(a) set r.updateTs=timestamp()"; getNeoRxClient().execCypher(cypher, "subscriptionArn", subscription.getSubscriptionArn(), "topicArn", topic.getTopicArn()); String targetArn = subscription.getEndpoint(); if (targetArn.startsWith("arn:aws:sqs:")) { cypher = "match (a:AwsSnsTopic {aws_arn:{topicArn}}),(q:AwsSqsQueue {aws_arn:{queueArn}}) MERGE (a)-[r:PUBLISHES]->(q) set r.updateTs=timestamp()"; getNeoRxClient().execCypher(cypher, "topicArn", subscription.getTopicArn(), "queueArn", targetArn); } }
out.println("<form action=\"/webui/cnsuser/subscription/?userId="+user.getUserId()+"&arn="+s.getSubscriptionArn()+"&topicArn="+topicArn+"\" method=POST>"); out.println("<td>"+i+"</td>"); out.println("<td>"+s.getSubscriptionArn() +"<input type='hidden' name='arn' value="+s.getSubscriptionArn()+"></td>"); out.println("<td>"+s.getProtocol()+"</td>"); if(s.getProtocol().toLowerCase().equals("cqs")&&isAdmin(request)){ if (s.getProtocol().toString().equals("http") && !s.getSubscriptionArn().equals("PendingConfirmation")) { out.println("<td><a href='#' onclick=\"window.open('/webui/cnsuser/subscription/editdeliverypolicy?subscriptionArn="+ s.getSubscriptionArn() + "&userId=" + userId + "', 'EditDeliveryPolicy', 'height=630,width=580,toolbar=no')\">View/Edit Delivery Policy</a></td>"); } else { out.println("<td> </td>"); && !s.getSubscriptionArn().equals("PendingConfirmation")) { String url = "/webui/cnsuser/subscription/rawmessagedeliverypolicy/?subscriptionArn="+ s.getSubscriptionArn() + "&userId=" + userId; out.println("<td><a href='#' onclick=\"window.open('" + url + "', 'RawMessageDelivery', 'height=200,width=580,toolbar=no')\">Raw Message Delivery</a></td>"); } else { if (s.getSubscriptionArn().equals("PendingConfirmation")) { out.println("<td> </td>"); } else {
Subscription other = (Subscription) obj; if (other.getSubscriptionArn() == null ^ this.getSubscriptionArn() == null) return false; if (other.getSubscriptionArn() != null && other.getSubscriptionArn().equals(this.getSubscriptionArn()) == false) return false; if (other.getOwner() == null ^ this.getOwner() == null)
snsClient_.unsubscribe(subscription.getSubscriptionArn()); log_.info("Deleted subscription " + subscription.getSubscriptionArn());
public void marshall(Subscription _subscription, Request<?> request, String _prefix) { String prefix; if (_subscription.getSubscriptionArn() != null) { prefix = _prefix + "SubscriptionArn"; String subscriptionArn = _subscription.getSubscriptionArn(); request.addParameter(prefix, StringUtils.fromString(subscriptionArn)); } if (_subscription.getOwner() != null) { prefix = _prefix + "Owner"; String owner = _subscription.getOwner(); request.addParameter(prefix, StringUtils.fromString(owner)); } if (_subscription.getProtocol() != null) { prefix = _prefix + "Protocol"; String protocol = _subscription.getProtocol(); request.addParameter(prefix, StringUtils.fromString(protocol)); } if (_subscription.getEndpoint() != null) { prefix = _prefix + "Endpoint"; String endpoint = _subscription.getEndpoint(); request.addParameter(prefix, StringUtils.fromString(endpoint)); } if (_subscription.getTopicArn() != null) { prefix = _prefix + "TopicArn"; String topicArn = _subscription.getTopicArn(); request.addParameter(prefix, StringUtils.fromString(topicArn)); } }