001 /* 002 * CDDL HEADER START 003 * 004 * The contents of this file are subject to the terms of the 005 * Common Development and Distribution License, Version 1.0 only 006 * (the "License"). You may not use this file except in compliance 007 * with the License. 008 * 009 * You can obtain a copy of the license at 010 * docs/licenses/cddl.txt 011 * or http://www.opensource.org/licenses/cddl1.php. 012 * See the License for the specific language governing permissions 013 * and limitations under the License. 014 * 015 * When distributing Covered Code, include this CDDL HEADER in each 016 * file and include the License file at 017 * docs/licenses/cddl.txt. If applicable, 018 * add the following below this CDDL HEADER, with the fields enclosed 019 * by brackets "[]" replaced with your own identifying information: 020 * Portions Copyright [yyyy] [name of copyright owner] 021 * 022 * CDDL HEADER END 023 * 024 * 025 * Copyright 2010-2014 UnboundID Corp. 026 */ 027 package com.unboundid.directory.sdk.common.types; 028 029 030 031 import java.util.Date; 032 import java.util.Map; 033 034 import com.unboundid.util.NotExtensible; 035 import com.unboundid.util.ThreadSafety; 036 import com.unboundid.util.ThreadSafetyLevel; 037 038 039 040 /** 041 * This interface defines a set of methods that may be used to interact with an 042 * alert notification. 043 */ 044 @NotExtensible() 045 @ThreadSafety(level=ThreadSafetyLevel.INTERFACE_THREADSAFE) 046 public interface AlertNotification 047 { 048 /** 049 * Retrieves the unique ID assigned to this alert notification. 050 * 051 * @return The unique ID assigned to this alert notification. 052 */ 053 String getAlertID(); 054 055 056 057 /** 058 * Retrieves the time that this alert notification was generated. 059 * 060 * @return The time that this alert notification was generated. 061 */ 062 Date getAlertTime(); 063 064 065 066 /** 067 * Retrieves the name of the class that generated this alert notification. 068 * 069 * @return The name of the class that generated this alert notification. 070 */ 071 String getAlertGeneratorClassName(); 072 073 074 075 /** 076 * Retrieves the name of the alert type for this alert notification. 077 * 078 * @return The name of the alert type for this alert notification. 079 */ 080 String getAlertTypeName(); 081 082 083 084 /** 085 * Retrieves a short summary of the alert type for this alert notification. 086 * It will generally use headline-style capitalization. 087 * 088 * @return A short summary of the alert type for this alert notification. 089 */ 090 String getAlertTypeSummary(); 091 092 093 094 /** 095 * Retrieves a description of the alert type for this alert notification. It 096 * may be longer than the alert type summary and will use a more prose-style 097 * capitalization. 098 * 099 * @return A description of the alert type for this alert notification. 100 */ 101 String getAlertTypeDescription(); 102 103 104 105 /** 106 * Retrieves the OID of the alert type for this alert notification. 107 * 108 * @return The OID of the alert type for this alert notification. 109 */ 110 String getAlertTypeOID(); 111 112 113 114 /** 115 * Retrieves the severity for this alert notification. 116 * 117 * @return The severity for this alert notification. 118 */ 119 AlertSeverity getAlertSeverity(); 120 121 122 123 /** 124 * Retrieves the message for this alert notification, which may contain 125 * specific information about the error, warning, or event that triggered the 126 * alert. 127 * 128 * @return The message for this alert notification. 129 */ 130 String getAlertMessage(); 131 132 133 /** 134 * Retrieves a map of objects containing additional information for this alert 135 * notification. 136 * 137 * @return Map of objects for this alert notification. 138 */ 139 Map<Object,Object> getAdditionalInformation(); 140 141 142 143 /** 144 * Retrieves a string representation of this alert notification. 145 * 146 * @return A string representation of this alert notification. 147 */ 148 String toString(); 149 }