/* * Copyright (C) 2010 Moduad Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.openims.service.notificationPacket; import org.jivesoftware.smack.packet.IQ; /** * This class represents a notification IQ packet. * * @author chenyzpower@gmail.com */ public class NotificationIQ extends IQ { private String id; private String pushID; private String title; private String message; private String uri; private String ticker; private String time; // time stamp public NotificationIQ() { } @Override public String getChildElementXML() { StringBuilder buf = new StringBuilder(); buf.append("<").append("openims").append(" xmlns=\"").append( "smit:iq:notification").append("\">"); if (id != null) { buf.append("<id>").append(id).append("</id>"); } buf.append("</").append("openims").append("> "); return buf.toString(); } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getPushID() { return pushID; } public void setPushID(String pushID) { this.pushID = pushID; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public String getUri() { return uri; } public void setUri(String url) { this.uri = url; } public void setTicker(String ticker){ this.ticker = ticker; } public String getTicker(){ return ticker; } public String getTime() { return time; } public void setTime(String time) { this.time = time; } }