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-2012 UnboundID Corp. 026 */ 027 package com.unboundid.directory.sdk.common.types; 028 029 030 031 import java.util.Date; 032 033 import com.unboundid.util.NotExtensible; 034 import com.unboundid.util.ThreadSafety; 035 import com.unboundid.util.ThreadSafetyLevel; 036 037 038 039 /** 040 * This interface defines a set of methods that may be used to interact with an 041 * alert notification. 042 */ 043 @NotExtensible() 044 @ThreadSafety(level=ThreadSafetyLevel.INTERFACE_THREADSAFE) 045 public interface AlertNotification 046 { 047 /** 048 * Retrieves the unique ID assigned to this alert notification. 049 * 050 * @return The unique ID assigned to this alert notification. 051 */ 052 String getAlertID(); 053 054 055 056 /** 057 * Retrieves the time that this alert notification was generated. 058 * 059 * @return The time that this alert notification was generated. 060 */ 061 Date getAlertTime(); 062 063 064 065 /** 066 * Retrieves the name of the class that generated this alert notification. 067 * 068 * @return The name of the class that generated this alert notification. 069 */ 070 String getAlertGeneratorClassName(); 071 072 073 074 /** 075 * Retrieves the name of the alert type for this alert notification. 076 * 077 * @return The name of the alert type for this alert notification. 078 */ 079 String getAlertTypeName(); 080 081 082 083 /** 084 * Retrieves a short summary of the alert type for this alert notification. 085 * It will generally use headline-style capitalization. 086 * 087 * @return A short summary of the alert type for this alert notification. 088 */ 089 String getAlertTypeSummary(); 090 091 092 093 /** 094 * Retrieves a description of the alert type for this alert notification. It 095 * may be longer than the alert type summary and will use a more prose-style 096 * capitalization. 097 * 098 * @return A description of the alert type for this alert notification. 099 */ 100 String getAlertTypeDescription(); 101 102 103 104 /** 105 * Retrieves the OID of the alert type for this alert notification. 106 * 107 * @return The OID of the alert type for this alert notification. 108 */ 109 String getAlertTypeOID(); 110 111 112 113 /** 114 * Retrieves the severity for this alert notification. 115 * 116 * @return The severity for this alert notification. 117 */ 118 AlertSeverity getAlertSeverity(); 119 120 121 122 /** 123 * Retrieves the message for this alert notification, which may contain 124 * specific information about the error, warning, or event that triggered the 125 * alert. 126 * 127 * @return The message for this alert notification. 128 */ 129 String getAlertMessage(); 130 131 132 133 /** 134 * Retrieves a string representation of this alert notification. 135 * 136 * @return A string representation of this alert notification. 137 */ 138 String toString(); 139 }