All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.backendless.messaging.PublishOptions Maven / Gradle / Ivy

There is a newer version: 3.1.0
Show newest version
/*
 * ********************************************************************************************************************
 *  

* BACKENDLESS.COM CONFIDENTIAL *

* ******************************************************************************************************************** *

* Copyright 2012 BACKENDLESS.COM. All Rights Reserved. *

* NOTICE: All information contained herein is, and remains the property of Backendless.com and its suppliers, * if any. The intellectual and technical concepts contained herein are proprietary to Backendless.com and its * suppliers and may be covered by U.S. and Foreign Patents, patents in process, and are protected by trade secret * or copyright law. Dissemination of this information or reproduction of this material is strictly forbidden * unless prior written permission is obtained from Backendless.com. *

* ******************************************************************************************************************** */ package com.backendless.messaging; import java.util.HashMap; import java.util.Hashtable; import java.util.Map; public class PublishOptions { private String publisherId; private Map headers; private String subtopic; public final static String MESSAGE_TAG = "message"; public final static String IOS_ALERT_TAG = "ios-alert"; public final static String IOS_BADGE_TAG = "ios-badge"; public final static String IOS_SOUND_TAG = "ios-sound"; public final static String ANDROID_TICKER_TEXT_TAG = "android-ticker-text"; public final static String ANDROID_CONTENT_TITLE_TAG = "android-content-title"; public final static String ANDROID_CONTENT_TEXT_TAG = "android-content-text"; public final static String ANDROID_ACTION_TAG = "android-action"; public final static String WP_TYPE_TAG = "wp-type"; public final static String WP_TITLE_TAG = "wp-title"; public final static String WP_TOAST_SUBTITLE_TAG = "wp-subtitle"; public final static String WP_TOAST_PARAMETER_TAG = "wp-parameter"; public final static String WP_TILE_BACKGROUND_IMAGE = "wp-backgroundImage"; public final static String WP_TILE_COUNT = "wp-count"; public final static String WP_TILE_BACK_TITLE = "wp-backTitle"; public final static String WP_TILE_BACK_BACKGROUND_IMAGE = "wp-backImage"; public final static String WP_TILE_BACK_CONTENT = "wp-backContent"; public final static String WP_RAW_DATA = "wp-raw"; public PublishOptions() { } public PublishOptions( String publisherId ) { this.publisherId = publisherId; } public PublishOptions( String publisherId, String subtopic ) { this.publisherId = publisherId; this.subtopic = subtopic; } public PublishOptions( String publisherId, Hashtable headers, String subtopic ) { this.publisherId = publisherId; this.headers = new Hashtable(); this.headers.putAll( headers ); this.subtopic = subtopic; } public PublishOptions( PublishMessageInfo info ) { this.publisherId = info.getPublisherId(); this.headers = info.getHeaders(); this.subtopic = info.getSubtopic(); } public String getPublisherId() { return publisherId; } public void setPublisherId( String publisherId ) { this.publisherId = publisherId; } public Map getHeaders() { if( headers == null ) return headers = new HashMap(); return new HashMap( headers ); } public void setHeaders( Map headers ) { this.headers = headers; } public void putHeader( String headerKey, String headerValue ) { if( headerKey == null || headerKey.equals( "" ) || headerValue == null ) return; if( headers == null ) headers = new HashMap(); headers.put( headerKey, headerValue ); } public String getSubtopic() { return subtopic; } public void setSubtopic( String subtopic ) { this.subtopic = subtopic; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy