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. 050 ModifyDNResultAccessLogMessage; 051import com.unboundid.util.NotExtensible; 052import com.unboundid.util.NotMutable; 053import com.unboundid.util.NotNull; 054import com.unboundid.util.Nullable; 055import com.unboundid.util.ThreadSafety; 056import com.unboundid.util.ThreadSafetyLevel; 057 058 059 060/** 061 * This class provides a data structure that holds information about a 062 * text-formatted modify DN result access log message. 063 * <BR> 064 * <BLOCKQUOTE> 065 * <B>NOTE:</B> This class, and other classes within the 066 * {@code com.unboundid.ldap.sdk.unboundidds} package structure, are only 067 * supported for use against Ping Identity, UnboundID, and 068 * Nokia/Alcatel-Lucent 8661 server products. These classes provide support 069 * for proprietary functionality or for external specifications that are not 070 * considered stable or mature enough to be guaranteed to work in an 071 * interoperable way with other types of LDAP servers. 072 * </BLOCKQUOTE> 073 */ 074@NotExtensible() 075@NotMutable() 076@ThreadSafety(level=ThreadSafetyLevel.COMPLETELY_THREADSAFE) 077public class TextFormattedModifyDNResultAccessLogMessage 078 extends TextFormattedModifyDNRequestAccessLogMessage 079 implements ModifyDNResultAccessLogMessage 080{ 081 /** 082 * The serial version UID for this serializable class. 083 */ 084 private static final long serialVersionUID = -6465567340975637801L; 085 086 087 088 // The forward helper for this access log message. 089 @NotNull private final TextFormattedForwardAccessLogMessageHelper 090 forwardHelper; 091 092 // The result helper for this access log message. 093 @NotNull private final TextFormattedResultAccessLogMessageHelper 094 resultHelper; 095 096 097 098 /** 099 * Creates a new text-formatted modify DN result access log message from the 100 * provided message string. 101 * 102 * @param logMessageString The string representation of this log message. 103 * It must not be {@code null}. 104 * 105 * @throws LogException If the provided string cannot be parsed as a valid 106 * log message. 107 */ 108 public TextFormattedModifyDNResultAccessLogMessage( 109 @NotNull final String logMessageString) 110 throws LogException 111 { 112 this(new TextFormattedLogMessage(logMessageString)); 113 } 114 115 116 117 /** 118 * Creates a new text-formatted modify DN result access log message from the 119 * provided message. 120 * 121 * @param logMessage The log message to use to create this modify DN result 122 * access log message. It must not be {@code null}. 123 */ 124 TextFormattedModifyDNResultAccessLogMessage( 125 @NotNull final TextFormattedLogMessage logMessage) 126 { 127 super(logMessage); 128 129 resultHelper = new TextFormattedResultAccessLogMessageHelper(this); 130 forwardHelper = new TextFormattedForwardAccessLogMessageHelper(this); 131 } 132 133 134 135 /** 136 * {@inheritDoc} 137 */ 138 @Override() 139 @NotNull() 140 public AccessLogMessageType getMessageType() 141 { 142 return AccessLogMessageType.RESULT; 143 } 144 145 146 147 /** 148 * {@inheritDoc} 149 */ 150 @Override() 151 @Nullable() 152 public ResultCode getResultCode() 153 { 154 return resultHelper.getResultCode(); 155 } 156 157 158 159 /** 160 * {@inheritDoc} 161 */ 162 @Override() 163 @Nullable() 164 public String getDiagnosticMessage() 165 { 166 return resultHelper.getDiagnosticMessage(); 167 } 168 169 170 171 /** 172 * {@inheritDoc} 173 */ 174 @Override() 175 @Nullable() 176 public String getAdditionalInformation() 177 { 178 return resultHelper.getAdditionalInformation(); 179 } 180 181 182 183 /** 184 * {@inheritDoc} 185 */ 186 @Override() 187 @Nullable() 188 public String getMatchedDN() 189 { 190 return resultHelper.getMatchedDN(); 191 } 192 193 194 195 /** 196 * {@inheritDoc} 197 */ 198 @Override() 199 @NotNull() 200 public List<String> getReferralURLs() 201 { 202 return resultHelper.getReferralURLs(); 203 } 204 205 206 207 /** 208 * {@inheritDoc} 209 */ 210 @Override() 211 @Nullable() 212 public Double getProcessingTimeMillis() 213 { 214 return resultHelper.getProcessingTimeMillis(); 215 } 216 217 218 219 /** 220 * {@inheritDoc} 221 */ 222 @Override() 223 @Nullable() 224 public Double getWorkQueueWaitTimeMillis() 225 { 226 return resultHelper.getWorkQueueWaitTimeMillis(); 227 } 228 229 230 231 /** 232 * {@inheritDoc} 233 */ 234 @Override() 235 @NotNull() 236 public Set<String> getResponseControlOIDs() 237 { 238 return resultHelper.getResponseControlOIDs(); 239 } 240 241 242 243 /** 244 * {@inheritDoc} 245 */ 246 @Override() 247 @Nullable() 248 public Long getIntermediateResponsesReturned() 249 { 250 return resultHelper.getIntermediateResponsesReturned(); 251 } 252 253 254 255 /** 256 * {@inheritDoc} 257 */ 258 @Override() 259 @NotNull() 260 public List<String> getServersAccessed() 261 { 262 return resultHelper.getServersAccessed(); 263 } 264 265 266 267 /** 268 * {@inheritDoc} 269 */ 270 @Override() 271 @Nullable() 272 public Boolean getUncachedDataAccessed() 273 { 274 return resultHelper.getUncachedDataAccessed(); 275 } 276 277 278 279 /** 280 * {@inheritDoc} 281 */ 282 @Override() 283 @NotNull() 284 public Set<String> getUsedPrivileges() 285 { 286 return resultHelper.getUsedPrivileges(); 287 } 288 289 290 291 /** 292 * {@inheritDoc} 293 */ 294 @Override() 295 @NotNull() 296 public Set<String> getPreAuthorizationUsedPrivileges() 297 { 298 return resultHelper.getPreAuthorizationUsedPrivileges(); 299 } 300 301 302 303 /** 304 * {@inheritDoc} 305 */ 306 @Override() 307 @NotNull() 308 public Set<String> getMissingPrivileges() 309 { 310 return resultHelper.getMissingPrivileges(); 311 } 312 313 314 315 /** 316 * {@inheritDoc} 317 */ 318 @Override() 319 @Nullable() 320 public final String getAlternateAuthorizationDN() 321 { 322 return resultHelper.getAlternateAuthorizationDN(); 323 } 324 325 326 327 /** 328 * {@inheritDoc} 329 */ 330 @Override() 331 @Nullable() 332 public final String getReplicationChangeID() 333 { 334 return resultHelper.getReplicationChangeID(); 335 } 336 337 338 339 /** 340 * {@inheritDoc} 341 */ 342 @Override() 343 @Nullable() 344 public final AssuredReplicationLocalLevel getAssuredReplicationLocalLevel() 345 { 346 return resultHelper.getAssuredReplicationLocalLevel(); 347 } 348 349 350 351 /** 352 * {@inheritDoc} 353 */ 354 @Override() 355 @Nullable() 356 public final AssuredReplicationRemoteLevel getAssuredReplicationRemoteLevel() 357 { 358 return resultHelper.getAssuredReplicationRemoteLevel(); 359 } 360 361 362 363 /** 364 * {@inheritDoc} 365 */ 366 @Override() 367 @Nullable() 368 public final Long getAssuredReplicationTimeoutMillis() 369 { 370 return resultHelper.getAssuredReplicationTimeoutMillis(); 371 } 372 373 374 375 /** 376 * {@inheritDoc} 377 */ 378 @Override() 379 @Nullable() 380 public final Boolean getResponseDelayedByAssurance() 381 { 382 return resultHelper.getResponseDelayedByAssurance(); 383 } 384 385 386 387 /** 388 * {@inheritDoc} 389 */ 390 @Override() 391 @NotNull() 392 public final Set<String> getIndexesWithKeysAccessedNearEntryLimit() 393 { 394 return resultHelper.getIndexesWithKeysAccessedNearEntryLimit(); 395 } 396 397 398 399 /** 400 * {@inheritDoc} 401 */ 402 @Override() 403 @NotNull() 404 public final Set<String> getIndexesWithKeysAccessedExceedingEntryLimit() 405 { 406 return resultHelper.getIndexesWithKeysAccessedExceedingEntryLimit(); 407 } 408 409 410 411 /** 412 * Retrieves a string representation of an intermediate client response 413 * control included in the log message. 414 * 415 * @return A string representation of an intermediate client response control 416 * included in the log message, or {@code null} if there is none. 417 */ 418 @Nullable() 419 public final String getIntermediateClientResponseControl() 420 { 421 return resultHelper.getIntermediateClientResponseControl(); 422 } 423 424 425 426 /** 427 * {@inheritDoc} 428 */ 429 @Override() 430 @Nullable() 431 public String getTargetHost() 432 { 433 return forwardHelper.getTargetHost(); 434 } 435 436 437 438 /** 439 * {@inheritDoc} 440 */ 441 @Override() 442 @Nullable() 443 public Integer getTargetPort() 444 { 445 return forwardHelper.getTargetPort(); 446 } 447 448 449 450 /** 451 * {@inheritDoc} 452 */ 453 @Override() 454 @Nullable() 455 public String getTargetProtocol() 456 { 457 return forwardHelper.getTargetProtocol(); 458 } 459}