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 ReplaceInterServerCertificateExtendedRequest}.  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 ReplaceInterServerCertificateExtendedResult
071       extends ReplaceCertificateExtendedResult
072{
073  /**
074   * The serial version UID for this serializable class.
075   */
076  private static final long serialVersionUID = 8882766940466880374L;
077
078
079
080  /**
081   * Creates a new replace inter-server certificate extended result that is
082   * decoded from the provided extended result.
083   *
084   * @param  extendedResult  The generic extended result to decode as a replace
085   *                         inter-server certificate extended result.  It must
086   *                         not be {@code null}.
087   *
088   * @throws  LDAPException  If the provided extended result cannot be decoded
089   *                         as a replace inter-server certificate extended
090   *                         result.
091   */
092  public ReplaceInterServerCertificateExtendedResult(
093                 @NotNull final ExtendedResult extendedResult)
094         throws LDAPException
095  {
096    super(extendedResult);
097  }
098
099
100
101  /**
102   * Creates a new replace inter-server certificate extended result with the
103   * provided information.
104   *
105   * @param  messageID          The message ID for the LDAP message that is
106   *                            associated with this LDAP result.
107   * @param  resultCode         The result code from the response.
108   * @param  diagnosticMessage  The diagnostic message from the response, if
109   *                            available.
110   * @param  matchedDN          The matched DN from the response, if available.
111   * @param  referralURLs       The set of referral URLs from the response, if
112   *                            available.
113   * @param  toolOutput         The output (a combined representation of both
114   *                            standard output and standard error) obtained
115   *                            from running the {@code replace-certificate}
116   *                            tool.  It may be {@code null} if request
117   *                            processing failed before running the tool.
118   * @param  responseControls   The set of controls to include in the extended
119   *                            result.  It may be {@code null} or empty if no
120   *                            response controls should be included.
121   */
122  public ReplaceInterServerCertificateExtendedResult(final int messageID,
123              @NotNull final ResultCode resultCode,
124              @Nullable final String diagnosticMessage,
125              @Nullable final String matchedDN,
126              @Nullable final String[] referralURLs,
127              @Nullable final String toolOutput,
128              @Nullable final Control... responseControls)
129  {
130    super(messageID, resultCode, diagnosticMessage, matchedDN, referralURLs,
131         ReplaceInterServerCertificateExtendedRequest.
132              REPLACE_INTER_SERVER_CERT_REQUEST_OID,
133         toolOutput, responseControls);
134  }
135}