001/* 002 * Copyright 2009-2018 Ping Identity Corporation 003 * All Rights Reserved. 004 */ 005/* 006 * Copyright (C) 2015-2018 Ping Identity Corporation 007 * 008 * This program is free software; you can redistribute it and/or modify 009 * it under the terms of the GNU General Public License (GPLv2 only) 010 * or the terms of the GNU Lesser General Public License (LGPLv2.1 only) 011 * as published by the Free Software Foundation. 012 * 013 * This program is distributed in the hope that it will be useful, 014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 016 * GNU General Public License for more details. 017 * 018 * You should have received a copy of the GNU General Public License 019 * along with this program; if not, see <http://www.gnu.org/licenses>. 020 */ 021package com.unboundid.ldap.sdk.unboundidds.logs; 022 023 024 025import com.unboundid.util.NotExtensible; 026import com.unboundid.util.NotMutable; 027import com.unboundid.util.ThreadSafety; 028import com.unboundid.util.ThreadSafetyLevel; 029 030 031 032/** 033 * This class provides a data structure that holds information about a log 034 * message that may appear in the Directory Server access log about a delete 035 * request received from a client. 036 * <BR> 037 * <BLOCKQUOTE> 038 * <B>NOTE:</B> This class, and other classes within the 039 * {@code com.unboundid.ldap.sdk.unboundidds} package structure, are only 040 * supported for use against Ping Identity, UnboundID, and 041 * Nokia/Alcatel-Lucent 8661 server products. These classes provide support 042 * for proprietary functionality or for external specifications that are not 043 * considered stable or mature enough to be guaranteed to work in an 044 * interoperable way with other types of LDAP servers. 045 * </BLOCKQUOTE> 046 */ 047@NotExtensible() 048@NotMutable() 049@ThreadSafety(level=ThreadSafetyLevel.COMPLETELY_THREADSAFE) 050public class DeleteRequestAccessLogMessage 051 extends OperationRequestAccessLogMessage 052{ 053 /** 054 * The serial version UID for this serializable class. 055 */ 056 private static final long serialVersionUID = 4562376555035497481L; 057 058 059 060 // The DN of the entry to delete. 061 private final String dn; 062 063 064 065 /** 066 * Creates a new delete request access log message from the provided message 067 * string. 068 * 069 * @param s The string to be parsed as a delete request access log message. 070 * 071 * @throws LogException If the provided string cannot be parsed as a valid 072 * log message. 073 */ 074 public DeleteRequestAccessLogMessage(final String s) 075 throws LogException 076 { 077 this(new LogMessage(s)); 078 } 079 080 081 082 /** 083 * Creates a new delete request access log message from the provided log 084 * message. 085 * 086 * @param m The log message to be parsed as a delete request access log 087 * message. 088 */ 089 public DeleteRequestAccessLogMessage(final LogMessage m) 090 { 091 super(m); 092 093 dn = getNamedValue("dn"); 094 } 095 096 097 098 /** 099 * Retrieves the DN of the entry to delete. 100 * 101 * @return The DN of the entry to delete, or {@code null} if it is not 102 * included in the log message. 103 */ 104 public final String getDN() 105 { 106 return dn; 107 } 108 109 110 111 /** 112 * {@inheritDoc} 113 */ 114 @Override() 115 public final AccessLogOperationType getOperationType() 116 { 117 return AccessLogOperationType.DELETE; 118 } 119}