001/* 002 * Copyright 2022-2024 Ping Identity Corporation 003 * All Rights Reserved. 004 */ 005/* 006 * Copyright 2022-2024 Ping Identity Corporation 007 * 008 * Licensed under the Apache License, Version 2.0 (the "License"); 009 * you may not use this file except in compliance with the License. 010 * You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, software 015 * distributed under the License is distributed on an "AS IS" BASIS, 016 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 017 * See the License for the specific language governing permissions and 018 * limitations under the License. 019 */ 020/* 021 * Copyright (C) 2022-2024 Ping Identity Corporation 022 * 023 * This program is free software; you can redistribute it and/or modify 024 * it under the terms of the GNU General Public License (GPLv2 only) 025 * or the terms of the GNU Lesser General Public License (LGPLv2.1 only) 026 * as published by the Free Software Foundation. 027 * 028 * This program is distributed in the hope that it will be useful, 029 * but WITHOUT ANY WARRANTY; without even the implied warranty of 030 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 031 * GNU General Public License for more details. 032 * 033 * You should have received a copy of the GNU General Public License 034 * along with this program; if not, see <http://www.gnu.org/licenses>. 035 */ 036package com.unboundid.ldap.sdk.unboundidds.logs.v2.text; 037 038 039 040import java.util.List; 041import java.util.Set; 042 043import com.unboundid.ldap.sdk.ResultCode; 044import com.unboundid.ldap.sdk.unboundidds.controls.AssuredReplicationLocalLevel; 045import com.unboundid.ldap.sdk.unboundidds.controls. 046 AssuredReplicationRemoteLevel; 047import com.unboundid.ldap.sdk.unboundidds.logs.AccessLogMessageType; 048import com.unboundid.ldap.sdk.unboundidds.logs.LogException; 049import com.unboundid.ldap.sdk.unboundidds.logs.v2.DeleteResultAccessLogMessage; 050import com.unboundid.util.NotExtensible; 051import com.unboundid.util.NotMutable; 052import com.unboundid.util.NotNull; 053import com.unboundid.util.Nullable; 054import com.unboundid.util.ThreadSafety; 055import com.unboundid.util.ThreadSafetyLevel; 056 057 058 059/** 060 * This class provides a data structure that holds information about a 061 * text-formatted delete result access log message. 062 * <BR> 063 * <BLOCKQUOTE> 064 * <B>NOTE:</B> This class, and other classes within the 065 * {@code com.unboundid.ldap.sdk.unboundidds} package structure, are only 066 * supported for use against Ping Identity, UnboundID, and 067 * Nokia/Alcatel-Lucent 8661 server products. These classes provide support 068 * for proprietary functionality or for external specifications that are not 069 * considered stable or mature enough to be guaranteed to work in an 070 * interoperable way with other types of LDAP servers. 071 * </BLOCKQUOTE> 072 */ 073@NotExtensible() 074@NotMutable() 075@ThreadSafety(level=ThreadSafetyLevel.COMPLETELY_THREADSAFE) 076public class TextFormattedDeleteResultAccessLogMessage 077 extends TextFormattedDeleteRequestAccessLogMessage 078 implements DeleteResultAccessLogMessage 079{ 080 /** 081 * The serial version UID for this serializable class. 082 */ 083 private static final long serialVersionUID = 3027858390603833076L; 084 085 086 087 // Indicates whether this operation targeted a soft-deleted entry. 088 @Nullable private final Boolean changeToSoftDeletedEntry; 089 090 // The soft deleted entry DN for this access log message. 091 @Nullable private final String softDeletedEntryDN; 092 093 // The forward helper for this access log message. 094 @NotNull private final TextFormattedForwardAccessLogMessageHelper 095 forwardHelper; 096 097 // The result helper for this access log message. 098 @NotNull private final TextFormattedResultAccessLogMessageHelper 099 resultHelper; 100 101 102 103 /** 104 * Creates a new text-formatted delete result access log message from the 105 * provided message string. 106 * 107 * @param logMessageString The string representation of this log message. 108 * It must not be {@code null}. 109 * 110 * @throws LogException If the provided string cannot be parsed as a valid 111 * log message. 112 */ 113 public TextFormattedDeleteResultAccessLogMessage( 114 @NotNull final String logMessageString) 115 throws LogException 116 { 117 this(new TextFormattedLogMessage(logMessageString)); 118 } 119 120 121 122 /** 123 * Creates a new text-formatted delete result access log message from the 124 * provided message. 125 * 126 * @param logMessage The log message to use to create this delete result 127 * access log message. It must not be {@code null}. 128 */ 129 TextFormattedDeleteResultAccessLogMessage( 130 @NotNull final TextFormattedLogMessage logMessage) 131 { 132 super(logMessage); 133 134 softDeletedEntryDN = 135 getString(TextFormattedAccessLogFields.DELETE_SOFT_DELETED_ENTRY_DN); 136 changeToSoftDeletedEntry = getBooleanNoThrow( 137 TextFormattedAccessLogFields.CHANGE_TO_SOFT_DELETED_ENTRY); 138 139 resultHelper = new TextFormattedResultAccessLogMessageHelper(this); 140 forwardHelper = new TextFormattedForwardAccessLogMessageHelper(this); 141 } 142 143 144 145 /** 146 * {@inheritDoc} 147 */ 148 @Override() 149 @NotNull() 150 public AccessLogMessageType getMessageType() 151 { 152 return AccessLogMessageType.RESULT; 153 } 154 155 156 157 /** 158 * {@inheritDoc} 159 */ 160 @Override() 161 @Nullable() 162 public ResultCode getResultCode() 163 { 164 return resultHelper.getResultCode(); 165 } 166 167 168 169 /** 170 * {@inheritDoc} 171 */ 172 @Override() 173 @Nullable() 174 public String getDiagnosticMessage() 175 { 176 return resultHelper.getDiagnosticMessage(); 177 } 178 179 180 181 /** 182 * {@inheritDoc} 183 */ 184 @Override() 185 @Nullable() 186 public String getAdditionalInformation() 187 { 188 return resultHelper.getAdditionalInformation(); 189 } 190 191 192 193 /** 194 * {@inheritDoc} 195 */ 196 @Override() 197 @Nullable() 198 public String getMatchedDN() 199 { 200 return resultHelper.getMatchedDN(); 201 } 202 203 204 205 /** 206 * {@inheritDoc} 207 */ 208 @Override() 209 @NotNull() 210 public List<String> getReferralURLs() 211 { 212 return resultHelper.getReferralURLs(); 213 } 214 215 216 217 /** 218 * {@inheritDoc} 219 */ 220 @Override() 221 @Nullable() 222 public Double getProcessingTimeMillis() 223 { 224 return resultHelper.getProcessingTimeMillis(); 225 } 226 227 228 229 /** 230 * {@inheritDoc} 231 */ 232 @Override() 233 @Nullable() 234 public Double getWorkQueueWaitTimeMillis() 235 { 236 return resultHelper.getWorkQueueWaitTimeMillis(); 237 } 238 239 240 241 /** 242 * {@inheritDoc} 243 */ 244 @Override() 245 @NotNull() 246 public Set<String> getResponseControlOIDs() 247 { 248 return resultHelper.getResponseControlOIDs(); 249 } 250 251 252 253 /** 254 * {@inheritDoc} 255 */ 256 @Override() 257 @Nullable() 258 public Long getIntermediateResponsesReturned() 259 { 260 return resultHelper.getIntermediateResponsesReturned(); 261 } 262 263 264 265 /** 266 * {@inheritDoc} 267 */ 268 @Override() 269 @NotNull() 270 public List<String> getServersAccessed() 271 { 272 return resultHelper.getServersAccessed(); 273 } 274 275 276 277 /** 278 * {@inheritDoc} 279 */ 280 @Override() 281 @Nullable() 282 public Boolean getUncachedDataAccessed() 283 { 284 return resultHelper.getUncachedDataAccessed(); 285 } 286 287 288 289 /** 290 * {@inheritDoc} 291 */ 292 @Override() 293 @NotNull() 294 public Set<String> getUsedPrivileges() 295 { 296 return resultHelper.getUsedPrivileges(); 297 } 298 299 300 301 /** 302 * {@inheritDoc} 303 */ 304 @Override() 305 @NotNull() 306 public Set<String> getPreAuthorizationUsedPrivileges() 307 { 308 return resultHelper.getPreAuthorizationUsedPrivileges(); 309 } 310 311 312 313 /** 314 * {@inheritDoc} 315 */ 316 @Override() 317 @NotNull() 318 public Set<String> getMissingPrivileges() 319 { 320 return resultHelper.getMissingPrivileges(); 321 } 322 323 324 325 /** 326 * {@inheritDoc} 327 */ 328 @Override() 329 @Nullable() 330 public final String getAlternateAuthorizationDN() 331 { 332 return resultHelper.getAlternateAuthorizationDN(); 333 } 334 335 336 337 /** 338 * {@inheritDoc} 339 */ 340 @Override() 341 @Nullable() 342 public final String getReplicationChangeID() 343 { 344 return resultHelper.getReplicationChangeID(); 345 } 346 347 348 349 /** 350 * {@inheritDoc} 351 */ 352 @Override() 353 @Nullable() 354 public final AssuredReplicationLocalLevel getAssuredReplicationLocalLevel() 355 { 356 return resultHelper.getAssuredReplicationLocalLevel(); 357 } 358 359 360 361 /** 362 * {@inheritDoc} 363 */ 364 @Override() 365 @Nullable() 366 public final AssuredReplicationRemoteLevel getAssuredReplicationRemoteLevel() 367 { 368 return resultHelper.getAssuredReplicationRemoteLevel(); 369 } 370 371 372 373 /** 374 * {@inheritDoc} 375 */ 376 @Override() 377 @Nullable() 378 public final Long getAssuredReplicationTimeoutMillis() 379 { 380 return resultHelper.getAssuredReplicationTimeoutMillis(); 381 } 382 383 384 385 /** 386 * {@inheritDoc} 387 */ 388 @Override() 389 @Nullable() 390 public final Boolean getResponseDelayedByAssurance() 391 { 392 return resultHelper.getResponseDelayedByAssurance(); 393 } 394 395 396 397 /** 398 * {@inheritDoc} 399 */ 400 @Override() 401 @NotNull() 402 public final Set<String> getIndexesWithKeysAccessedNearEntryLimit() 403 { 404 return resultHelper.getIndexesWithKeysAccessedNearEntryLimit(); 405 } 406 407 408 409 /** 410 * {@inheritDoc} 411 */ 412 @Override() 413 @NotNull() 414 public final Set<String> getIndexesWithKeysAccessedExceedingEntryLimit() 415 { 416 return resultHelper.getIndexesWithKeysAccessedExceedingEntryLimit(); 417 } 418 419 420 421 /** 422 * Retrieves a string representation of an intermediate client response 423 * control included in the log message. 424 * 425 * @return A string representation of an intermediate client response control 426 * included in the log message, or {@code null} if there is none. 427 */ 428 @Nullable() 429 public final String getIntermediateClientResponseControl() 430 { 431 return resultHelper.getIntermediateClientResponseControl(); 432 } 433 434 435 436 /** 437 * {@inheritDoc} 438 */ 439 @Override() 440 @Nullable() 441 public String getTargetHost() 442 { 443 return forwardHelper.getTargetHost(); 444 } 445 446 447 448 /** 449 * {@inheritDoc} 450 */ 451 @Override() 452 @Nullable() 453 public Integer getTargetPort() 454 { 455 return forwardHelper.getTargetPort(); 456 } 457 458 459 460 /** 461 * {@inheritDoc} 462 */ 463 @Override() 464 @Nullable() 465 public String getTargetProtocol() 466 { 467 return forwardHelper.getTargetProtocol(); 468 } 469 470 471 472 /** 473 * {@inheritDoc} 474 */ 475 @Override() 476 @Nullable() 477 public final String getSoftDeletedEntryDN() 478 { 479 return softDeletedEntryDN; 480 } 481 482 483 484 /** 485 * {@inheritDoc} 486 */ 487 @Override() 488 @Nullable() 489 public final Boolean getChangeToSoftDeletedEntry() 490 { 491 return changeToSoftDeletedEntry; 492 } 493}