mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

matthew_swift
23.26.2007 feb5d90ec016c99712f19c5485cf7633cd38f111
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License, Version 1.0 only
 * (the "License").  You may not use this file except in compliance
 * with the License.
 *
 * You can obtain a copy of the license at
 * trunk/opends/resource/legal-notices/OpenDS.LICENSE
 * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at
 * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 * add the following below this CDDL HEADER, with the fields enclosed
 * by brackets "[]" replaced with your own identifying information:
 *      Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 *
 *
 *      Portions Copyright 2007 Sun Microsystems, Inc.
 */
package org.opends.server.messages;
 
 
 
import static org.opends.server.messages.MessageHandler.*;
 
 
 
/**
 * This class defines the set of message IDs and default format strings for
 * messages associated with the server-side administration framework.
 * <p>
 * FIXME: At the moment these error messages are just temporary and will be
 * replaced in time with more specific detailed messages.
 */
public final class AdminMessages {
 
  /**
   * The message ID for the message that will be used if a problem occurs while
   * trying to get the base entry for a configuration listener. This takes two
   * arguments: the DN of the base entry, and a string representation of the
   * exception that was caught.
   */
  public static final int MSGID_ADMIN_CANNOT_GET_LISTENER_BASE =
    CATEGORY_MASK_ADMIN | SEVERITY_MASK_SEVERE_ERROR | 1;
 
  /**
   * The message ID for the message that will be used if the base entry for a
   * configuration listener does not exist in the server. This takes a single
   * argument, which is the DN of the configuration entry.
   */
  public static final int MSGID_ADMIN_LISTENER_BASE_DOES_NOT_EXIST =
    CATEGORY_MASK_ADMIN | SEVERITY_MASK_SEVERE_ERROR | 2;
 
  /**
   * The message ID for the message that will be used if a problem occurs while
   * trying to get the configuration entry associated with a managed object.
   * This takes two arguments: the DN of the configuration entry, and a string
   * representation of the exception that was caught.
   */
  public static final int MSGID_ADMIN_CANNOT_GET_MANAGED_OBJECT =
    CATEGORY_MASK_ADMIN | SEVERITY_MASK_SEVERE_ERROR | 3;
 
  /**
   * The message ID for the message that will be used if the configuration entry
   * associated with a managed object does not exist in the server. This takes a
   * single argument, which is the DN of the configuration entry.
   */
  public static final int MSGID_ADMIN_MANAGED_OBJECT_DOES_NOT_EXIST =
    CATEGORY_MASK_ADMIN | SEVERITY_MASK_SEVERE_ERROR | 4;
 
  /**
   * The message ID for the message that will be used if a managed cannot be
   * successfully decoded from its associated configuration entry. This takes
   * two arguments: the DN of the configuration entry, and a string
   * representation of the exception that was caught.
   */
  public static final int MSGID_ADMIN_MANAGED_OBJECT_DECODING_PROBLEM =
    CATEGORY_MASK_ADMIN | SEVERITY_MASK_SEVERE_ERROR | 5;
 
  /**
   * The message ID for the message that will be used if an error occurs while
   * attempting to load and instantiate a configuration object. This takes three
   * arguments, which are the name of the class, the DN of the configuration
   * entry, and a string representation of the exception that was caught.
   */
  public static final int MSGID_ADMIN_CANNOT_INSTANTIATE_CLASS =
       CATEGORY_MASK_ADMIN | SEVERITY_MASK_SEVERE_ERROR | 6;
 
  /**
   * The message ID for the message that will be used if an error occurs while
   * attempting to initialize a configuration object. This takes three
   * arguments, which are the name of the class, the DN of the configuration
   * entry, and a string representation of the exception that was caught.
   */
  public static final int MSGID_ADMIN_CANNOT_INITIALIZE_COMPONENT =
       CATEGORY_MASK_ADMIN | SEVERITY_MASK_SEVERE_ERROR | 7;
 
  /**
   * The message ID for the message that will be used if a component
   * has been explicitly disabled.  This takes a single argument,
   * which is the DN of the configuration entry.
   */
  public static final int MSGID_ADMIN_COMPONENT_DISABLED =
    CATEGORY_MASK_ADMIN | SEVERITY_MASK_MILD_WARNING | 8;
 
  /**
   * The message ID for the message that will be used if an error
   * occurs while trying to open a file for reading. This takes three
   * arguments, which are the name of the jar file, the path to the
   * jar directory, and a string representation of the exception that
   * was caught.
   */
  public static final int MSGID_ADMIN_CANNOT_OPEN_JAR_FILE =
       CATEGORY_MASK_ADMIN | SEVERITY_MASK_SEVERE_ERROR | 9;
 
  /**
   * The message ID for the message that will be used if an error
   * occurs while trying to load a core administration configuration
   * definition class. This takes two arguments, which are the name of
   * the manifest file, and a string representation of the exception
   * that was caught.
   */
  public static final int MSGID_ADMIN_CANNOT_LOAD_CLASS_FROM_CORE_MANIFEST =
    CATEGORY_MASK_ADMIN | SEVERITY_MASK_FATAL_ERROR | 10;
 
  /**
   * The message ID for the message that will be used if an error
   * occurs while trying to load a administration configuration
   * definition class from an extension. This takes three arguments,
   * which are the name of the manifest file, the name of the
   * extension jar file, and a string representation of the exception
   * that was caught.
   */
  public static final int
      MSGID_ADMIN_CANNOT_LOAD_CLASS_FROM_EXTENSION_MANIFEST =
    CATEGORY_MASK_ADMIN | SEVERITY_MASK_SEVERE_ERROR | 11;
 
  /**
   * The message ID for the message that will be used if the
   * extensions directory does not exist. This takes a single
   * argument, which is the path to the extensions directory.
   */
  public static final int MSGID_ADMIN_NO_EXTENSIONS_DIR =
    CATEGORY_MASK_ADMIN | SEVERITY_MASK_MILD_ERROR | 12;
 
  /**
   * The message ID for the message that will be used if the
   * extensions directory is not a directory. This takes a single
   * argument, which is the path to the extensions directory.
   */
  public static final int MSGID_ADMIN_EXTENSIONS_DIR_NOT_DIRECTORY =
    CATEGORY_MASK_ADMIN | SEVERITY_MASK_SEVERE_ERROR | 13;
 
  /**
   * The message ID for the message that will be used if an error
   * occurs while trying to list the files in the extensions
   * directory. This takes two arguments, which are the path to the
   * extensions directory and a string representation of the exception
   * that was caught.
   */
  public static final int MSGID_ADMIN_EXTENSIONS_CANNOT_LIST_FILES =
    CATEGORY_MASK_ADMIN | SEVERITY_MASK_SEVERE_ERROR | 14;
 
  /**
   * The message ID for the message that will be used if the core
   * administration configuration definition manifest file cannot be
   * located. This takes a single argument, which is the name of the
   * manifest file.
   */
  public static final int MSGID_ADMIN_CANNOT_FIND_CORE_MANIFEST =
    CATEGORY_MASK_ADMIN | SEVERITY_MASK_FATAL_ERROR | 15;
 
  /**
   * The message ID for the message that will be used if the core
   * administration configuration definition manifest file cannot be
   * read. This takes two arguments, which are the name of the
   * manifest file and a string representation of the exception that
   * was caught.
   */
  public static final int MSGID_ADMIN_CANNOT_READ_CORE_MANIFEST =
    CATEGORY_MASK_ADMIN | SEVERITY_MASK_FATAL_ERROR | 16;
 
  /**
   * The message ID for the message that will be used if the
   * administration configuration definition manifest file contained
   * in a extension cannot be read. This takes three arguments, which
   * are the name of the manifest file, the name of the extension jar
   * file, and a string representation of the exception that was
   * caught.
   */
  public static final int MSGID_ADMIN_CANNOT_READ_EXTENSION_MANIFEST =
    CATEGORY_MASK_ADMIN | SEVERITY_MASK_SEVERE_ERROR | 17;
 
  // Prevent instantiation.
  private AdminMessages() {
    // Do nothing.
  }
 
 
 
  /**
   * Associates a set of generic messages with the message IDs defined in this
   * class.
   */
  public static void registerMessages() {
    registerMessage(MSGID_ADMIN_CANNOT_GET_LISTENER_BASE,
        "An error occurred while trying to "
            + "retrieve relation configuration entry %s: %s.");
 
    registerMessage(MSGID_ADMIN_LISTENER_BASE_DOES_NOT_EXIST,
        "The relation entry %s does not appear to exist in the "
            + "Directory Server configuration. This is a required entry.");
 
    registerMessage(MSGID_ADMIN_CANNOT_GET_MANAGED_OBJECT,
        "An error occurred while trying to "
            + "retrieve the managed object configuration entry %s: %s.");
 
    registerMessage(MSGID_ADMIN_MANAGED_OBJECT_DOES_NOT_EXIST,
        "The the managed object configuration entry %s does not "
            + "appear to exist in the Directory Server "
            + "configuration. This is a required entry.");
 
    registerMessage(MSGID_ADMIN_MANAGED_OBJECT_DECODING_PROBLEM,
        "An error occurred while trying to "
            + "decode the managed object configuration entry %s: %s.");
 
    registerMessage(MSGID_ADMIN_CANNOT_INSTANTIATE_CLASS,
        "The Directory Server was unable to load class %s and "
            + "use it to create a component instance as "
            + "defined in configuration entry %s.  The error that "
            + "occurred was:  %s.  This component will be " + "disabled.");
 
    registerMessage(MSGID_ADMIN_CANNOT_INITIALIZE_COMPONENT,
        "An error occurred while trying to initialize a " +
        "component instance loaded from class %s with the " +
        "information in configuration entry %s:  %s.  This " +
        "component will be disabled.");
 
    registerMessage(MSGID_ADMIN_COMPONENT_DISABLED,
        "The Directory Server component configured in " +
        "entry %s has been disabled.");
 
    registerMessage(MSGID_ADMIN_CANNOT_OPEN_JAR_FILE,
        "The Directory Server jar file %s in directory %s cannot be " +
        "loaded because an unexpected error occurred while " +
        "trying to open the file for reading:  %s.");
 
    registerMessage(MSGID_ADMIN_NO_EXTENSIONS_DIR,
        "The extensions directory %s does not exist, therefore no " +
        "extensions will be loaded.");
 
    registerMessage(MSGID_ADMIN_EXTENSIONS_DIR_NOT_DIRECTORY,
        "Unable to read the Directory Server extensions " +
        "because the extensions directory %s exists but is not a " +
        "directory.");
 
    registerMessage(MSGID_ADMIN_EXTENSIONS_CANNOT_LIST_FILES,
        "Unable to read the Directory Server extensions " +
        "from directory %s because an unexpected error occurred " +
        "while trying to list the files in that directory:  %s.");
 
    registerMessage(MSGID_ADMIN_CANNOT_LOAD_CLASS_FROM_CORE_MANIFEST,
        "A core configuration definition class could not be loaded " +
        "from the core manifest file %s because an unexpected error " +
        "occurred while trying to initialize it:  %s.");
 
    registerMessage(MSGID_ADMIN_CANNOT_LOAD_CLASS_FROM_EXTENSION_MANIFEST,
        "A configuration definition class could not be loaded " +
        "from the extension manifest file %s in extensions %s because an " +
        "unexpected error occurred while trying to initialize it:  %s.");
 
    registerMessage(MSGID_ADMIN_CANNOT_FIND_CORE_MANIFEST,
        "The core administration manifest file %s cannot be located.");
 
    registerMessage(MSGID_ADMIN_CANNOT_READ_CORE_MANIFEST,
        "The core administration manifest file %s cannot be " +
        "loaded because an unexpected error occurred while " +
        "trying to read it:  %s.");
 
    registerMessage(MSGID_ADMIN_CANNOT_READ_EXTENSION_MANIFEST,
        "The administration manifest file %s associated with the " +
        "extension %s cannot be loaded because an unexpected error " +
        "occurred while trying to read it:  %s.");
  }
}