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 2006-2008 Sun Microsystems, Inc.
026 */
027 package org.opends.server.types.operation;
028 import org.opends.messages.Message;
029
030
031
032 import org.opends.server.types.*;
033
034 import org.opends.messages.MessageBuilder;
035
036
037 /**
038 * This class defines a set of methods that are available for use by
039 * pre-parse plugins for all types of operations. Note that this
040 * interface is intended only to define an API for use by plugins and
041 * is not intended to be implemented by any custom classes.
042 */
043 @org.opends.server.types.PublicAPI(
044 stability=org.opends.server.types.StabilityLevel.UNCOMMITTED,
045 mayInstantiate=false,
046 mayExtend=false,
047 mayInvoke=true)
048 public interface PreParseOperation
049 extends PluginOperation
050 {
051 /**
052 * Adds the provided control to the set of request controls for this
053 * operation.
054 *
055 * @param control The control to add to the set of request
056 * controls for this operation.
057 */
058 public void addRequestControl(Control control);
059
060
061
062 /**
063 * Removes the provided control from the set of request controls for
064 * this operation.
065 *
066 * @param control The control to remove from the set of request
067 * controls for this operation.
068 */
069 public void removeRequestControl(Control control);
070
071
072
073 /**
074 * Adds the provided control to the set of controls to include in
075 * the response to the client.
076 *
077 * @param control The control to add to the set of controls to
078 * include in the response to the client.
079 */
080 public void addResponseControl(Control control);
081
082
083
084 /**
085 * Removes the provided control from the set of controls to include
086 * in the response to the client.
087 *
088 * @param control The control to remove from the set of controls
089 * to include in the response to the client.
090 */
091 public void removeResponseControl(Control control);
092
093
094
095 /**
096 * Retrieves the error message for this operation. Its contents may
097 * be altered by the caller.
098 *
099 * @return The error message for this operation.
100 */
101 public MessageBuilder getErrorMessage();
102
103
104
105 /**
106 * Specifies the error message for this operation.
107 *
108 * @param errorMessage The error message for this operation.
109 */
110 public void setErrorMessage(MessageBuilder errorMessage);
111
112
113
114 /**
115 * Appends the provided message to the error message buffer. If the
116 * buffer has not yet been created, then this will create it first
117 * and then add the provided message.
118 *
119 * @param message The message to append to the error message
120 * buffer.
121 */
122 public void appendErrorMessage(Message message);
123
124
125
126 /**
127 * Retrieves the additional log message for this operation, which
128 * should be written to the log but not included in the response to
129 * the client. The contents of this buffer may be altered by the
130 * caller.
131 *
132 * @return The additional log message for this operation.
133 */
134 public MessageBuilder getAdditionalLogMessage();
135
136
137
138 /**
139 * Specifies the additional log message for this operation, which
140 * should be written to the log but not included in the response to
141 * the client.
142 *
143 * @param additionalLogMessage The additional log message for this
144 */
145 public void setAdditionalLogMessage(
146 MessageBuilder additionalLogMessage);
147
148
149
150 /**
151 * Appends the provided message to the additional log information
152 * for this operation.
153 *
154 * @param message The message that should be appended to the
155 * additional log information for this operation.
156 */
157 public void appendAdditionalLogMessage(Message message);
158 }
159