Class ReplaceCertificateExtendedResult

    • Constructor Detail

      • ReplaceCertificateExtendedResult

        protected ReplaceCertificateExtendedResult​(@NotNull
                                                   ExtendedResult extendedResult)
                                            throws LDAPException
        Creates a new replace certificate extended result that is decoded from the provided extended result.
        Parameters:
        extendedResult - The generic extended result to decode as a replace certificate extended result. It must not be null.
        Throws:
        LDAPException - If the provided extended result cannot be decoded as a replace certificate extended result.
      • ReplaceCertificateExtendedResult

        protected ReplaceCertificateExtendedResult​(int messageID,
                                                   @NotNull
                                                   ResultCode resultCode,
                                                   @Nullable
                                                   java.lang.String diagnosticMessage,
                                                   @Nullable
                                                   java.lang.String matchedDN,
                                                   @Nullable
                                                   java.lang.String[] referralURLs,
                                                   @Nullable
                                                   java.lang.String oid,
                                                   @Nullable
                                                   java.lang.String toolOutput,
                                                   @Nullable
                                                   Control... responseControls)
        Creates a new replace certificate extended result with the provided information.
        Parameters:
        messageID - The message ID for the LDAP message that is associated with this LDAP result.
        resultCode - The result code from the response.
        diagnosticMessage - The diagnostic message from the response, if available.
        matchedDN - The matched DN from the response, if available.
        referralURLs - The set of referral URLs from the response, if available.
        oid - The OID to use for the extended result. It may be null if no OID should be used.
        toolOutput - The output (a combined representation of both standard output and standard error) obtained from running the replace-certificate tool. It may be null if request processing failed before running the tool.
        responseControls - The set of controls to include in the extended result. It may be null or empty if no response controls should be included.
    • Method Detail

      • encodeValue

        @Nullable
        public static ASN1OctetString encodeValue​(@Nullable
                                                  java.lang.String oid,
                                                  @Nullable
                                                  java.lang.String toolOutput)
        Encodes a value for this extended result, if appropriate.
        Parameters:
        oid - The OID to use for the extended result. It may be null if no OID should be used.
        toolOutput - The output obtained from running the replace-certificate tool. It may be null if request processing failed before running the tool.
        Returns:
        The encoded value for this extended result, or null if no value should be included.
      • getToolOutput

        @Nullable
        public java.lang.String getToolOutput()
        Retrieves the output (a combined representation of both standard output and standard error) obtained from running the replace-certificate tool, if available.
        Returns:
        The output obtained from running the replace-certificate tool, or null if no output is available (e.g., because an error occurred before the tool could be invoked).
      • toString

        public final void toString​(@NotNull
                                   java.lang.StringBuilder buffer)
        Appends a string representation of this replace certificate result to the provided buffer.
        Specified by:
        toString in interface LDAPResponse
        Overrides:
        toString in class ExtendedResult
        Parameters:
        buffer - The buffer to which the information should be appended. It must not be null.