com.windowsazure.messaging.BaiduTemplateRegistration Maven / Gradle / Ivy
//----------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------------
package com.windowsazure.messaging;
public class BaiduTemplateRegistration extends BaiduRegistration {
private static final String BAIDU_NATIVE_REGISTRATION1 = "";
private static final String BAIDU_NATIVE_REGISTRATION2 = "";
private static final String BAIDU_NATIVE_REGISTRATION3 = " ";
private static final String BAIDU_NATIVE_REGISTRATION4 = " ";
private String bodyTemplate;
public BaiduTemplateRegistration() {
this(null, null, null);
}
public BaiduTemplateRegistration(String baiduUserId, String baiduChannelId, String bodyTemplate) {
this(null, baiduUserId, baiduChannelId, bodyTemplate);
}
public BaiduTemplateRegistration(String registrationId, String baiduUserId, String baiduChannelId, String bodyTemplate) {
super(registrationId, baiduUserId, baiduChannelId);
this.bodyTemplate = bodyTemplate;
}
public String getBodyTemplate() {
return bodyTemplate;
}
public void setBodyTemplate(String bodyTemplate) {
this.bodyTemplate = bodyTemplate;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
+ ((bodyTemplate == null) ? 0 : bodyTemplate.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
BaiduTemplateRegistration other = (BaiduTemplateRegistration) obj;
if (bodyTemplate == null) {
if (other.bodyTemplate != null)
return false;
} else if (!bodyTemplate.equals(other.bodyTemplate))
return false;
return true;
}
@Override
public String getXml() {
return BAIDU_NATIVE_REGISTRATION1 +
getTagsXml() +
BAIDU_NATIVE_REGISTRATION2 +
baiduUserId +
BAIDU_NATIVE_REGISTRATION3 +
baiduChannelId +
BAIDU_NATIVE_REGISTRATION4 +
bodyTemplate +
BAIDU_NATIVE_REGISTRATION5;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy