001/*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License").  You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at
010 * docs/licenses/cddl.txt
011 * or http://www.opensource.org/licenses/cddl1.php.
012 * See the License for the specific language governing permissions
013 * and limitations under the License.
014 *
015 * When distributing Covered Code, include this CDDL HEADER in each
016 * file and include the License file at
017 * docs/licenses/cddl.txt.  If applicable,
018 * add the following below this CDDL HEADER, with the fields enclosed
019 * by brackets "[]" replaced with your own identifying information:
020 *      Portions Copyright [yyyy] [name of copyright owner]
021 *
022 * CDDL HEADER END
023 *
024 *
025 *      Copyright 2010-2018 Ping Identity Corporation
026 */
027package com.unboundid.directory.sdk.common.operation;
028
029
030
031import java.util.List;
032
033import com.unboundid.ldap.sdk.LDAPResult;
034import com.unboundid.ldap.sdk.ResultCode;
035import com.unboundid.util.NotExtensible;
036import com.unboundid.util.ThreadSafety;
037import com.unboundid.util.ThreadSafetyLevel;
038
039
040
041/**
042 * This interface defines a set of methods which may be used to interact with
043 * properties common to most types of LDAP results.
044 */
045@NotExtensible()
046@ThreadSafety(level=ThreadSafetyLevel.INTERFACE_NOT_THREADSAFE)
047public interface GenericResult
048       extends Result
049{
050  /**
051   * Retrieves the result code for the result.
052   *
053   * @return  The result code for the result.
054   */
055  ResultCode getResultCode();
056
057
058
059  /**
060   * Retrieves the matched DN for the result, if any.
061   *
062   * @return  The matched DN for the result, or {@code null} if there is none.
063   */
064  String getMatchedDN();
065
066
067
068  /**
069   * Retrieves the diagnostic message for the result, if any.
070   *
071   * @return  The diagnostic message for the result, or {@code null} if there
072   *          is none.
073   */
074  String getDiagnosticMessage();
075
076
077
078  /**
079   * Retrieves the referral URLs for the result.
080   *
081   * @return  The referral URLs for the result, or an empty list if there are
082   *          none.
083   */
084  List<String> getReferralURLs();
085
086
087
088  /**
089   * Retrieves an additional log message for the result which will not be
090   * returned to the client but may be included in access log messages for the
091   * associated operation.
092   *
093   * @return  An additional log message for the result.
094   */
095  String getAdditionalLogMessage();
096
097
098
099  /**
100   * Retrieves an LDAP SDK representation of this result.
101   *
102   * @return  An LDAP SDK representation of this result.
103   */
104  LDAPResult toLDAPSDKResult();
105}