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

com.coalmine.connector.notification.Notification Maven / Gradle / Ivy

Go to download

Coalmine connector for Java. Coalmine (https://www.getcoalmine.com) is a cloud-based exception and error tracking service for your web apps.

The newest version!
package com.coalmine.connector.notification;

import java.util.Map;

import com.google.gson.annotations.SerializedName;

/**
 * Base Notification for sending information to Coalmine. Notifications come in
 * two major forms: LoggedNotification (application event notifications) and
 * Version notifications (e.g., my app was just deployed).
 */
public abstract class Notification {

	/** Name of the application environment (e.g., production, staging, etc). */
	protected String applicationEnvironment;
	
	/** Application version. Optional. Example: 1.0.0 */
	protected String version;
	
	@SerializedName("user_id")
	protected String userId;
	
	/**
	 * Get the fields to send to Coalmine.
	 * 
	 * @return A map of fields to values to send to Coalmine
	 */
	public abstract Map getQueryParams();

	/**
	 * Set the application environment
	 * 
	 * @param applicationEnvironment The application environment
	 */
	public void setApplicationEnvironment(String applicationEnvironment) {
		this.applicationEnvironment = applicationEnvironment;
	}
	
	/**
	 * Set the application version
	 * 
	 * @param version The application version
	 */
	public void setVersion(String version) {
		this.version = version;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy