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.tools;
028    
029    
030    
031    /**
032     * This class defines a number of constants used in one or more Directory Server
033     * tools.
034     */
035    public class ToolConstants
036    {
037      /**
038       * The name of the SASL property that can be used to provide the
039       * authentication ID for the bind.
040       */
041      public static final String SASL_PROPERTY_AUTHID = "authid";
042    
043    
044    
045      /**
046       * The name of the SASL property that can be used to provide the authorization
047       * ID for the bind.
048       */
049      public static final String SASL_PROPERTY_AUTHZID = "authzid";
050    
051    
052    
053      /**
054       * The name of the SASL property that can be used to provide the digest URI
055       * for the bind.
056       */
057      public static final String SASL_PROPERTY_DIGEST_URI = "digest-uri";
058    
059    
060    
061      /**
062       * The name of the SASL property that can be used to provide the KDC for use
063       * in Kerberos authentication.
064       */
065      public static final String SASL_PROPERTY_KDC = "kdc";
066    
067    
068    
069      /**
070       * The name of the SASL property that can be used to provide the quality of
071       * protection for the bind.
072       */
073      public static final String SASL_PROPERTY_QOP = "qop";
074    
075    
076    
077      /**
078       * The name of the SASL property that can be used to provide the realm for the
079       * bind.
080       */
081      public static final String SASL_PROPERTY_REALM = "realm";
082    
083    
084    
085      /**
086       * The name of the SASL property that can be used to provide trace information
087       * for a SASL ANONYMOUS request.
088       */
089      public static final String SASL_PROPERTY_TRACE = "trace";
090    
091    
092      /**
093       * The name of the opends configuration direction in the user
094       * home directory.
095       */
096      public static final String DEFAULT_OPENDS_CONFIG_DIR = ".opends";
097    
098      /**
099       * The default properties file name.
100       */
101      public static final String DEFAULT_OPENDS_PROPERTIES_FILE_NAME =
102        "tools";
103    
104      /**
105       * The default properties file extension.
106       */
107      public static final String DEFAULT_OPENDS_PROPERTIES_FILE_EXTENSION =
108        ".properties";
109    
110    
111      /**
112       * The value for the short option configClass.
113       */
114      public static final char OPTION_SHORT_CONFIG_CLASS = 'C';
115    
116      /**
117       * The value for the long option configClass.
118       */
119      public static final String OPTION_LONG_CONFIG_CLASS = "configClass";
120    
121      /**
122       * The value for the short option hostname.
123       */
124      public static final char OPTION_SHORT_HOST = 'h';
125    
126      /**
127       * The value for the long option hostname.
128       */
129      public static final String OPTION_LONG_HOST = "hostname";
130    
131      /**
132       * The value for the short option port.
133       */
134      public static final char OPTION_SHORT_PORT = 'p';
135    
136      /**
137       * The value for the long option port.
138       */
139      public static final String OPTION_LONG_PORT = "port";
140    
141      /**
142       * The value for the short option useSSL.
143       */
144      public static final char OPTION_SHORT_USE_SSL = 'Z';
145    
146      /**
147       * The value for the long option useSSL.
148       */
149      public static final String OPTION_LONG_USE_SSL = "useSSL";
150    
151      /**
152       * The value for the short option baseDN.
153       */
154      public static final char OPTION_SHORT_BASEDN = 'b';
155    
156      /**
157       * The value for the long option baseDN.
158       */
159      public static final String OPTION_LONG_BASEDN = "baseDN";
160    
161      /**
162       * The value for the short option rootUserDN.
163       */
164      public static final char OPTION_SHORT_ROOT_USER_DN = 'D';
165    
166      /**
167       * The value for the long option rootUserDN.
168       */
169      public static final String OPTION_LONG_ROOT_USER_DN = "rootUserDN";
170    
171      /**
172       * The value for the short option bindDN.
173       */
174      public static final char OPTION_SHORT_BINDDN = 'D';
175    
176      /**
177       * The value for the long option bindDN.
178       */
179      public static final String OPTION_LONG_BINDDN = "bindDN";
180    
181      /**
182       * The value for the short option bindPassword.
183       */
184      public static final char OPTION_SHORT_BINDPWD = 'w';
185    
186      /**
187       * The value for the long option bindPassword.
188       */
189      public static final String OPTION_LONG_BINDPWD = "bindPassword";
190    
191      /**
192       * The value for the short option bindPasswordFile.
193       */
194      public static final char OPTION_SHORT_BINDPWD_FILE = 'j';
195    
196      /**
197       * The value for the long option bindPasswordFile.
198       */
199      public static final String OPTION_LONG_BINDPWD_FILE = "bindPasswordFile";
200    
201      /**
202       * The value for the short option compress.
203       */
204      public static final char OPTION_SHORT_COMPRESS = 'c';
205    
206      /**
207       * The value for the long option compress.
208       */
209      public static final String OPTION_LONG_COMPRESS = "compress";
210    
211      /**
212       * The value for the short option filename.
213       */
214      public static final char OPTION_SHORT_FILENAME = 'f';
215    
216      /**
217       * The value for the long option filename.
218       */
219      public static final String OPTION_LONG_FILENAME = "filename";
220    
221      /**
222       * The value for the short option ldifFile.
223       */
224      public static final char OPTION_SHORT_LDIF_FILE = 'l';
225    
226      /**
227       * The value for the long option ldifFile.
228       */
229      public static final String OPTION_LONG_LDIF_FILE = "ldifFile";
230    
231      /**
232       * The value for the short option useStartTLS.
233       */
234      public static final char OPTION_SHORT_START_TLS = 'q';
235    
236      /**
237       * The value for the long option useStartTLS.
238       */
239      public static final String OPTION_LONG_START_TLS = "useStartTLS";
240    
241      /**
242       * The value for the short option randomSeed.
243       */
244      public static final char OPTION_SHORT_RANDOM_SEED = 's';
245    
246      /**
247       * The value for the long option randomSeed.
248       */
249      public static final String OPTION_LONG_RANDOM_SEED = "randomSeed";
250    
251      /**
252       * The value for the short option keyStorePath.
253       */
254      public static final char OPTION_SHORT_KEYSTOREPATH = 'K';
255    
256      /**
257       * The value for the long option keyStorePath.
258       */
259      public static final String OPTION_LONG_KEYSTOREPATH = "keyStorePath";
260    
261      /**
262       * The value for the short option trustStorePath.
263       */
264      public static final char OPTION_SHORT_TRUSTSTOREPATH = 'P';
265    
266      /**
267       * The value for the long option trustStorePath.
268       */
269      public static final String OPTION_LONG_TRUSTSTOREPATH = "trustStorePath";
270    
271      /**
272       * The value for the short option keyStorePassword.
273       */
274      public static final char OPTION_SHORT_KEYSTORE_PWD = 'W';
275    
276      /**
277       * The value for the long option keyStorePassword.
278       */
279      public static final String OPTION_LONG_KEYSTORE_PWD = "keyStorePassword";
280    
281      /**
282       * The value for the short option trustStorePassword.
283       */
284      public static final char OPTION_SHORT_TRUSTSTORE_PWD = 'T';
285    
286      /**
287       * The value for the long option trustStorePassword.
288       */
289      public static final String OPTION_LONG_TRUSTSTORE_PWD = "trustStorePassword";
290    
291      /**
292       * The value for the short option keyStorePasswordFile .
293       */
294      public static final char OPTION_SHORT_KEYSTORE_PWD_FILE = 'u';
295    
296      /**
297       * The value for the long option keyStorePasswordFile .
298       */
299      public static final String OPTION_LONG_KEYSTORE_PWD_FILE =
300        "keyStorePasswordFile";
301    
302      /**
303       * The value for the short option keyStorePasswordFile .
304       */
305      public static final char OPTION_SHORT_TRUSTSTORE_PWD_FILE = 'U';
306    
307      /**
308       * The value for the long option keyStorePasswordFile .
309       */
310      public static final String OPTION_LONG_TRUSTSTORE_PWD_FILE =
311        "trustStorePasswordFile";
312      /**
313       * The value for the short option trustAll .
314       */
315      public static final char OPTION_SHORT_TRUSTALL = 'X';
316    
317      /**
318       * The value for the long option trustAll .
319       */
320      public static final String OPTION_LONG_TRUSTALL = "trustAll";
321    
322      /**
323       * The value for the short option certNickname .
324       */
325      public static final char OPTION_SHORT_CERT_NICKNAME = 'N';
326    
327      /**
328       * The value for the long option certNickname .
329       */
330      public static final String OPTION_LONG_CERT_NICKNAME = "certNickname";
331    
332      /**
333       * The value for the long option assertionFilter .
334       */
335      public static final String OPTION_LONG_ASSERTION_FILE = "assertionFilter";
336    
337      /**
338       * The value for the short option dry-run.
339       */
340      public static final char OPTION_SHORT_DRYRUN = 'n';
341    
342      /**
343       * The value for the long option dry-run.
344       */
345      public static final String OPTION_LONG_DRYRUN = "dry-run";
346    
347      /**
348       * The value for the short option help.
349       */
350      public static final char OPTION_SHORT_HELP = 'H';
351    
352      /**
353       * The value for the long option help.
354       */
355      public static final String OPTION_LONG_HELP = "help";
356    
357      /**
358       * The value for the long option cli.
359       */
360      public static final String OPTION_LONG_CLI = "cli";
361    
362      /**
363       * The value for the short option cli.
364       */
365      public static final char OPTION_SHORT_CLI = 'i';
366    
367      /**
368       * The value for the short option proxyAs.
369       */
370      public static final char OPTION_SHORT_PROXYAUTHID = 'Y';
371    
372      /**
373       * The value for the long option proxyAs.
374       */
375      public static final String OPTION_LONG_PROXYAUTHID = "proxyAs";
376    
377      /**
378       * The value for the short option saslOption.
379       */
380      public static final char OPTION_SHORT_SASLOPTION = 'o';
381    
382      /**
383       * The value for the long option saslOption.
384       */
385      public static final String OPTION_LONG_SASLOPTION = "saslOption";
386    
387      /**
388       * The value for the short option geteffectiverights control authzid.
389       */
390       public static final char OPTION_SHORT_EFFECTIVERIGHTSUSER = 'g';
391    
392      /**
393       * The value for the long option geteffectiverights  control authzid.
394       */
395       public static final String OPTION_LONG_EFFECTIVERIGHTSUSER =
396              "getEffectiveRightsAuthzid";
397    
398      /**
399       * The value for the short option geteffectiveights control attributes.
400       */
401       public static final char OPTION_SHORT_EFFECTIVERIGHTSATTR = 'e';
402    
403      /**
404       * The value for the long option geteffectiverights control specific
405       * attribute list.
406       */
407       public static final String OPTION_LONG_EFFECTIVERIGHTSATTR =
408              "getEffectiveRightsAttribute";
409    
410       /**
411        * The value for the short option protocol version attributes.
412        */
413        public static final char OPTION_SHORT_PROTOCOL_VERSION = 'V';
414    
415       /**
416        * The value for the long option protocol version
417        * attribute.
418        */
419        public static final String OPTION_LONG_PROTOCOL_VERSION  =
420               "ldapVersion";
421    
422        /**
423         * The value for the long option version.
424         */
425         public static final char OPTION_SHORT_PRODUCT_VERSION = 'V';
426    
427        /**
428         * The value for the long option version.
429         */
430         public static final String OPTION_LONG_PRODUCT_VERSION  = "version";
431    
432      /**
433       * The value for the short option description attributes.
434       */
435      public static final char OPTION_SHORT_DESCRIPTION = 'd';
436    
437      /**
438       * The value for the long option description attribute.
439       */
440      public static final String OPTION_LONG_DESCRIPTION = "description";
441    
442      /**
443       * The value for the short option groupName attributes.
444       */
445      public static final char OPTION_SHORT_GROUPNAME = 'g';
446    
447      /**
448       * The value for the long option groupName
449       * attribute.
450       */
451      public static final String OPTION_LONG_GROUPNAME= "groupName";
452    
453      /**
454       * The value for the short option newGroupName attribute.
455       */
456      public static final char OPTION_SHORT_NEWGROUPNAME = 'n';
457    
458      /**
459       * The value for the long option groupName
460       * attribute.
461       */
462      public static final String OPTION_LONG_NEWGROUPNAME= "newGroupName";
463    
464      /**
465       * The value for the short option member-name attributes.
466       */
467      public static final char OPTION_SHORT_MEMBERNAME = 'm';
468    
469      /**
470       * The value for the long member-name version
471       * attribute.
472       */
473      public static final String OPTION_LONG_MEMBERNAME= "memberName";
474    
475      /**
476       * The value for the short option backendName attributes.
477       */
478      public static final char OPTION_SHORT_BACKENDNAME = 'b';
479    
480      /**
481       * The value for the long option backendName
482       * attribute.
483       */
484      public static final String OPTION_LONG_BACKENDNAME= "backendName";
485    
486      /**
487       * The value for the short option serverID attributes.
488       */
489      public static final String OPTION_SHORT_SERVERID = null;
490    
491      /**
492       * The value for the long option serverID
493       * attribute.
494       */
495      public static final String OPTION_LONG_SERVERID= "serverID";
496    
497      /**
498       * The value for the short option userID attributes.
499       */
500      public static final String OPTION_SHORT_USERID = null;
501    
502      /**
503       * The value for the long option userID
504       * attribute.
505       */
506      public static final String OPTION_LONG_USERID= "userID";
507    
508      /**
509       * The value for the short option set.
510       */
511      public static final Character OPTION_SHORT_SET = null;
512    
513      /**
514      * The value for the long option set.
515      */
516     public static final String OPTION_LONG_SET = "set";
517    
518      /**
519       * Value for the server root option short form.
520       */
521      public static final Character OPTION_SHORT_SERVER_ROOT = 'R';
522    
523      /**
524       * Value for the server root option long form.
525       */
526      public static final String OPTION_LONG_SERVER_ROOT = "serverRoot";
527    
528      /**
529       * Value for the quiet option short form.
530       */
531      public static final Character OPTION_SHORT_QUIET = 'Q';
532    
533      /**
534       * Value for the quiet option long form.
535       */
536      public static final String OPTION_LONG_QUIET = "quiet";
537    
538      /**
539       * Value for noninteractive session short form.
540       */
541      public static final Character OPTION_SHORT_NO_PROMPT = 'n';
542    
543      /**
544       * Value for noninteractive session long form.
545       */
546      public static final String OPTION_LONG_NO_PROMPT = "no-prompt";
547    
548      /**
549       * Long form of script friendly option.
550       */
551      public static final String OPTION_LONG_SCRIPT_FRIENDLY = "script-friendly";
552    
553      /**
554       * Short form of script friendly option.
555       */
556      public static final Character OPTION_SHORT_SCRIPT_FRIENDLY = 's';
557    
558      /**
559       * Value for verbose option short form.
560       */
561      public static final Character OPTION_SHORT_VERBOSE = 'v';
562    
563      /**
564       * Value for verbose option long form.
565       */
566      public static final String OPTION_LONG_VERBOSE = "verbose";
567    
568      /**
569       * Scheduled start date/time option long form.
570       */
571      public static final String OPTION_LONG_START_DATETIME = "start";
572    
573      /**
574       * Scheduled start date/time option short form.
575       */
576      public static final Character OPTION_SHORT_START_DATETIME = 't';
577    
578      /**
579       * The value for the long option propertiesFilePAth .
580       */
581      public static final String OPTION_LONG_PROP_FILE_PATH = "propertiesFilePath";
582    
583      /**
584       * Argument that specifies that an operation be scheduled as a
585       * task but the scheduling utility should not exit until the task
586       * has completed.
587       */
588      public static final String OPTION_LONG_SYNCHRONOUS_TASK_MODE =
589              "synchronousTaskMode";
590    
591      /**
592       * Argument that specifies that an operation be scheduled as a
593       * task but the scheduling utility should not exit until the task
594       * has completed.
595       */
596      public static final Character OPTION_SHORT_SYNCHRONOUS_TASK_MODE = 'Y';
597    
598    
599      /**
600       * The value for the long option propertiesFilePAth .
601       */
602      public static final String OPTION_LONG_NO_PROP_FILE = "noPropertiesFile";
603    
604    
605      /**
606       * Long form of referenced host name.
607       */
608      public static final String OPTION_LONG_REFERENCED_HOST_NAME =
609              "referencedHostName";
610    
611    
612      /**
613       * Long form of admin UID.
614       */
615      public static final String OPTION_LONG_ADMIN_UID = "adminUID";
616    
617    
618      /**
619       * Long form of report authorization ID connection option.
620       */
621      public static final String OPTION_LONG_REPORT_AUTHZ_ID = "reportAuthzID";
622    
623    
624      /**
625       * Long form of use password policy control connection option.
626       */
627      public static final String OPTION_LONG_USE_PW_POLICY_CTL =
628              "usePasswordPolicyControl";
629    
630    
631      /**
632       * Long form of use SASL external connection option.
633       */
634      public static final String OPTION_LONG_USE_SASL_EXTERNAL = "useSASLExternal";
635    
636    
637      /**
638       * Long form of option for the command-line encoding option.
639       */
640      public static final String OPTION_LONG_ENCODING = "encoding";
641    
642    
643      /**
644       * Long form of option specifying no wrapping of the command-line.
645       */
646      public static final String OPTION_LONG_DONT_WRAP = "dontWrap";
647    
648    
649      /**
650       * Long form of email notification upon completion option.
651       */
652      public static final String OPTION_LONG_COMPLETION_NOTIFICATION_EMAIL =
653              "completionNotify";
654    
655      /**
656       * Short form of email notification upon completion option.
657       */
658      public static final Character OPTION_SHORT_COMPLETION_NOTIFICATION_EMAIL =
659              null;
660    
661    
662      /**
663       * Long form of email notification upon error option.
664       */
665      public static final String OPTION_LONG_ERROR_NOTIFICATION_EMAIL =
666              "errorNotify";
667    
668    
669      /**
670       * Short form of email notification upon error option.
671       */
672      public static final Character OPTION_SHORT_ERROR_NOTIFICATION_EMAIL =
673              null;
674    
675    
676      /**
677       * Long form of dependency option.
678       */
679      public static final String OPTION_LONG_DEPENDENCY = "dependency";
680    
681    
682      /**
683       * Short form of dependency option.
684       */
685      public static final Character OPTION_SHORT_DEPENDENCY = null;
686    
687    
688      /**
689       * Long form of failed dependency action option.
690       */
691      public static final String OPTION_LONG_FAILED_DEPENDENCY_ACTION =
692              "failedDependencyAction";
693    
694    
695      /**
696       * Short form of failed dependency action option.
697       */
698      public static final Character OPTION_SHORT_FAILED_DEPENDENCY_ACTION = null;
699    
700    
701      /**
702       * The default separator to be used in tables.
703       */
704      public static final String LIST_TABLE_SEPARATOR = ":";
705    
706      /**
707       * Display the equivalent non-interactive command.
708       */
709      public static final String OPTION_DSCFG_LONG_DISPLAY_EQUIVALENT =
710        "displayCommand";
711    
712      /**
713       * The path where we write the equivalent non-interactive command.
714       */
715      public static final String OPTION_LONG_EQUIVALENT_COMMAND_FILE_PATH =
716        "commandFilePath";
717    }
718