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 * trunk/opends/resource/legal-notices/OpenDS.LICENSE
011 * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
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 * trunk/opends/resource/legal-notices/OpenDS.LICENSE. 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 2008 Sun Microsystems, Inc.
026 */
027 package org.opends.server.types.operation;
028 import org.opends.messages.MessageBuilder;
029
030
031 import java.util.List;
032
033 import org.opends.server.types.DN;
034 import org.opends.server.types.ResultCode;
035
036
037
038 /**
039 * This class defines a set of methods that are available for use by
040 * post-synchronization plugins for all types of operations. Note
041 * that this interface is intended only to define an API for use by
042 * plugins and is not intended to be implemented by any custom
043 * classes.
044 */
045 @org.opends.server.types.PublicAPI(
046 stability=org.opends.server.types.StabilityLevel.UNCOMMITTED,
047 mayInstantiate=false,
048 mayExtend=false,
049 mayInvoke=true)
050 public interface PostSynchronizationOperation
051 extends PluginOperation
052 {
053 /**
054 * Retrieves the result code for this operation.
055 *
056 * @return The result code associated for this operation, or
057 * <CODE>UNDEFINED</CODE> if the operation has not yet
058 * completed.
059 */
060 public ResultCode getResultCode();
061
062
063
064 /**
065 * Retrieves the error message for this operation. Its contents may
066 * be altered by the caller.
067 *
068 * @return The error message for this operation.
069 */
070 public MessageBuilder getErrorMessage();
071
072
073
074 /**
075 * Retrieves the additional log message for this operation, which
076 * should be written to the log but not included in the response to
077 * the client. The contents of this buffer may be altered by the
078 * caller.
079 *
080 * @return The additional log message for this operation.
081 */
082 public MessageBuilder getAdditionalLogMessage();
083
084
085
086 /**
087 * Retrieves the matched DN for this operation.
088 *
089 * @return The matched DN for this operation, or <CODE>null</CODE>
090 * if the operation has not yet completed or does not have
091 * a matched DN.
092 */
093 public DN getMatchedDN();
094
095
096
097 /**
098 * Retrieves the set of referral URLs for this operation. Its
099 * contents must not be altered by the caller.
100 *
101 * @return The set of referral URLs for this operation, or
102 * <CODE>null</CODE> if the operation is not yet complete
103 * or does not have a set of referral URLs.
104 */
105 public List<String> getReferralURLs();
106
107
108
109 /**
110 * Retrieves the authorization DN for this operation. In many
111 * cases, it will be the same as the DN of the authenticated user
112 * for the underlying connection, or the null DN if no
113 * authentication has been performed on that connection. However,
114 * it may be some other value if special processing has been
115 * requested (e.g., the operation included a proxied authorization
116 * control).
117 *
118 * @return The authorization DN for this operation.
119 */
120 public DN getAuthorizationDN();
121
122
123
124 /**
125 * Retrieves the time that processing stopped for this operation.
126 * This will actually hold a time immediately before the response
127 * was sent to the client.
128 *
129 * @return The time that processing stopped for this operation.
130 */
131 public long getProcessingStopTime();
132
133
134
135 /**
136 * Retrieves the length of time in milliseconds that the server
137 * spent processing this operation.
138 *
139 * @return The length of time in milliseconds that the server spent
140 * processing this operation.
141 */
142 public long getProcessingTime();
143 }
144