001/*
002 * Copyright 2021-2024 Ping Identity Corporation
003 * All Rights Reserved.
004 */
005/*
006 * Copyright 2021-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) 2021-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.extensions;
037
038
039
040import com.unboundid.ldap.sdk.Control;
041import com.unboundid.ldap.sdk.ExtendedResult;
042import com.unboundid.ldap.sdk.LDAPException;
043import com.unboundid.ldap.sdk.ResultCode;
044import com.unboundid.util.NotMutable;
045import com.unboundid.util.NotNull;
046import com.unboundid.util.Nullable;
047import com.unboundid.util.ThreadSafety;
048import com.unboundid.util.ThreadSafetyLevel;
049
050
051
052/**
053 * This class implements an extended result that may be returned in response to
054 * a {@link ReplaceListenerCertificateExtendedRequest}.  See the
055 * {@link ReplaceCertificateExtendedResult} class for a description of the
056 * content for the result.
057 * <BR>
058 * <BLOCKQUOTE>
059 *   <B>NOTE:</B>  This class, and other classes within the
060 *   {@code com.unboundid.ldap.sdk.unboundidds} package structure, are only
061 *   supported for use against Ping Identity, UnboundID, and
062 *   Nokia/Alcatel-Lucent 8661 server products.  These classes provide support
063 *   for proprietary functionality or for external specifications that are not
064 *   considered stable or mature enough to be guaranteed to work in an
065 *   interoperable way with other types of LDAP servers.
066 * </BLOCKQUOTE>
067 */
068@NotMutable()
069@ThreadSafety(level=ThreadSafetyLevel.COMPLETELY_THREADSAFE)
070public final class ReplaceListenerCertificateExtendedResult
071       extends ReplaceCertificateExtendedResult
072{
073  /**
074   * The serial version UID for this serializable class.
075   */
076  private static final long serialVersionUID = 8514170861819417947L;
077
078
079
080  /**
081   * Creates a new replace listener certificate extended result that is decoded
082   * from the provided extended result.
083   *
084   * @param  extendedResult  The generic extended result to decode as a replace
085   *                         listener certificate extended result.  It must not
086   *                         be {@code null}.
087   *
088   * @throws  LDAPException  If the provided extended result cannot be decoded
089   *                         as a replace listener certificate extended result.
090   */
091  public ReplaceListenerCertificateExtendedResult(
092                 @NotNull final ExtendedResult extendedResult)
093         throws LDAPException
094  {
095    super(extendedResult);
096  }
097
098
099
100  /**
101   * Creates a new replace listener certificate extended result with the
102   * provided information.
103   *
104   * @param  messageID          The message ID for the LDAP message that is
105   *                            associated with this LDAP result.
106   * @param  resultCode         The result code from the response.
107   * @param  diagnosticMessage  The diagnostic message from the response, if
108   *                            available.
109   * @param  matchedDN          The matched DN from the response, if available.
110   * @param  referralURLs       The set of referral URLs from the response, if
111   *                            available.
112   * @param  toolOutput         The output (a combined representation of both
113   *                            standard output and standard error) obtained
114   *                            from running the {@code replace-certificate}
115   *                            tool.  It may be {@code null} if request
116   *                            processing failed before running the tool.
117   * @param  responseControls   The set of controls to include in the extended
118   *                            result.  It may be {@code null} or empty if no
119   *                            response controls should be included.
120   */
121  public ReplaceListenerCertificateExtendedResult(final int messageID,
122              @NotNull final ResultCode resultCode,
123              @Nullable final String diagnosticMessage,
124              @Nullable final String matchedDN,
125              @Nullable final String[] referralURLs,
126              @Nullable final String toolOutput,
127              @Nullable final Control... responseControls)
128  {
129    super(messageID, resultCode, diagnosticMessage, matchedDN, referralURLs,
130         ReplaceListenerCertificateExtendedRequest.
131              REPLACE_LISTENER_CERT_REQUEST_OID,
132         toolOutput, responseControls);
133  }
134}